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
void removeContacts(SearchContacts searchContacts);
void removeContacts(SearchContacts searchContacts);
/** * Bulk logic remove of contacts * * @param searchContacts */
Bulk logic remove of contacts
removeContacts
{ "repo_name": "Kuorum/kuorumServices", "path": "serviceContact/src/main/java/org/kuorum/service/contact/ContactService.java", "license": "gpl-3.0", "size": 5589 }
[ "org.kuorum.service.contact.model.search.SearchContacts" ]
import org.kuorum.service.contact.model.search.SearchContacts;
import org.kuorum.service.contact.model.search.*;
[ "org.kuorum.service" ]
org.kuorum.service;
1,479,269
public void eventDispatched(AWTEvent event) { int id = event == null ? 0 : event.getID(); if (((mask & AWTEvent.ACTION_EVENT_MASK) != 0 && event instanceof ActionEvent) || ((mask & AWTEvent.ADJUSTMENT_EVENT_MASK) != 0 && event instanceof AdjustmentEvent) || ((mask & AWTEvent.COMPONENT_EVENT_MASK) != 0 && event instanceof ComponentEvent && (id >= ComponentEvent.COMPONENT_FIRST && id <= ComponentEvent.COMPONENT_LAST)) || ((mask & AWTEvent.CONTAINER_EVENT_MASK) != 0 && event instanceof ContainerEvent) || ((mask & AWTEvent.FOCUS_EVENT_MASK) != 0 && event instanceof FocusEvent) || ((mask & AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) != 0 && event instanceof HierarchyEvent && (id == HierarchyEvent.ANCESTOR_MOVED || id == HierarchyEvent.ANCESTOR_RESIZED)) || ((mask & AWTEvent.HIERARCHY_EVENT_MASK) != 0 && event instanceof HierarchyEvent && id == HierarchyEvent.HIERARCHY_CHANGED) || ((mask & AWTEvent.INPUT_METHOD_EVENT_MASK) != 0 && event instanceof InputMethodEvent) || ((mask & AWTEvent.INVOCATION_EVENT_MASK) != 0 && event instanceof InvocationEvent) || ((mask & AWTEvent.ITEM_EVENT_MASK) != 0 && event instanceof ItemEvent) || ((mask & AWTEvent.KEY_EVENT_MASK) != 0 && event instanceof KeyEvent) || ((mask & AWTEvent.MOUSE_EVENT_MASK) != 0 && event instanceof MouseEvent && (id == MouseEvent.MOUSE_PRESSED || id == MouseEvent.MOUSE_RELEASED || id == MouseEvent.MOUSE_CLICKED || id == MouseEvent.MOUSE_ENTERED || id == MouseEvent.MOUSE_EXITED)) || ((mask & AWTEvent.MOUSE_MOTION_EVENT_MASK) != 0 && event instanceof MouseEvent && (id == MouseEvent.MOUSE_MOVED || id == MouseEvent.MOUSE_DRAGGED)) || ((mask & AWTEvent.MOUSE_WHEEL_EVENT_MASK) != 0 && event instanceof MouseWheelEvent) || ((mask & AWTEvent.PAINT_EVENT_MASK) != 0 && event instanceof PaintEvent) || ((mask & AWTEvent.TEXT_EVENT_MASK) != 0 && event instanceof TextEvent) || ((mask & AWTEvent.WINDOW_EVENT_MASK) != 0 && event instanceof WindowEvent && (id == WindowEvent.WINDOW_OPENED || id == WindowEvent.WINDOW_CLOSING || id == WindowEvent.WINDOW_CLOSED || id == WindowEvent.WINDOW_ICONIFIED || id == WindowEvent.WINDOW_DEICONIFIED || id == WindowEvent.WINDOW_ACTIVATED || id == WindowEvent.WINDOW_DEACTIVATED)) || ((mask & AWTEvent.WINDOW_FOCUS_EVENT_MASK) != 0 && event instanceof WindowEvent && (id == WindowEvent.WINDOW_GAINED_FOCUS || id == WindowEvent.WINDOW_LOST_FOCUS)) || ((mask & AWTEvent.WINDOW_STATE_EVENT_MASK) != 0 && event instanceof WindowEvent && id == WindowEvent.WINDOW_STATE_CHANGED)) ((AWTEventListener) getListener()).eventDispatched(event); }
void function(AWTEvent event) { int id = event == null ? 0 : event.getID(); if (((mask & AWTEvent.ACTION_EVENT_MASK) != 0 && event instanceof ActionEvent) ((mask & AWTEvent.ADJUSTMENT_EVENT_MASK) != 0 && event instanceof AdjustmentEvent) ((mask & AWTEvent.COMPONENT_EVENT_MASK) != 0 && event instanceof ComponentEvent && (id >= ComponentEvent.COMPONENT_FIRST && id <= ComponentEvent.COMPONENT_LAST)) ((mask & AWTEvent.CONTAINER_EVENT_MASK) != 0 && event instanceof ContainerEvent) ((mask & AWTEvent.FOCUS_EVENT_MASK) != 0 && event instanceof FocusEvent) ((mask & AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) != 0 && event instanceof HierarchyEvent && (id == HierarchyEvent.ANCESTOR_MOVED id == HierarchyEvent.ANCESTOR_RESIZED)) ((mask & AWTEvent.HIERARCHY_EVENT_MASK) != 0 && event instanceof HierarchyEvent && id == HierarchyEvent.HIERARCHY_CHANGED) ((mask & AWTEvent.INPUT_METHOD_EVENT_MASK) != 0 && event instanceof InputMethodEvent) ((mask & AWTEvent.INVOCATION_EVENT_MASK) != 0 && event instanceof InvocationEvent) ((mask & AWTEvent.ITEM_EVENT_MASK) != 0 && event instanceof ItemEvent) ((mask & AWTEvent.KEY_EVENT_MASK) != 0 && event instanceof KeyEvent) ((mask & AWTEvent.MOUSE_EVENT_MASK) != 0 && event instanceof MouseEvent && (id == MouseEvent.MOUSE_PRESSED id == MouseEvent.MOUSE_RELEASED id == MouseEvent.MOUSE_CLICKED id == MouseEvent.MOUSE_ENTERED id == MouseEvent.MOUSE_EXITED)) ((mask & AWTEvent.MOUSE_MOTION_EVENT_MASK) != 0 && event instanceof MouseEvent && (id == MouseEvent.MOUSE_MOVED id == MouseEvent.MOUSE_DRAGGED)) ((mask & AWTEvent.MOUSE_WHEEL_EVENT_MASK) != 0 && event instanceof MouseWheelEvent) ((mask & AWTEvent.PAINT_EVENT_MASK) != 0 && event instanceof PaintEvent) ((mask & AWTEvent.TEXT_EVENT_MASK) != 0 && event instanceof TextEvent) ((mask & AWTEvent.WINDOW_EVENT_MASK) != 0 && event instanceof WindowEvent && (id == WindowEvent.WINDOW_OPENED id == WindowEvent.WINDOW_CLOSING id == WindowEvent.WINDOW_CLOSED id == WindowEvent.WINDOW_ICONIFIED id == WindowEvent.WINDOW_DEICONIFIED id == WindowEvent.WINDOW_ACTIVATED id == WindowEvent.WINDOW_DEACTIVATED)) ((mask & AWTEvent.WINDOW_FOCUS_EVENT_MASK) != 0 && event instanceof WindowEvent && (id == WindowEvent.WINDOW_GAINED_FOCUS id == WindowEvent.WINDOW_LOST_FOCUS)) ((mask & AWTEvent.WINDOW_STATE_EVENT_MASK) != 0 && event instanceof WindowEvent && id == WindowEvent.WINDOW_STATE_CHANGED)) ((AWTEventListener) getListener()).eventDispatched(event); }
/** * Forwards events on to the delegate if they meet the event mask. * * @param event the property change event to filter * @throws NullPointerException if the delegate this was created with is null */
Forwards events on to the delegate if they meet the event mask
eventDispatched
{ "repo_name": "unofficial-opensource-apple/gcc_40", "path": "libjava/java/awt/event/AWTEventListenerProxy.java", "license": "gpl-2.0", "size": 6287 }
[ "java.awt.AWTEvent" ]
import java.awt.AWTEvent;
import java.awt.*;
[ "java.awt" ]
java.awt;
723,314
@Override public void notifyChanged(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); }
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/ocm/provider/EdgeItemProvider.java", "license": "apache-2.0", "size": 3185 }
[ "org.eclipse.emf.common.notify.Notification" ]
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,442,282
public static String getFileName(Cursor cursor) { return cursor.getString(cursor.getColumnIndex(BaseFile._ColumnName)); }// getFileName()
static String function(Cursor cursor) { return cursor.getString(cursor.getColumnIndex(BaseFile._ColumnName)); }
/** * Gets filename of {@code cursor}. * * @param cursor * the cursor points to a file. * @return the filename. */
Gets filename of cursor
getFileName
{ "repo_name": "wcmatthysen/android-filechooser", "path": "code/src/group/pals/android/lib/ui/filechooser/providers/BaseFileProviderUtils.java", "license": "mit", "size": 20644 }
[ "android.database.Cursor", "group.pals.android.lib.ui.filechooser.providers.basefile.BaseFileContract" ]
import android.database.Cursor; import group.pals.android.lib.ui.filechooser.providers.basefile.BaseFileContract;
import android.database.*; import group.pals.android.lib.ui.filechooser.providers.basefile.*;
[ "android.database", "group.pals.android" ]
android.database; group.pals.android;
916,874
@ServiceMethod(returns = ReturnType.SINGLE) public ApiContractInner createOrUpdate( String resourceGroupName, String serviceName, String productId, String apiId) { return createOrUpdateAsync(resourceGroupName, serviceName, productId, apiId).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) ApiContractInner function( String resourceGroupName, String serviceName, String productId, String apiId) { return createOrUpdateAsync(resourceGroupName, serviceName, productId, apiId).block(); }
/** * Adds an API to the specified product. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param productId Product identifier. Must be unique in the current API Management service instance. * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current * revision has ;rev=n as a suffix where n is the revision number. * @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 api details. */
Adds an API to the specified product
createOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ProductApisClientImpl.java", "license": "mit", "size": 53563 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.apimanagement.fluent.models.ApiContractInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.fluent.models.ApiContractInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,773,162
public ArrayList<POI> getThem(String url){ Log.d(BonusPackHelper.LOG_TAG, "NominatimPOIProvider:get:"+url); String jString = BonusPackHelper.requestStringFromUrl(url, mUserAgent); if (jString == null) { Log.e(BonusPackHelper.LOG_TAG, "NominatimPOIProvider: request failed."); return null; } try { JSONArray jPlaceIds = new JSONArray(jString); int n = jPlaceIds.length(); ArrayList<POI> pois = new ArrayList<POI>(n); Bitmap thumbnail = null; for (int i=0; i<n; i++){ JSONObject jPlace = jPlaceIds.getJSONObject(i); POI poi = new POI(POI.POI_SERVICE_NOMINATIM); poi.mId = jPlace.optLong("osm_id"); poi.mLocation = new GeoPoint(jPlace.getDouble("lat"), jPlace.getDouble("lon")); poi.mCategory = jPlace.optString("class"); poi.mType = jPlace.getString("type"); poi.mDescription = jPlace.optString("display_name"); poi.mThumbnailPath = jPlace.optString("icon", null); if (i==0 && poi.mThumbnailPath != null) { //first POI, and we have a thumbnail: load it thumbnail = BonusPackHelper.loadBitmap(poi.mThumbnailPath); } poi.mThumbnail = thumbnail; pois.add(poi); } return pois; } catch (JSONException e) { e.printStackTrace(); return null; } }
ArrayList<POI> function(String url){ Log.d(BonusPackHelper.LOG_TAG, STR+url); String jString = BonusPackHelper.requestStringFromUrl(url, mUserAgent); if (jString == null) { Log.e(BonusPackHelper.LOG_TAG, STR); return null; } try { JSONArray jPlaceIds = new JSONArray(jString); int n = jPlaceIds.length(); ArrayList<POI> pois = new ArrayList<POI>(n); Bitmap thumbnail = null; for (int i=0; i<n; i++){ JSONObject jPlace = jPlaceIds.getJSONObject(i); POI poi = new POI(POI.POI_SERVICE_NOMINATIM); poi.mId = jPlace.optLong(STR); poi.mLocation = new GeoPoint(jPlace.getDouble("lat"), jPlace.getDouble("lon")); poi.mCategory = jPlace.optString("class"); poi.mType = jPlace.getString("type"); poi.mDescription = jPlace.optString(STR); poi.mThumbnailPath = jPlace.optString("icon", null); if (i==0 && poi.mThumbnailPath != null) { thumbnail = BonusPackHelper.loadBitmap(poi.mThumbnailPath); } poi.mThumbnail = thumbnail; pois.add(poi); } return pois; } catch (JSONException e) { e.printStackTrace(); return null; } }
/** Low-level API to get a list of POI. * @param url full URL request. Assumes * @return the list of POI, of null if technical issue. */
Low-level API to get a list of POI
getThem
{ "repo_name": "spyhunter99/osmbonuspack", "path": "OSMBonusPack/src/main/java/org/osmdroid/bonuspack/location/NominatimPOIProvider.java", "license": "lgpl-3.0", "size": 6412 }
[ "android.graphics.Bitmap", "android.util.Log", "java.util.ArrayList", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject", "org.osmdroid.bonuspack.utils.BonusPackHelper", "org.osmdroid.util.GeoPoint" ]
import android.graphics.Bitmap; import android.util.Log; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.osmdroid.bonuspack.utils.BonusPackHelper; import org.osmdroid.util.GeoPoint;
import android.graphics.*; import android.util.*; import java.util.*; import org.json.*; import org.osmdroid.bonuspack.utils.*; import org.osmdroid.util.*;
[ "android.graphics", "android.util", "java.util", "org.json", "org.osmdroid.bonuspack", "org.osmdroid.util" ]
android.graphics; android.util; java.util; org.json; org.osmdroid.bonuspack; org.osmdroid.util;
364,613
private static void deleteNodesNotOnPath(final View view, final ViewNode startNode, final ViewNode targetNode) { final Set<ViewNode> succs = GraphAlgorithms.getSuccessors(startNode); final Set<ViewNode> preds = GraphAlgorithms.getPredecessors(targetNode); final HashSet<ViewNode> combined = new HashSet<ViewNode>(succs); combined.retainAll(preds); combined.add(startNode); combined.add(targetNode); final List<ViewNode> nodesToDelete = new ArrayList<ViewNode>(); for (final ViewNode node : view.getGraph().getNodes()) { if (!combined.contains(node)) { nodesToDelete.add(node); } } for (final ViewNode node : nodesToDelete) { view.deleteNode(node); } }
static void function(final View view, final ViewNode startNode, final ViewNode targetNode) { final Set<ViewNode> succs = GraphAlgorithms.getSuccessors(startNode); final Set<ViewNode> preds = GraphAlgorithms.getPredecessors(targetNode); final HashSet<ViewNode> combined = new HashSet<ViewNode>(succs); combined.retainAll(preds); combined.add(startNode); combined.add(targetNode); final List<ViewNode> nodesToDelete = new ArrayList<ViewNode>(); for (final ViewNode node : view.getGraph().getNodes()) { if (!combined.contains(node)) { nodesToDelete.add(node); } } for (final ViewNode node : nodesToDelete) { view.deleteNode(node); } }
/** * Deletes all nodes that are not on the path. * * @param view View from which the nodes are deleted. * @param startNode Start node of the path. * @param targetNode Target node of the path. */
Deletes all nodes that are not on the path
deleteNodesNotOnPath
{ "repo_name": "dgrif/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/standardplugins/pathfinder/PathFinder.java", "license": "apache-2.0", "size": 28476 }
[ "com.google.security.zynamics.binnavi.API", "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import com.google.security.zynamics.binnavi.API; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set;
import com.google.security.zynamics.binnavi.*; import java.util.*;
[ "com.google.security", "java.util" ]
com.google.security; java.util;
2,128,971
int delete(Param[] where) throws JDOException;
int delete(Param[] where) throws JDOException;
/** * <p>Delete records.</p> * @param where Param[] Values for the filter clause * @return int Count of deleted records * @throws JDOException */
Delete records
delete
{ "repo_name": "sergiomt/judal", "path": "core/src/main/java/org/judal/storage/table/SchemalessIndexableTable.java", "license": "apache-2.0", "size": 1783 }
[ "javax.jdo.JDOException", "org.judal.storage.Param" ]
import javax.jdo.JDOException; import org.judal.storage.Param;
import javax.jdo.*; import org.judal.storage.*;
[ "javax.jdo", "org.judal.storage" ]
javax.jdo; org.judal.storage;
1,470,899
public void addCampaign(BasicCommand c) throws Exception { logger.info("ADDING campaign: {}/{}",c.owner, c.target); Campaign camp = WebCampaign.getInstance().db.getCampaign(c.owner, c.target); BasicCommand m = new BasicCommand(); m.owner = c.owner; m.to = c.from; m.from = Configuration.instanceName; m.id = c.id; m.type = c.type; if (camp == null) { m.status = "Error"; m.msg = "Campaign load failed, could not find " + c.owner + "/" + c.target; responseQueue.add(m); } else { Configuration.getInstance().deleteCampaign(camp.owner, camp.adId); Configuration.getInstance().addCampaign(camp); // System.out.println(camp.toJson()); m.msg = "Campaign " + camp.owner + "/" + camp.adId + " loaded ok"; m.name = "AddCampaign Response"; logger.info("AddCampaign {} by {}", m.msg, c.owner); responseQueue.add(m); } logger.info("Responding with: {}",m.msg); }
void function(BasicCommand c) throws Exception { logger.info(STR,c.owner, c.target); Campaign camp = WebCampaign.getInstance().db.getCampaign(c.owner, c.target); BasicCommand m = new BasicCommand(); m.owner = c.owner; m.to = c.from; m.from = Configuration.instanceName; m.id = c.id; m.type = c.type; if (camp == null) { m.status = "Error"; m.msg = STR + c.owner + "/" + c.target; responseQueue.add(m); } else { Configuration.getInstance().deleteCampaign(camp.owner, camp.adId); Configuration.getInstance().addCampaign(camp); m.msg = STR + camp.owner + "/" + camp.adId + STR; m.name = STR; logger.info(STR, m.msg, c.owner); responseQueue.add(m); } logger.info(STR,m.msg); }
/** * Add a campaign from REDIS * * @param c * BasiCommand. The command to add * @throws Exception * on REDIS errors. */
Add a campaign from REDIS
addCampaign
{ "repo_name": "benmfaul/XRTB", "path": "src/com/xrtb/bidder/Controller.java", "license": "apache-2.0", "size": 35441 }
[ "com.xrtb.commands.BasicCommand", "com.xrtb.common.Campaign", "com.xrtb.common.Configuration" ]
import com.xrtb.commands.BasicCommand; import com.xrtb.common.Campaign; import com.xrtb.common.Configuration;
import com.xrtb.commands.*; import com.xrtb.common.*;
[ "com.xrtb.commands", "com.xrtb.common" ]
com.xrtb.commands; com.xrtb.common;
908,302
public Color getFaderColor () { return this.faderColorProperty.get (); }
Color function () { return this.faderColorProperty.get (); }
/** * Get the current fader color for the text. * * @return The color */
Get the current fader color for the text
getFaderColor
{ "repo_name": "git-moss/Push2Display", "path": "src/push22bitwig/LayoutSettings.java", "license": "lgpl-3.0", "size": 8208 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,501,897
@Test public void testAttemptToSetTableStatusToAvailableNullEtag() throws NotFoundException{ // This should insert a row for this table. String resetToken = tableStatusDAO.resetTableStatusToProcessing(tableIdNoVersion); // Status should start as processing TableStatus status = tableStatusDAO.getTableStatus(tableIdNoVersion); assertNotNull(status); assertEquals("123", status.getTableId()); assertEquals(TableState.PROCESSING, status.getState()); assertNotNull(status.getChangedOn()); // Not make available tableStatusDAO.attemptToSetTableStatusToAvailable(tableIdNoVersion, resetToken, null); // the state should have changed status = tableStatusDAO.getTableStatus(tableIdNoVersion); assertNotNull(status); assertEquals("123", status.getTableId()); assertEquals(TableState.AVAILABLE, status.getState()); assertNotNull(status.getTotalTimeMS()); assertEquals(null, status.getLastTableChangeEtag()); }
void function() throws NotFoundException{ String resetToken = tableStatusDAO.resetTableStatusToProcessing(tableIdNoVersion); TableStatus status = tableStatusDAO.getTableStatus(tableIdNoVersion); assertNotNull(status); assertEquals("123", status.getTableId()); assertEquals(TableState.PROCESSING, status.getState()); assertNotNull(status.getChangedOn()); tableStatusDAO.attemptToSetTableStatusToAvailable(tableIdNoVersion, resetToken, null); status = tableStatusDAO.getTableStatus(tableIdNoVersion); assertNotNull(status); assertEquals("123", status.getTableId()); assertEquals(TableState.AVAILABLE, status.getState()); assertNotNull(status.getTotalTimeMS()); assertEquals(null, status.getLastTableChangeEtag()); }
/** * This is a test for PLFM-2634 and PLFM-2636 * @throws NotFoundException */
This is a test for PLFM-2634 and PLFM-2636
testAttemptToSetTableStatusToAvailableNullEtag
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "lib/jdomodels/src/test/java/org/sagebionetworks/repo/model/dbo/dao/table/TableStatusDAOImplTest.java", "license": "apache-2.0", "size": 24994 }
[ "org.junit.jupiter.api.Assertions", "org.sagebionetworks.repo.model.table.TableState", "org.sagebionetworks.repo.model.table.TableStatus", "org.sagebionetworks.repo.web.NotFoundException" ]
import org.junit.jupiter.api.Assertions; import org.sagebionetworks.repo.model.table.TableState; import org.sagebionetworks.repo.model.table.TableStatus; import org.sagebionetworks.repo.web.NotFoundException;
import org.junit.jupiter.api.*; import org.sagebionetworks.repo.model.table.*; import org.sagebionetworks.repo.web.*;
[ "org.junit.jupiter", "org.sagebionetworks.repo" ]
org.junit.jupiter; org.sagebionetworks.repo;
1,008,060
public Set<ArrayDataMatrixFile> getPredecessorArrayDataMatrixFiles() { Set<AbstractSampleDataRelationshipNode> nodes = getPredecessorsOfType(SdrfNodeType.ARRAY_DATA_MATRIX, false); HashSet<ArrayDataMatrixFile> result = new HashSet<ArrayDataMatrixFile>(nodes.size()); for (AbstractSampleDataRelationshipNode node : nodes) { result.add((ArrayDataMatrixFile) node); } return result; }
Set<ArrayDataMatrixFile> function() { Set<AbstractSampleDataRelationshipNode> nodes = getPredecessorsOfType(SdrfNodeType.ARRAY_DATA_MATRIX, false); HashSet<ArrayDataMatrixFile> result = new HashSet<ArrayDataMatrixFile>(nodes.size()); for (AbstractSampleDataRelationshipNode node : nodes) { result.add((ArrayDataMatrixFile) node); } return result; }
/** * Returns all <code>DerivedArrayDataMatrixFiles</code> that this node originated from (only immediate predecessors, * not searched recursively). * * @return the originating <code>DerivedArrayDataMatrixFiles</code>. */
Returns all <code>DerivedArrayDataMatrixFiles</code> that this node originated from (only immediate predecessors, not searched recursively)
getPredecessorArrayDataMatrixFiles
{ "repo_name": "NCIP/caarray", "path": "software/caarray-common.jar/src/main/java/gov/nih/nci/caarray/magetab/sdrf/AbstractSampleDataRelationshipNode.java", "license": "bsd-3-clause", "size": 15344 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,625,736
@CalledByNative private static int getMinOutputFrameSize(int sampleRate, int channels) { int channelConfig; if (channels == 1) { channelConfig = AudioFormat.CHANNEL_OUT_MONO; } else if (channels == 2) { channelConfig = AudioFormat.CHANNEL_OUT_STEREO; } else { return -1; } return AudioTrack.getMinBufferSize( sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT) / 2 / channels; }
static int function(int sampleRate, int channels) { int channelConfig; if (channels == 1) { channelConfig = AudioFormat.CHANNEL_OUT_MONO; } else if (channels == 2) { channelConfig = AudioFormat.CHANNEL_OUT_STEREO; } else { return -1; } return AudioTrack.getMinBufferSize( sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT) / 2 / channels; }
/** * Returns the minimum frame size required for audio output. * * @param sampleRate sampling rate * @param channels number of channels */
Returns the minimum frame size required for audio output
getMinOutputFrameSize
{ "repo_name": "gendeld/android-chromium-view", "path": "media/src/org/chromium/media/AudioManagerAndroid.java", "license": "mit", "size": 5676 }
[ "android.media.AudioFormat", "android.media.AudioTrack" ]
import android.media.AudioFormat; import android.media.AudioTrack;
import android.media.*;
[ "android.media" ]
android.media;
813,708
public static void encode(ByteBuffer raw, CharBuffer encoded) { byte[] raw3 = new byte[3]; byte[] enc4 = new byte[4]; while (raw.hasRemaining()) { int rem = Math.min(3, raw.remaining()); raw.get(raw3, 0, rem); Base64.encode3to4(enc4, raw3, rem, Base64.NO_OPTIONS); for (int i = 0; i < 4; i++) { encoded.put((char) (enc4[i] & 0xFF)); } } // end input remaining }
static void function(ByteBuffer raw, CharBuffer encoded) { byte[] raw3 = new byte[3]; byte[] enc4 = new byte[4]; while (raw.hasRemaining()) { int rem = Math.min(3, raw.remaining()); raw.get(raw3, 0, rem); Base64.encode3to4(enc4, raw3, rem, Base64.NO_OPTIONS); for (int i = 0; i < 4; i++) { encoded.put((char) (enc4[i] & 0xFF)); } } }
/** * Performs Base64 encoding on the <code>raw</code> ByteBuffer, writing it * to the <code>encoded</code> CharBuffer. This is an experimental feature. * Currently it does not pass along any options (such as * {@link #DO_BREAK_LINES} or {@link #GZIP}. * * @param raw * input buffer * @param encoded * output buffer * @since 2.3 */
Performs Base64 encoding on the <code>raw</code> ByteBuffer, writing it to the <code>encoded</code> CharBuffer. This is an experimental feature. Currently it does not pass along any options (such as <code>#DO_BREAK_LINES</code> or <code>#GZIP</code>
encode
{ "repo_name": "fcrepo3/fcrepo", "path": "fcrepo-security/fcrepo-security-jaas/src/main/java/org/fcrepo/server/security/jaas/util/Base64.java", "license": "apache-2.0", "size": 82889 }
[ "java.nio.ByteBuffer", "java.nio.CharBuffer" ]
import java.nio.ByteBuffer; import java.nio.CharBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
228,706
public IDataset getComponent();
IDataset function();
/** * Details of the component of the sample and/or can * <p> * <b>Dimensions:</b> 1: n_comp; * </p> * * @return the value. */
Details of the component of the sample and/or can Dimensions: 1: n_comp;
getComponent
{ "repo_name": "colinpalmer/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsample.java", "license": "epl-1.0", "size": 48949 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,633,357
private GridBagConstraints getUrlConstraints() { return getGBC(1, m_rowCounter++, 1, 1, GridBagConstraints.NONE, 0, 0, 2, 10, 0, 10, GridBagConstraints.CENTER, 0, 0); }
GridBagConstraints function() { return getGBC(1, m_rowCounter++, 1, 1, GridBagConstraints.NONE, 0, 0, 2, 10, 0, 10, GridBagConstraints.CENTER, 0, 0); }
/** * gets constraints used by url label * @return GridBagConstraints object */
gets constraints used by url label
getUrlConstraints
{ "repo_name": "braully/adempiere", "path": "com.kkalice.adempiere.migrate/src/com/kkalice/adempiere/migrate/HelpAbout.java", "license": "gpl-2.0", "size": 11532 }
[ "java.awt.GridBagConstraints" ]
import java.awt.GridBagConstraints;
import java.awt.*;
[ "java.awt" ]
java.awt;
506,241
public JSONObject getJson() throws JSONException { JSONObject json = new JSONObject(); json.put("from", from.getComponent()); json.put("to", to.getComponent()); json.put("stream", stream); json.put("loopBack",loopBack); JSONArray jarr = new JSONArray(); jarr.put(from.getCoordinatesJson()); for (WayPoint wp : path) { jarr.put(wp.getCoordinatesJson()); } jarr.put(to.getCoordinatesJson()); // json.put("path", jarr); jarr = new JSONArray(); for (PathSegment segment : segments) { jarr.put(segment.asJson()); } json.put("segments", jarr); return json; }
JSONObject function() throws JSONException { JSONObject json = new JSONObject(); json.put("from", from.getComponent()); json.put("to", to.getComponent()); json.put(STR, stream); json.put(STR,loopBack); JSONArray jarr = new JSONArray(); jarr.put(from.getCoordinatesJson()); for (WayPoint wp : path) { jarr.put(wp.getCoordinatesJson()); } jarr.put(to.getCoordinatesJson()); jarr = new JSONArray(); for (PathSegment segment : segments) { jarr.put(segment.asJson()); } json.put(STR, jarr); return json; }
/** * Return a Json object representing the receiver's state * @return a Json object representing the receiver's state * @throws JSONException */
Return a Json object representing the receiver's state
getJson
{ "repo_name": "chrisGerken/gumbo", "path": "gumbo-core/src/main/java/com/gerken/gumbo/graph/GraphEdge.java", "license": "apache-2.0", "size": 4361 }
[ "org.codehaus.jettison.json.JSONArray", "org.codehaus.jettison.json.JSONException", "org.codehaus.jettison.json.JSONObject" ]
import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject;
import org.codehaus.jettison.json.*;
[ "org.codehaus.jettison" ]
org.codehaus.jettison;
2,015,257
public ScriptGroup[] searchRootGroupsInZone(String displayNamePattern, String zone, int maxItems, int skipCount) { return searchRootGroupsInZone(displayNamePattern, zone, new ScriptPagingDetails(maxItems, skipCount), null); }
ScriptGroup[] function(String displayNamePattern, String zone, int maxItems, int skipCount) { return searchRootGroupsInZone(displayNamePattern, zone, new ScriptPagingDetails(maxItems, skipCount), null); }
/** * Search the root groups, those without a parent group. * * @param maxItems Maximum number of items returned. * @param skipCount number of items to skip. * @return The root groups (empty if there are no root groups) */
Search the root groups, those without a parent group
searchRootGroupsInZone
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/authority/script/ScriptAuthorityService.java", "license": "lgpl-3.0", "size": 22539 }
[ "org.alfresco.util.ScriptPagingDetails" ]
import org.alfresco.util.ScriptPagingDetails;
import org.alfresco.util.*;
[ "org.alfresco.util" ]
org.alfresco.util;
837,001
public static void searchJid(Vector params, String jud_server) { //stringa da testare String xml = "<iq type='set' id='jud_search' to='"+jud_server+"' ><query xmlns='jabber:iq:search' ><first>"+params.elementAt(0)+"</first><last>"+params.elementAt(1)+"</last><nick>"+params.elementAt(2)+"</nick><email>"+params.elementAt(3)+"</email></query></iq>"; Datas.writerThread.write(xml); //il from?? }
static void function(Vector params, String jud_server) { String xml = STR+jud_server+STR+params.elementAt(0)+STR+params.elementAt(1)+STR+params.elementAt(2)+STR+params.elementAt(3)+STR; Datas.writerThread.write(xml); }
/** * get the jid found * @param params order: username, first, last, nick, mail; if empty "" * @return the jid */
get the jid found
searchJid
{ "repo_name": "a-iv/jmc", "path": "src/jabber/roster/Jud.java", "license": "gpl-2.0", "size": 3478 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,761,942
@SuppressWarnings({"deprecation"}) protected void resetLog4j(Level log4jLevel, boolean logToFile, String cat, String... cats) throws IgniteCheckedException { for (String c : F.concat(false, cat, F.asList(cats))) Logger.getLogger(c).setLevel(log4jLevel); if (logToFile) { Logger log4j = Logger.getRootLogger(); log4j.removeAllAppenders(); // Console appender. ConsoleAppender c = new ConsoleAppender(); c.setName("CONSOLE_ERR"); c.setTarget("System.err"); c.setThreshold(Priority.WARN); c.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n")); c.activateOptions(); log4j.addAppender(c); // File appender. RollingFileAppender file = new RollingFileAppender(); file.setName("FILE"); file.setThreshold(log4jLevel); file.setFile(home() + "/work/log/ignite.log"); file.setAppend(false); file.setMaxFileSize("10MB"); file.setMaxBackupIndex(10); file.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n")); file.activateOptions(); log4j.addAppender(file); } }
@SuppressWarnings({STR}) void function(Level log4jLevel, boolean logToFile, String cat, String... cats) throws IgniteCheckedException { for (String c : F.concat(false, cat, F.asList(cats))) Logger.getLogger(c).setLevel(log4jLevel); if (logToFile) { Logger log4j = Logger.getRootLogger(); log4j.removeAllAppenders(); ConsoleAppender c = new ConsoleAppender(); c.setName(STR); c.setTarget(STR); c.setThreshold(Priority.WARN); c.setLayout(new PatternLayout(STR)); c.activateOptions(); log4j.addAppender(c); RollingFileAppender file = new RollingFileAppender(); file.setName("FILE"); file.setThreshold(log4jLevel); file.setFile(home() + STR); file.setAppend(false); file.setMaxFileSize("10MB"); file.setMaxBackupIndex(10); file.setLayout(new PatternLayout(STR)); file.activateOptions(); log4j.addAppender(file); } }
/** * Resets log4j programmatically. * * @param log4jLevel Level. * @param logToFile If {@code true}, then log to file under "work/log" folder. * @param cat Category. * @param cats Additional categories. */
Resets log4j programmatically
resetLog4j
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java", "license": "apache-2.0", "size": 99617 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.typedef.F", "org.apache.log4j.ConsoleAppender", "org.apache.log4j.Level", "org.apache.log4j.Logger", "org.apache.log4j.PatternLayout", "org.apache.log4j.Priority", "org.apache.log4j.RollingFileAppender" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.F; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.Priority; import org.apache.log4j.RollingFileAppender;
import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.log4j.*;
[ "org.apache.ignite", "org.apache.log4j" ]
org.apache.ignite; org.apache.log4j;
1,267,858
public void setPriority(Number priority) { this.priority = priority; }
void function(Number priority) { this.priority = priority; }
/** * the priority * * @param priority the Number. */
the priority
setPriority
{ "repo_name": "NABUCCO/org.nabucco.framework.importing", "path": "org.nabucco.framework.importing.facade.message/src/main/gen/org/nabucco/framework/importing/facade/message/maintain/ImportConfigurationLinkRq.java", "license": "epl-1.0", "size": 9797 }
[ "org.nabucco.framework.base.facade.datatype.Number" ]
import org.nabucco.framework.base.facade.datatype.Number;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,084,319
public Chronology getChronology(Object object, Chronology chrono) { return DateTimeUtils.getChronology(chrono); }
Chronology function(Object object, Chronology chrono) { return DateTimeUtils.getChronology(chrono); }
/** * Extracts the chronology from an object of this converter's type * where the chronology is specified. * <p> * This implementation returns the chronology specified, or the * ISO chronology in the default zone if null passed in. * * @param object the object to convert * @param chrono the chronology to use, null means ISO default * @return the chronology, never null */
Extracts the chronology from an object of this converter's type where the chronology is specified. This implementation returns the chronology specified, or the ISO chronology in the default zone if null passed in
getChronology
{ "repo_name": "aparo/scalajs-joda", "path": "src/main/scala/org/joda/time/convert/AbstractConverter.java", "license": "apache-2.0", "size": 6163 }
[ "org.joda.time.Chronology", "org.joda.time.DateTimeUtils" ]
import org.joda.time.Chronology; import org.joda.time.DateTimeUtils;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,819,657
public void setLaborLedgerPendingEntryDao(LaborLedgerPendingEntryDao laborLedgerPendingEntryDao) { this.laborLedgerPendingEntryDao = laborLedgerPendingEntryDao; }
void function(LaborLedgerPendingEntryDao laborLedgerPendingEntryDao) { this.laborLedgerPendingEntryDao = laborLedgerPendingEntryDao; }
/** * Sets the laborLedgerPendingEntryDao attribute value. * * @param laborLedgerPendingEntryDao The laborLedgerPendingEntryDao to set. */
Sets the laborLedgerPendingEntryDao attribute value
setLaborLedgerPendingEntryDao
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/service/impl/LaborLedgerPendingEntryServiceImpl.java", "license": "agpl-3.0", "size": 9290 }
[ "org.kuali.kfs.module.ld.dataaccess.LaborLedgerPendingEntryDao" ]
import org.kuali.kfs.module.ld.dataaccess.LaborLedgerPendingEntryDao;
import org.kuali.kfs.module.ld.dataaccess.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,606,587
private void setHeaderRow() { table.getRowFormatter().setStyleName(0, "ode-ProjectHeaderRow"); HorizontalPanel emailHeader = new HorizontalPanel(); final Label emailHeaderLabel = new Label("User Email"); emailHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); emailHeader.add(emailHeaderLabel); emailHeader.add(nameSortIndicator); table.setWidget(0, 0, emailHeader); HorizontalPanel uidHeader = new HorizontalPanel(); final Label uidHeaderLabel = new Label("UID"); uidHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); uidHeader.add(uidHeaderLabel); table.setWidget(0, 1, uidHeader); HorizontalPanel adminHeader = new HorizontalPanel(); final Label adminHeaderLabel = new Label("isAdmin?"); adminHeaderLabel.addStyleName("ode-ProjectHeaderLabel"); adminHeader.add(adminHeaderLabel); table.setWidget(0, 2, adminHeader); HorizontalPanel visitedHeader = new HorizontalPanel(); final Label visitedLabel = new Label("Visited"); visitedLabel.addStyleName("ode-ProjectHeaderLabel"); visitedHeader.add(visitedLabel); visitedHeader.add(visitedSortIndicator); table.setWidget(0, 3, visitedHeader);
void function() { table.getRowFormatter().setStyleName(0, STR); HorizontalPanel emailHeader = new HorizontalPanel(); final Label emailHeaderLabel = new Label(STR); emailHeaderLabel.addStyleName(STR); emailHeader.add(emailHeaderLabel); emailHeader.add(nameSortIndicator); table.setWidget(0, 0, emailHeader); HorizontalPanel uidHeader = new HorizontalPanel(); final Label uidHeaderLabel = new Label("UID"); uidHeaderLabel.addStyleName(STR); uidHeader.add(uidHeaderLabel); table.setWidget(0, 1, uidHeader); HorizontalPanel adminHeader = new HorizontalPanel(); final Label adminHeaderLabel = new Label(STR); adminHeaderLabel.addStyleName(STR); adminHeader.add(adminHeaderLabel); table.setWidget(0, 2, adminHeader); HorizontalPanel visitedHeader = new HorizontalPanel(); final Label visitedLabel = new Label(STR); visitedLabel.addStyleName(STR); visitedHeader.add(visitedLabel); visitedHeader.add(visitedSortIndicator); table.setWidget(0, 3, visitedHeader);
/** * Adds the header row to the table. * */
Adds the header row to the table
setHeaderRow
{ "repo_name": "ewpatton/appinventor-sources", "path": "appinventor/appengine/src/com/google/appinventor/client/AdminUserList.java", "license": "apache-2.0", "size": 15582 }
[ "com.google.gwt.user.client.ui.HorizontalPanel", "com.google.gwt.user.client.ui.Label" ]
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
982,707
public void setBackgroundColor(Color newColor) { chatLog.setBackground(newColor); lowerPanel.setBackground(newColor); Color dialC = newColor.darker(); messageInput.setBackground(dialC); }
void function(Color newColor) { chatLog.setBackground(newColor); lowerPanel.setBackground(newColor); Color dialC = newColor.darker(); messageInput.setBackground(dialC); }
/** * Sets the background color of the new panel * @param newColor */
Sets the background color of the new panel
setBackgroundColor
{ "repo_name": "nanotane/Graphic-Console", "path": "GraphicalConsole/src/mainFiles/ConsoleGraphics.java", "license": "mit", "size": 14433 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
205,924
public synchronized void unregister() { MBeanRegistrar.unregister(_objectName); _objectName = null; }
synchronized void function() { MBeanRegistrar.unregister(_objectName); _objectName = null; }
/** * Unregister the MBean and clean up object name record. * Note that all the metric data is kept even after unregister. */
Unregister the MBean and clean up object name record. Note that all the metric data is kept even after unregister
unregister
{ "repo_name": "dasahcc/helix", "path": "metrics-common/src/main/java/org/apache/helix/monitoring/mbeans/dynamicMBeans/DynamicMBeanProvider.java", "license": "apache-2.0", "size": 9340 }
[ "org.apache.helix.monitoring.mbeans.MBeanRegistrar" ]
import org.apache.helix.monitoring.mbeans.MBeanRegistrar;
import org.apache.helix.monitoring.mbeans.*;
[ "org.apache.helix" ]
org.apache.helix;
2,526,652
Set<String> getPropertyKeysIncludingProtectionSchemes() { return getInternalNiFiProperties().getPropertyKeys(); }
Set<String> getPropertyKeysIncludingProtectionSchemes() { return getInternalNiFiProperties().getPropertyKeys(); }
/** * Returns the complete set of property keys, including any protection keys (i.e. 'x.y.z.protected'). * * @return the set of property keys */
Returns the complete set of property keys, including any protection keys (i.e. 'x.y.z.protected')
getPropertyKeysIncludingProtectionSchemes
{ "repo_name": "YolandaMDavis/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-properties-loader/src/main/java/org/apache/nifi/properties/ProtectedNiFiProperties.java", "license": "apache-2.0", "size": 23084 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,886,923
void enterContinueStatement(@NotNull Java8Parser.ContinueStatementContext ctx);
void enterContinueStatement(@NotNull Java8Parser.ContinueStatementContext ctx);
/** * Enter a parse tree produced by {@link Java8Parser#continueStatement}. * * @param ctx the parse tree */
Enter a parse tree produced by <code>Java8Parser#continueStatement</code>
enterContinueStatement
{ "repo_name": "BigDaddy-Germany/WHOAMI", "path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java", "license": "mit", "size": 97945 }
[ "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;
100,376
public int partition(Object key) { GridAffinityAssignmentCache aff0 = aff; if (aff0 == null) throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name()); return aff0.partition(key); }
int function(Object key) { GridAffinityAssignmentCache aff0 = aff; if (aff0 == null) throw new IgniteException(FAILED_TO_FIND_CACHE_ERR_MSG + cctx.name()); return aff0.partition(key); }
/** * NOTE: Use this method always when you need to calculate partition id for * a key provided by user. It's required since we should apply affinity mapper * logic in order to find a key that will eventually be passed to affinity function. * * @param key Key. * @return Partition. */
a key provided by user. It's required since we should apply affinity mapper logic in order to find a key that will eventually be passed to affinity function
partition
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java", "license": "apache-2.0", "size": 14580 }
[ "org.apache.ignite.IgniteException", "org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache" ]
import org.apache.ignite.IgniteException; import org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.affinity.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,548,201
public static double getDouble(Field field, Object obj) { return Reflective.getDouble(field, obj); }
static double function(Field field, Object obj) { return Reflective.getDouble(field, obj); }
/** * Gets the value of an instance <code>double</code> field. * * @param field Field object whose value is returned. * @param obj the object to extract the <code>double</code> value from * @return the value of the <code>double</code> field */
Gets the value of an instance <code>double</code> field
getDouble
{ "repo_name": "jbachorik/btrace", "path": "btrace-core/src/main/java/org/openjdk/btrace/core/BTraceUtils.java", "license": "gpl-2.0", "size": 226306 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,052,345
public static ShapePainter convertFillAndStroke(Element e, ShapeNode node, BridgeContext ctx) { Shape shape = node.getShape(); if (shape == null) return null; Paint fillPaint = convertFillPaint (e, node, ctx); FillShapePainter fp = new FillShapePainter(shape); fp.setPaint(fillPaint); Stroke stroke = convertStroke (e); if (stroke == null) return fp; Paint strokePaint = convertStrokePaint(e, node, ctx); StrokeShapePainter sp = new StrokeShapePainter(shape); sp.setStroke(stroke); sp.setPaint(strokePaint); CompositeShapePainter cp = new CompositeShapePainter(shape); cp.addShapePainter(fp); cp.addShapePainter(sp); return cp; }
static ShapePainter function(Element e, ShapeNode node, BridgeContext ctx) { Shape shape = node.getShape(); if (shape == null) return null; Paint fillPaint = convertFillPaint (e, node, ctx); FillShapePainter fp = new FillShapePainter(shape); fp.setPaint(fillPaint); Stroke stroke = convertStroke (e); if (stroke == null) return fp; Paint strokePaint = convertStrokePaint(e, node, ctx); StrokeShapePainter sp = new StrokeShapePainter(shape); sp.setStroke(stroke); sp.setPaint(strokePaint); CompositeShapePainter cp = new CompositeShapePainter(shape); cp.addShapePainter(fp); cp.addShapePainter(sp); return cp; }
/** * Returns a <tt>ShapePainter</tt> defined on the specified element and * for the specified shape node, and using the specified bridge * context. * * @param e the element interested in a shape painter * @param node the shape node * @param ctx the bridge context */
Returns a ShapePainter defined on the specified element and for the specified shape node, and using the specified bridge context
convertFillAndStroke
{ "repo_name": "iconfinder/batik", "path": "sources/org/apache/batik/bridge/PaintServer.java", "license": "apache-2.0", "size": 24302 }
[ "java.awt.Paint", "java.awt.Shape", "java.awt.Stroke", "org.apache.batik.gvt.CompositeShapePainter", "org.apache.batik.gvt.FillShapePainter", "org.apache.batik.gvt.ShapeNode", "org.apache.batik.gvt.ShapePainter", "org.apache.batik.gvt.StrokeShapePainter", "org.w3c.dom.Element" ]
import java.awt.Paint; import java.awt.Shape; import java.awt.Stroke; import org.apache.batik.gvt.CompositeShapePainter; import org.apache.batik.gvt.FillShapePainter; import org.apache.batik.gvt.ShapeNode; import org.apache.batik.gvt.ShapePainter; import org.apache.batik.gvt.StrokeShapePainter; import org.w3c.dom.Element;
import java.awt.*; import org.apache.batik.gvt.*; import org.w3c.dom.*;
[ "java.awt", "org.apache.batik", "org.w3c.dom" ]
java.awt; org.apache.batik; org.w3c.dom;
1,407,075
public KualiInteger getSourceBaseBudgetExpenseTotal() { KualiInteger total = KualiInteger.ZERO; AccountingDocumentRuleHelperService accountingDocumentRuleUtil = SpringContext.getBean(AccountingDocumentRuleHelperService.class); for (Iterator iter = sourceAccountingLines.iterator(); iter.hasNext(); ) { BudgetAdjustmentAccountingLine line = (BudgetAdjustmentAccountingLine) iter.next(); if (accountingDocumentRuleUtil.isExpense(line)) { total = total.add(line.getBaseBudgetAdjustmentAmount()); } } return total; }
KualiInteger function() { KualiInteger total = KualiInteger.ZERO; AccountingDocumentRuleHelperService accountingDocumentRuleUtil = SpringContext.getBean(AccountingDocumentRuleHelperService.class); for (Iterator iter = sourceAccountingLines.iterator(); iter.hasNext(); ) { BudgetAdjustmentAccountingLine line = (BudgetAdjustmentAccountingLine) iter.next(); if (accountingDocumentRuleUtil.isExpense(line)) { total = total.add(line.getBaseBudgetAdjustmentAmount()); } } return total; }
/** * Returns the total base budget expense amount from the source lines. * * @return KualiDecimal */
Returns the total base budget expense amount from the source lines
getSourceBaseBudgetExpenseTotal
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/BudgetAdjustmentDocument.java", "license": "agpl-3.0", "size": 50598 }
[ "java.util.Iterator", "org.kuali.kfs.fp.businessobject.BudgetAdjustmentAccountingLine", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.kfs.sys.document.service.AccountingDocumentRuleHelperService", "org.kuali.rice.core.api.util.type.KualiInteger" ]
import java.util.Iterator; import org.kuali.kfs.fp.businessobject.BudgetAdjustmentAccountingLine; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.kfs.sys.document.service.AccountingDocumentRuleHelperService; import org.kuali.rice.core.api.util.type.KualiInteger;
import java.util.*; import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.sys.context.*; import org.kuali.kfs.sys.document.service.*; import org.kuali.rice.core.api.util.type.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
69,739
public String[] getValues(String key, String delimiter) { String value = params.get(key); if (value != null) { return StringUtils.split(value, delimiter); } return EMPTY; }
String[] function(String key, String delimiter) { String value = params.get(key); if (value != null) { return StringUtils.split(value, delimiter); } return EMPTY; }
/** * Returns an array of a param values, given its key and the values delimiter * * @param key the param key * @param delimiter the values delimiter * @return the list of vaalues */
Returns an array of a param values, given its key and the values delimiter
getValues
{ "repo_name": "leodmurillo/sonar", "path": "sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java", "license": "lgpl-3.0", "size": 5188 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,778,653
Iterable<Pair<CharSequence, AuthStrategy>> authStrategies(Iterable<Challenge> challenges, CredentialsStore<CredentialsType> credentialsStore, URI uri);
Iterable<Pair<CharSequence, AuthStrategy>> authStrategies(Iterable<Challenge> challenges, CredentialsStore<CredentialsType> credentialsStore, URI uri);
/** * Returns a pair of realm and {@link AuthStrategy} for each of the supported {@link Challenge}s. * <p> * Each of the {@link AuthStrategy}s returned will return an initial {@link AuthState} for one specific {@link Challenge}. * * @param challenges * The challenges provided by the server. * @param credentialsStore * A {@link CredentialsStore} suitable for this {@link AuthScheme}. * @param uri * The target {@link URI} of the request to authenticate. * * @return */
Returns a pair of realm and <code>AuthStrategy</code> for each of the supported <code>Challenge</code>s. Each of the <code>AuthStrategy</code>s returned will return an initial <code>AuthState</code> for one specific <code>Challenge</code>
authStrategies
{ "repo_name": "dmfs/http-client-essentials-suite", "path": "http-executor-decorators/src/main/java/org/dmfs/httpessentials/executors/authorizing/AuthScheme.java", "license": "apache-2.0", "size": 1682 }
[ "org.dmfs.jems.pair.Pair" ]
import org.dmfs.jems.pair.Pair;
import org.dmfs.jems.pair.*;
[ "org.dmfs.jems" ]
org.dmfs.jems;
2,238,917
public static ims.ocrr.orderingresults.domain.objects.OrderInvestigation extractOrderInvestigation(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.NewResultSpecDocVo valueObject) { return extractOrderInvestigation(domainFactory, valueObject, new HashMap()); }
static ims.ocrr.orderingresults.domain.objects.OrderInvestigation function(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.NewResultSpecDocVo valueObject) { return extractOrderInvestigation(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractOrderInvestigation
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/ocrr/vo/domain/NewResultSpecDocVoAssembler.java", "license": "agpl-3.0", "size": 21486 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,300,060
@Test public void testSpecialistFinishedState() throws Exception { // clear existing records clearMapRecords(); // compute workflow getTrackingRecord(); // create specialist record specRecord = createRecord(specialist, WorkflowStatus.REVIEW_NEEDED); mappingService.addMapRecord(specRecord); // compute workflow getTrackingRecord(); // Test: assign viewer ValidationResult result = testAllActionsForUser(viewer); // all actions except cancel should fail for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getErrors().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getErrors().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getErrors().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getErrors().contains(action.toString())); break; default: break; } } // Test: Specialist result = testAllActionsForUser(specialist); // all actions but CANCEL, SAVE_FOR_LATER, FINISH_EDITING, UNASSIGN should // fail for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getErrors().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getMessages().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getMessages().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getMessages().contains(action.toString())); break; default: break; } } // Test: assign lead result = testAllActionsForUser(lead); // all actions but CANCEL and ASSIGN_FROM_SCRATCH should fail for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getMessages().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getErrors().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getErrors().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getErrors().contains(action.toString())); break; default: break; } } }
void function() throws Exception { clearMapRecords(); getTrackingRecord(); specRecord = createRecord(specialist, WorkflowStatus.REVIEW_NEEDED); mappingService.addMapRecord(specRecord); getTrackingRecord(); ValidationResult result = testAllActionsForUser(viewer); for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getErrors().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getErrors().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getErrors().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getErrors().contains(action.toString())); break; default: break; } } result = testAllActionsForUser(specialist); for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getErrors().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getMessages().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getMessages().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getMessages().contains(action.toString())); break; default: break; } } result = testAllActionsForUser(lead); for (WorkflowAction action : WorkflowAction.values()) { switch (action) { case ASSIGN_FROM_INITIAL_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case ASSIGN_FROM_SCRATCH: assertTrue(result.getMessages().contains(action.toString())); break; case CANCEL: assertTrue(result.getMessages().contains(action.toString())); break; case CREATE_QA_RECORD: assertTrue(result.getErrors().contains(action.toString())); break; case FINISH_EDITING: assertTrue(result.getErrors().contains(action.toString())); break; case PUBLISH: assertTrue(result.getErrors().contains(action.toString())); break; case SAVE_FOR_LATER: assertTrue(result.getErrors().contains(action.toString())); break; case UNASSIGN: assertTrue(result.getErrors().contains(action.toString())); break; default: break; } } }
/** * Test specialist finished state. * * @throws Exception the exception */
Test specialist finished state
testSpecialistFinishedState
{ "repo_name": "WestCoastInformatics/OTF-Mapping-Service", "path": "integration-tests/src/test/java/org/ihtsdo/otf/mapping/test/other/WorkflowActionReviewProjectPathTest.java", "license": "apache-2.0", "size": 29796 }
[ "org.ihtsdo.otf.mapping.helpers.ValidationResult", "org.ihtsdo.otf.mapping.helpers.WorkflowAction", "org.ihtsdo.otf.mapping.helpers.WorkflowStatus", "org.junit.Assert" ]
import org.ihtsdo.otf.mapping.helpers.ValidationResult; import org.ihtsdo.otf.mapping.helpers.WorkflowAction; import org.ihtsdo.otf.mapping.helpers.WorkflowStatus; import org.junit.Assert;
import org.ihtsdo.otf.mapping.helpers.*; import org.junit.*;
[ "org.ihtsdo.otf", "org.junit" ]
org.ihtsdo.otf; org.junit;
2,720,864
void start(String groupName, String name) throws CloudException, IOException, InterruptedException;
void start(String groupName, String name) throws CloudException, IOException, InterruptedException;
/** * Starts the virtual machines in the scale set. * * @param groupName the name of the resource group the virtual machine scale set is in * @param name the name of the virtual machine scale set * @throws CloudException thrown for an invalid response from the service. * @throws IOException exception thrown from serialization/deserialization * @throws InterruptedException exception thrown when the operation is interrupted */
Starts the virtual machines in the scale set
start
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSets.java", "license": "mit", "size": 5232 }
[ "com.microsoft.azure.CloudException", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import java.io.IOException;
import com.microsoft.azure.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
1,528,039
public void addListeners(ApplicationListener<?>... listeners) { this.listeners.addAll(Arrays.asList(listeners)); } /** * Returns read-only ordered Set of the {@link ApplicationListener}s that will be * applied to the SpringApplication and registered with the {@link ApplicationContext}
void function(ApplicationListener<?>... listeners) { this.listeners.addAll(Arrays.asList(listeners)); } /** * Returns read-only ordered Set of the {@link ApplicationListener}s that will be * applied to the SpringApplication and registered with the {@link ApplicationContext}
/** * Add {@link ApplicationListener}s to be applied to the SpringApplication and * registered with the {@link ApplicationContext}. * @param listeners the listeners to add */
Add <code>ApplicationListener</code>s to be applied to the SpringApplication and registered with the <code>ApplicationContext</code>
addListeners
{ "repo_name": "candrews/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/SpringApplication.java", "license": "apache-2.0", "size": 44385 }
[ "java.util.Arrays", "java.util.Set", "org.springframework.context.ApplicationContext", "org.springframework.context.ApplicationListener" ]
import java.util.Arrays; import java.util.Set; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener;
import java.util.*; import org.springframework.context.*;
[ "java.util", "org.springframework.context" ]
java.util; org.springframework.context;
422,601
public static String getCodeVerifierChallengeMethod() { try { MessageDigest.getInstance("SHA-256"); // no exception, so SHA-256 is supported return CodeVerifierUtil.CODE_CHALLENGE_METHOD_S256; } catch (NoSuchAlgorithmException e) { return CodeVerifierUtil.CODE_CHALLENGE_METHOD_PLAIN; } }
static String function() { try { MessageDigest.getInstance(STR); return CodeVerifierUtil.CODE_CHALLENGE_METHOD_S256; } catch (NoSuchAlgorithmException e) { return CodeVerifierUtil.CODE_CHALLENGE_METHOD_PLAIN; } }
/** * Returns the challenge method utilized on this system: typically * {@link CodeVerifierUtil#CODE_CHALLENGE_METHOD_S256 SHA-256} if supported by * the system, {@link CodeVerifierUtil#CODE_CHALLENGE_METHOD_PLAIN plain} otherwise. */
Returns the challenge method utilized on this system: typically <code>CodeVerifierUtil#CODE_CHALLENGE_METHOD_S256 SHA-256</code> if supported by the system, <code>CodeVerifierUtil#CODE_CHALLENGE_METHOD_PLAIN plain</code> otherwise
getCodeVerifierChallengeMethod
{ "repo_name": "IDme/ID.me-WebVerify-SDK-Android", "path": "me.id.webverify/webverifylib/src/main/java/me/id/webverifylib/helper/CodeVerifierUtil.java", "license": "mit", "size": 6367 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
770,462
public FacilitiesManagerBl getFacilitiesManagerBl() { return this.facilitiesManagerBl; }
FacilitiesManagerBl function() { return this.facilitiesManagerBl; }
/** * Gets the facilitiesManagerBl for this instance. * * @return The facilitiesManagerBl. */
Gets the facilitiesManagerBl for this instance
getFacilitiesManagerBl
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/entry/FacilitiesManagerEntry.java", "license": "bsd-2-clause", "size": 54714 }
[ "cz.metacentrum.perun.core.bl.FacilitiesManagerBl" ]
import cz.metacentrum.perun.core.bl.FacilitiesManagerBl;
import cz.metacentrum.perun.core.bl.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,218,006
ServiceResponse<Period> getInvalid() throws ErrorException, IOException;
ServiceResponse<Period> getInvalid() throws ErrorException, IOException;
/** * Get an invalid duration value. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the Period object wrapped in {@link ServiceResponse} if successful. */
Get an invalid duration value
getInvalid
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyduration/Durations.java", "license": "mit", "size": 4373 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException", "org.joda.time.Period" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException; import org.joda.time.Period;
import com.microsoft.rest.*; import java.io.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.io", "org.joda.time" ]
com.microsoft.rest; java.io; org.joda.time;
571,147
@Override public void createSchedule(final String name, final String workflowId, final String transitionId, final String cronExpression, final Map<String, Object> parameters) { Assert.notNull(name, "name cannot be null"); Assert.notNull(workflowId, "workflowId cannot be null"); Assert.notNull(transitionId, "transitionId cannot be null"); Assert.notNull(cronExpression, "cronExpression cannot be null"); if (LOG.isDebugEnabled()) { LOG.debug("Creating a new schedule with name [" + name + "], workflowId [" + workflowId + "], transition [" + transitionId + "], cron [" + cronExpression + "] and params [" + parameters + "]"); }
void function(final String name, final String workflowId, final String transitionId, final String cronExpression, final Map<String, Object> parameters) { Assert.notNull(name, STR); Assert.notNull(workflowId, STR); Assert.notNull(transitionId, STR); Assert.notNull(cronExpression, STR); if (LOG.isDebugEnabled()) { LOG.debug(STR + name + STR + workflowId + STR + transitionId + STR + cronExpression + STR + parameters + "]"); }
/** * JAVADOC Method Level Comments * * @param name JAVADOC. * @param workflowId JAVADOC. * @param transitionId JAVADOC. * @param cronExpression JAVADOC. * @param parameters JAVADOC. */
JAVADOC Method Level Comments
createSchedule
{ "repo_name": "cucina/opencucina", "path": "engine/src/main/java/org/cucina/engine/schedule/TaskSchedulerScheduleManager.java", "license": "apache-2.0", "size": 4599 }
[ "java.util.Map", "org.springframework.util.Assert" ]
import java.util.Map; import org.springframework.util.Assert;
import java.util.*; import org.springframework.util.*;
[ "java.util", "org.springframework.util" ]
java.util; org.springframework.util;
1,358,804
@Test @TestAuthor (githubId = {"kkoPS", "antoineNourZaf"}) public void theClearCommandShouldReturnTheCorrectAnswer() throws IOException { // connexion via Socket Socket clientSocket = new Socket("localhost", roulettePair.getServer().getPort()); BufferedReader fromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); PrintWriter toServer = new PrintWriter(clientSocket.getOutputStream()); // reading the first response fromServer.readLine(); // command no 1 toServer.println(RouletteV2Protocol.CMD_CLEAR); toServer.flush(); // checking the server answer String serverResponse = fromServer.readLine(); assertEquals(RouletteV2Protocol.RESPONSE_CLEAR_DONE, serverResponse); // closing everything fromServer.close(); toServer.close(); clientSocket.close(); }
@TestAuthor (githubId = {"kkoPS", STR}) void function() throws IOException { Socket clientSocket = new Socket(STR, roulettePair.getServer().getPort()); BufferedReader fromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); PrintWriter toServer = new PrintWriter(clientSocket.getOutputStream()); fromServer.readLine(); toServer.println(RouletteV2Protocol.CMD_CLEAR); toServer.flush(); String serverResponse = fromServer.readLine(); assertEquals(RouletteV2Protocol.RESPONSE_CLEAR_DONE, serverResponse); fromServer.close(); toServer.close(); clientSocket.close(); }
/** * clears and checks the server's answer * @throws IOException */
clears and checks the server's answer
theClearCommandShouldReturnTheCorrectAnswer
{ "repo_name": "IamFonky/Teaching-HEIGVD-RES-2017-Labo-02", "path": "QuizRouletteServer-build/QuizRouletteServer-test/src/test/java/ch/heigvd/res/labs/roulette/net/client/RouletteV2kkoPSTest.java", "license": "mit", "size": 10472 }
[ "ch.heigvd.res.labs.roulette.net.protocol.RouletteV2Protocol", "ch.heigvd.schoolpulse.TestAuthor", "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.io.PrintWriter", "java.net.Socket", "org.junit.Assert" ]
import ch.heigvd.res.labs.roulette.net.protocol.RouletteV2Protocol; import ch.heigvd.schoolpulse.TestAuthor; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import org.junit.Assert;
import ch.heigvd.res.labs.roulette.net.protocol.*; import ch.heigvd.schoolpulse.*; import java.io.*; import java.net.*; import org.junit.*;
[ "ch.heigvd.res", "ch.heigvd.schoolpulse", "java.io", "java.net", "org.junit" ]
ch.heigvd.res; ch.heigvd.schoolpulse; java.io; java.net; org.junit;
1,360,343
// [TARGET readAllBytes(String, String, BlobSourceOption...)] // [VARIABLE "my_unique_bucket"] // [VARIABLE "my_blob_name"] // [VARIABLE 42"] public byte[] readBlobFromStringsWithGeneration(String bucketName, String blobName, long blobGeneration) { // [START readBlobFromStringsWithGeneration] byte[] content = storage.readAllBytes(bucketName, blobName, BlobSourceOption.generationMatch(blobGeneration)); // [END readBlobFromStringsWithGeneration] return content; }
byte[] function(String bucketName, String blobName, long blobGeneration) { byte[] content = storage.readAllBytes(bucketName, blobName, BlobSourceOption.generationMatch(blobGeneration)); return content; }
/** * Example of reading all bytes of a blob, if generation matches a value, otherwise a * {@link StorageException} is thrown. */
Example of reading all bytes of a blob, if generation matches a value, otherwise a <code>StorageException</code> is thrown
readBlobFromStringsWithGeneration
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java", "license": "apache-2.0", "size": 35762 }
[ "com.google.cloud.storage.Storage" ]
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.*;
[ "com.google.cloud" ]
com.google.cloud;
184,720
@Test public void testGroup4() throws Exception { policyFile = PolicyFile.setAdminOnServer1(ADMINGROUP); policyFile .addGroupsToUser("admin1", ADMINGROUP) .addRolesToGroup("group1", "non_admin_role", "load_data") .addPermissionsToRole("non_admin_role", "server=server1->db=" + dbName) .addGroupsToUser("user1", "group1") .addGroupsToUser("user2", "group1") .addGroupsToUser("user3", "group1"); writePolicyFile(policyFile); doDropDb("admin1"); for(String user : new String[]{"user1", "user2", "user3"}) { doCreateDb("admin1"); Connection connection = context.createConnection(user); Statement statement = context.createStatement(connection); statement.execute("USE " + dbName); statement.execute("CREATE TABLE " + tableName + " (under_col int comment 'the under column', value string) comment '" + tableComment + "'"); context.assertAuthzException(statement, "LOAD DATA LOCAL INPATH '" + dataFile.getPath() + "' into table " + tableName); assertTrue(statement.execute("SELECT * FROM " + tableName)); statement.close(); connection.close(); doDropDb("admin1"); } }
void function() throws Exception { policyFile = PolicyFile.setAdminOnServer1(ADMINGROUP); policyFile .addGroupsToUser(STR, ADMINGROUP) .addRolesToGroup(STR, STR, STR) .addPermissionsToRole(STR, STR + dbName) .addGroupsToUser("user1", STR) .addGroupsToUser("user2", STR) .addGroupsToUser("user3", STR); writePolicyFile(policyFile); doDropDb(STR); for(String user : new String[]{"user1", "user2", "user3"}) { doCreateDb(STR); Connection connection = context.createConnection(user); Statement statement = context.createStatement(connection); statement.execute(STR + dbName); statement.execute(STR + tableName + STR + tableComment + "'"); context.assertAuthzException(statement, STR + dataFile.getPath() + STR + tableName); assertTrue(statement.execute(STR + tableName)); statement.close(); connection.close(); doDropDb(STR); } }
/** * Tests that user without uri privilege can create table but not load data **/
Tests that user without uri privilege can create table but not load data
testGroup4
{ "repo_name": "mapr/incubator-sentry", "path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUserManagement.java", "license": "apache-2.0", "size": 12766 }
[ "java.sql.Connection", "java.sql.Statement", "org.apache.sentry.provider.file.PolicyFile", "org.junit.Assert" ]
import java.sql.Connection; import java.sql.Statement; import org.apache.sentry.provider.file.PolicyFile; import org.junit.Assert;
import java.sql.*; import org.apache.sentry.provider.file.*; import org.junit.*;
[ "java.sql", "org.apache.sentry", "org.junit" ]
java.sql; org.apache.sentry; org.junit;
1,328,427
public TableCellRenderer getDefaultRenderer(Class<?> type) { return getComponent().getDefaultRenderer(type); }
TableCellRenderer function(Class<?> type) { return getComponent().getDefaultRenderer(type); }
/** * Returns the renderer of the table field. * * @param type * the column {@link Class} type. * * @return the {@link TableCellRenderer}. * * @see JTable#getDefaultRenderer(Class) */
Returns the renderer of the table field
getDefaultRenderer
{ "repo_name": "devent/prefdialog", "path": "prefdialog-corefields/src/main/java/com/anrisoftware/prefdialog/fields/table/AbstractTableField.java", "license": "gpl-3.0", "size": 9352 }
[ "javax.swing.table.TableCellRenderer" ]
import javax.swing.table.TableCellRenderer;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
313,344
SchemaAndValue toConnectData(String topic, byte[] value);
SchemaAndValue toConnectData(String topic, byte[] value);
/** * Convert a native object to a Kafka Connect data object. * @param topic the topic associated with the data * @param value the value to convert * @return an object containing the {@link Schema} and the converted value */
Convert a native object to a Kafka Connect data object
toConnectData
{ "repo_name": "junrao/kafka", "path": "connect/api/src/main/java/org/apache/kafka/connect/storage/Converter.java", "license": "apache-2.0", "size": 2207 }
[ "org.apache.kafka.connect.data.SchemaAndValue" ]
import org.apache.kafka.connect.data.SchemaAndValue;
import org.apache.kafka.connect.data.*;
[ "org.apache.kafka" ]
org.apache.kafka;
529,297
@Override public Object getGraphEvent() { //TODO throw new NotImplementedException(); // return null; }
Object function() { throw new NotImplementedException(); }
/** * Return a graph event, which will be set anytime a graph change occurs. * * The graph Event object is a loan which must be returned. * The Event object is scoped and therefore to return the load just let it go * out of scope. */
Return a graph event, which will be set anytime a graph change occurs. The graph Event object is a loan which must be returned. The Event object is scoped and therefore to return the load just let it go out of scope
getGraphEvent
{ "repo_name": "Theosakamg/ros2_java", "path": "rcljava/src/main/java/org/ros2/rcljava/node/NativeNode.java", "license": "apache-2.0", "size": 30401 }
[ "org.ros2.rcljava.exception.NotImplementedException" ]
import org.ros2.rcljava.exception.NotImplementedException;
import org.ros2.rcljava.exception.*;
[ "org.ros2.rcljava" ]
org.ros2.rcljava;
1,490,932
return instance; } private Map<String, IPluginDescriptor> registeredPlugins; private Map<String, IPluginServiceDescriptor> registeredServices;
return instance; } private Map<String, IPluginDescriptor> registeredPlugins; private Map<String, IPluginServiceDescriptor> registeredServices;
/** * Method returning the Singleton instance of the PluginRuntime * * @return The PluginRuntime instance. */
Method returning the Singleton instance of the PluginRuntime
getInstance
{ "repo_name": "anonymous100001/maxuse", "path": "src/runtime/org/tzi/use/runtime/impl/PluginRuntime.java", "license": "gpl-2.0", "size": 4652 }
[ "java.util.Map", "org.tzi.use.runtime.IPluginDescriptor", "org.tzi.use.runtime.service.IPluginServiceDescriptor" ]
import java.util.Map; import org.tzi.use.runtime.IPluginDescriptor; import org.tzi.use.runtime.service.IPluginServiceDescriptor;
import java.util.*; import org.tzi.use.runtime.*; import org.tzi.use.runtime.service.*;
[ "java.util", "org.tzi.use" ]
java.util; org.tzi.use;
2,046,524
private JCheckBox getJcb8() { if (jcb8 == null) { jcb8 = new JCheckBox(); } return jcb8; }
JCheckBox function() { if (jcb8 == null) { jcb8 = new JCheckBox(); } return jcb8; }
/** * This method initializes jcb8 * * @return javax.swing.JCheckBox */
This method initializes jcb8
getJcb8
{ "repo_name": "nblomquist/pyramid-game", "path": "app/org/ndb/jpyramidgame/CheckPyramidPanel.java", "license": "mit", "size": 8333 }
[ "javax.swing.JCheckBox" ]
import javax.swing.JCheckBox;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
308,824
public ResultSet startSelect() { this.getCampo("pieceIn").setOrderBy(Column.ORDERBY_CRES,1); return super.startSelect(); }
ResultSet function() { this.getCampo(STR).setOrderBy(Column.ORDERBY_CRES,1); return super.startSelect(); }
/** * Questo metodo viene utilizzato per eseguire la ricerca * * @see mx.database.table.DataSet#startSelect() */
Questo metodo viene utilizzato per eseguire la ricerca
startSelect
{ "repo_name": "TecaDigitale/Teca-Digitale-Materiale-Comune", "path": "Teca Digitale Materiale Comune/src/mx/teca/archivi/arsbni/view/ViewPeriodici.java", "license": "agpl-3.0", "size": 1528 }
[ "java.sql.ResultSet", "mx.database.table.Column" ]
import java.sql.ResultSet; import mx.database.table.Column;
import java.sql.*; import mx.database.table.*;
[ "java.sql", "mx.database.table" ]
java.sql; mx.database.table;
2,746,177
public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Obtain other dependent packages TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); QueryDslPackage theQueryDslPackage = (QueryDslPackage)EPackage.Registry.INSTANCE.getEPackage(QueryDslPackage.eNS_URI); XbasePackage theXbasePackage = (XbasePackage)EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes datatypeEClass.getESuperTypes().add(this.getType()); importEClass.getESuperTypes().add(this.getExtensionEntity()); typeEClass.getESuperTypes().add(this.getExtensionEntity()); typeEClass.getESuperTypes().add(this.getReferencedType()); parametrizedTypeEClass.getESuperTypes().add(this.getType()); patternEClass.getESuperTypes().add(this.getParametrizedType()); primitiveRoleEClass.getESuperTypes().add(this.getType()); roleEClass.getESuperTypes().add(this.getParametrizedType()); relationshipEClass.getESuperTypes().add(this.getExtensionEntity()); relationshipEClass.getESuperTypes().add(this.getNamedEntity()); parameterEClass.getESuperTypes().add(this.getReferencedType()); relationshipConjunctionConstraintEClass.getESuperTypes().add(this.getRelationshipConstraint()); typeConstraintEClass.getESuperTypes().add(this.getRelationshipPrimitiveConstraint()); enumerationEClass.getESuperTypes().add(this.getType()); referencedTypeEClass.getESuperTypes().add(this.getNamedEntity()); // Initialize classes and features; add operations and parameters initEClass(architectureExtensionEClass, ArchitectureExtension.class, "ArchitectureExtension", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getArchitectureExtension_Name(), ecorePackage.getEString(), "name", null, 0, 1, ArchitectureExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getArchitectureExtension_Entities(), this.getExtensionEntity(), null, "entities", null, 0, -1, ArchitectureExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(extensionEntityEClass, ExtensionEntity.class, "ExtensionEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(datatypeEClass, Datatype.class, "Datatype", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getDatatype_Reference(), theTypesPackage.getJvmTypeReference(), null, "reference", null, 0, 1, Datatype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(importEClass, Import.class, "Import", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getImport_ImportedNamespace(), ecorePackage.getEString(), "importedNamespace", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(parametrizedTypeEClass, ParametrizedType.class, "ParametrizedType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getParametrizedType_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 0, 1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getParametrizedType_Parameters(), this.getParameter(), null, "parameters", null, 0, -1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getParametrizedType_Fields(), this.getField(), null, "fields", null, 0, -1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(patternEClass, Pattern.class, "Pattern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPattern_SuperPattern(), this.getTypeReference(), null, "superPattern", null, 0, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(primitiveRoleEClass, PrimitiveRole.class, "PrimitiveRole", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPrimitiveRole_Type(), theTypesPackage.getJvmTypeReference(), null, "type", null, 0, 1, PrimitiveRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getRole_Inherited(), ecorePackage.getEBoolean(), "inherited", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_Element(), this.getType(), null, "element", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_SuperRole(), this.getTypeReference(), null, "superRole", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_Constraints(), this.getExtensionConstraint(), null, "constraints", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(extensionConstraintEClass, ExtensionConstraint.class, "ExtensionConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getExtensionConstraint_Constraint(), this.getConstraint(), null, "constraint", null, 0, 1, ExtensionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getExtensionConstraint_Explanation(), ecorePackage.getEString(), "explanation", null, 0, 1, ExtensionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(constraintEClass, Constraint.class, "Constraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getConstraint_Query(), theQueryDslPackage.getQuery(), null, "query", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getConstraint_Comparator(), this.getMetricComparator(), "comparator", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConstraint_Value(), theXbasePackage.getXExpression(), null, "value", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipEClass, Relationship.class, "Relationship", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getRelationship_Abstract(), ecorePackage.getEBoolean(), "abstract", null, 0, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_SuperRelationship(), this.getRelationship(), null, "superRelationship", null, 0, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_Constraints(), this.getRelationshipConstraint(), null, "constraints", null, 0, -1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_Fields(), this.getField(), null, "fields", null, 0, -1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(parameterEClass, Parameter.class, "Parameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(fieldEClass, Field.class, "Field", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getField_Mandatory(), ecorePackage.getEBoolean(), "mandatory", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getField_Name(), ecorePackage.getEString(), "name", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Type(), this.getTypeReference(), null, "type", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getField_Many(), ecorePackage.getEBoolean(), "many", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Lb(), this.getArity(), null, "lb", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Ub(), this.getArity(), null, "ub", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(arityEClass, Arity.class, "Arity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getArity_Value(), ecorePackage.getEInt(), "value", null, 0, 1, Arity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getArity_Unbound(), ecorePackage.getEBoolean(), "unbound", null, 0, 1, Arity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeReferenceEClass, TypeReference.class, "TypeReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTypeReference_Reference(), this.getReferencedType(), null, "reference", null, 0, 1, TypeReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getTypeReference_Parameters(), this.getTypeReference(), null, "parameters", null, 0, -1, TypeReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipConstraintEClass, RelationshipConstraint.class, "RelationshipConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(relationshipConjunctionConstraintEClass, RelationshipConjunctionConstraint.class, "RelationshipConjunctionConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getRelationshipConjunctionConstraint_Constraints(), this.getRelationshipPrimitiveConstraint(), null, "constraints", null, 0, -1, RelationshipConjunctionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipPrimitiveConstraintEClass, RelationshipPrimitiveConstraint.class, "RelationshipPrimitiveConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(typeConstraintEClass, TypeConstraint.class, "TypeConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTypeConstraint_Source(), this.getType(), null, "source", null, 0, 1, TypeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getTypeConstraint_Target(), this.getType(), null, "target", null, 0, 1, TypeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(enumerationEClass, Enumeration.class, "Enumeration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getEnumeration_Elements(), this.getEnumerationElement(), null, "elements", null, 0, -1, Enumeration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(enumerationElementEClass, EnumerationElement.class, "EnumerationElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getEnumerationElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, EnumerationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(namedEntityEClass, NamedEntity.class, "NamedEntity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNamedEntity_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(referencedTypeEClass, ReferencedType.class, "ReferencedType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); // Initialize enums and add enum literals initEEnum(metricComparatorEEnum, MetricComparator.class, "MetricComparator"); addEEnumLiteral(metricComparatorEEnum, MetricComparator.GE); addEEnumLiteral(metricComparatorEEnum, MetricComparator.LE); addEEnumLiteral(metricComparatorEEnum, MetricComparator.GT); addEEnumLiteral(metricComparatorEEnum, MetricComparator.LT); addEEnumLiteral(metricComparatorEEnum, MetricComparator.EQ); addEEnumLiteral(metricComparatorEEnum, MetricComparator.NE); // Create resource createResource(eNS_URI); }
void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI); QueryDslPackage theQueryDslPackage = (QueryDslPackage)EPackage.Registry.INSTANCE.getEPackage(QueryDslPackage.eNS_URI); XbasePackage theXbasePackage = (XbasePackage)EPackage.Registry.INSTANCE.getEPackage(XbasePackage.eNS_URI); datatypeEClass.getESuperTypes().add(this.getType()); importEClass.getESuperTypes().add(this.getExtensionEntity()); typeEClass.getESuperTypes().add(this.getExtensionEntity()); typeEClass.getESuperTypes().add(this.getReferencedType()); parametrizedTypeEClass.getESuperTypes().add(this.getType()); patternEClass.getESuperTypes().add(this.getParametrizedType()); primitiveRoleEClass.getESuperTypes().add(this.getType()); roleEClass.getESuperTypes().add(this.getParametrizedType()); relationshipEClass.getESuperTypes().add(this.getExtensionEntity()); relationshipEClass.getESuperTypes().add(this.getNamedEntity()); parameterEClass.getESuperTypes().add(this.getReferencedType()); relationshipConjunctionConstraintEClass.getESuperTypes().add(this.getRelationshipConstraint()); typeConstraintEClass.getESuperTypes().add(this.getRelationshipPrimitiveConstraint()); enumerationEClass.getESuperTypes().add(this.getType()); referencedTypeEClass.getESuperTypes().add(this.getNamedEntity()); initEClass(architectureExtensionEClass, ArchitectureExtension.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getArchitectureExtension_Name(), ecorePackage.getEString(), "name", null, 0, 1, ArchitectureExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getArchitectureExtension_Entities(), this.getExtensionEntity(), null, STR, null, 0, -1, ArchitectureExtension.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(extensionEntityEClass, ExtensionEntity.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(datatypeEClass, Datatype.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getDatatype_Reference(), theTypesPackage.getJvmTypeReference(), null, STR, null, 0, 1, Datatype.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(importEClass, Import.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getImport_ImportedNamespace(), ecorePackage.getEString(), STR, null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(parametrizedTypeEClass, ParametrizedType.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getParametrizedType_Abstract(), ecorePackage.getEBoolean(), STR, null, 0, 1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getParametrizedType_Parameters(), this.getParameter(), null, STR, null, 0, -1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getParametrizedType_Fields(), this.getField(), null, STR, null, 0, -1, ParametrizedType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(patternEClass, Pattern.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPattern_SuperPattern(), this.getTypeReference(), null, STR, null, 0, 1, Pattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(primitiveRoleEClass, PrimitiveRole.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPrimitiveRole_Type(), theTypesPackage.getJvmTypeReference(), null, "type", null, 0, 1, PrimitiveRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getRole_Inherited(), ecorePackage.getEBoolean(), STR, null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_Element(), this.getType(), null, STR, null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_SuperRole(), this.getTypeReference(), null, STR, null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRole_Constraints(), this.getExtensionConstraint(), null, STR, null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(extensionConstraintEClass, ExtensionConstraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getExtensionConstraint_Constraint(), this.getConstraint(), null, STR, null, 0, 1, ExtensionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getExtensionConstraint_Explanation(), ecorePackage.getEString(), STR, null, 0, 1, ExtensionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(constraintEClass, Constraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getConstraint_Query(), theQueryDslPackage.getQuery(), null, "query", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getConstraint_Comparator(), this.getMetricComparator(), STR, null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getConstraint_Value(), theXbasePackage.getXExpression(), null, "value", null, 0, 1, Constraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipEClass, Relationship.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getRelationship_Abstract(), ecorePackage.getEBoolean(), STR, null, 0, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_SuperRelationship(), this.getRelationship(), null, STR, null, 0, 1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_Constraints(), this.getRelationshipConstraint(), null, STR, null, 0, -1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getRelationship_Fields(), this.getField(), null, STR, null, 0, -1, Relationship.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(parameterEClass, Parameter.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(fieldEClass, Field.class, "Field", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getField_Mandatory(), ecorePackage.getEBoolean(), STR, null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getField_Name(), ecorePackage.getEString(), "name", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Type(), this.getTypeReference(), null, "type", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getField_Many(), ecorePackage.getEBoolean(), "many", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Lb(), this.getArity(), null, "lb", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getField_Ub(), this.getArity(), null, "ub", null, 0, 1, Field.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(arityEClass, Arity.class, "Arity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getArity_Value(), ecorePackage.getEInt(), "value", null, 0, 1, Arity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getArity_Unbound(), ecorePackage.getEBoolean(), STR, null, 0, 1, Arity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeReferenceEClass, TypeReference.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTypeReference_Reference(), this.getReferencedType(), null, STR, null, 0, 1, TypeReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getTypeReference_Parameters(), this.getTypeReference(), null, STR, null, 0, -1, TypeReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipConstraintEClass, RelationshipConstraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(relationshipConjunctionConstraintEClass, RelationshipConjunctionConstraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getRelationshipConjunctionConstraint_Constraints(), this.getRelationshipPrimitiveConstraint(), null, STR, null, 0, -1, RelationshipConjunctionConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(relationshipPrimitiveConstraintEClass, RelationshipPrimitiveConstraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(typeConstraintEClass, TypeConstraint.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getTypeConstraint_Source(), this.getType(), null, STR, null, 0, 1, TypeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getTypeConstraint_Target(), this.getType(), null, STR, null, 0, 1, TypeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(enumerationEClass, Enumeration.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getEnumeration_Elements(), this.getEnumerationElement(), null, STR, null, 0, -1, Enumeration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(enumerationElementEClass, EnumerationElement.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getEnumerationElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, EnumerationElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(namedEntityEClass, NamedEntity.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNamedEntity_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(referencedTypeEClass, ReferencedType.class, STR, !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEEnum(metricComparatorEEnum, MetricComparator.class, STR); addEEnumLiteral(metricComparatorEEnum, MetricComparator.GE); addEEnumLiteral(metricComparatorEEnum, MetricComparator.LE); addEEnumLiteral(metricComparatorEEnum, MetricComparator.GT); addEEnumLiteral(metricComparatorEEnum, MetricComparator.LT); addEEnumLiteral(metricComparatorEEnum, MetricComparator.EQ); addEEnumLiteral(metricComparatorEEnum, MetricComparator.NE); createResource(eNS_URI); }
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.
initializePackageContents
{ "repo_name": "Tocea/Architecture-Designer", "path": "com.tocea.scertify.architecture.xadl/src/main/generated/com/tocea/scertify/architecture/xadl/architectureDSL/impl/ArchitectureDSLPackageImpl.java", "license": "epl-1.0", "size": 40363 }
[ "com.tocea.codewatch.architecture.query.dsl.queryDsl.QueryDslPackage", "com.tocea.scertify.architecture.xadl.architectureDSL.ArchitectureExtension", "com.tocea.scertify.architecture.xadl.architectureDSL.Arity", "com.tocea.scertify.architecture.xadl.architectureDSL.Constraint", "com.tocea.scertify.architecture.xadl.architectureDSL.Datatype", "com.tocea.scertify.architecture.xadl.architectureDSL.Enumeration", "com.tocea.scertify.architecture.xadl.architectureDSL.EnumerationElement", "com.tocea.scertify.architecture.xadl.architectureDSL.ExtensionConstraint", "com.tocea.scertify.architecture.xadl.architectureDSL.ExtensionEntity", "com.tocea.scertify.architecture.xadl.architectureDSL.Field", "com.tocea.scertify.architecture.xadl.architectureDSL.Import", "com.tocea.scertify.architecture.xadl.architectureDSL.MetricComparator", "com.tocea.scertify.architecture.xadl.architectureDSL.NamedEntity", "com.tocea.scertify.architecture.xadl.architectureDSL.Parameter", "com.tocea.scertify.architecture.xadl.architectureDSL.ParametrizedType", "com.tocea.scertify.architecture.xadl.architectureDSL.Pattern", "com.tocea.scertify.architecture.xadl.architectureDSL.PrimitiveRole", "com.tocea.scertify.architecture.xadl.architectureDSL.ReferencedType", "com.tocea.scertify.architecture.xadl.architectureDSL.Relationship", "com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipConjunctionConstraint", "com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipConstraint", "com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipPrimitiveConstraint", "com.tocea.scertify.architecture.xadl.architectureDSL.Role", "com.tocea.scertify.architecture.xadl.architectureDSL.Type", "com.tocea.scertify.architecture.xadl.architectureDSL.TypeConstraint", "com.tocea.scertify.architecture.xadl.architectureDSL.TypeReference", "org.eclipse.emf.ecore.EPackage", "org.eclipse.xtext.common.types.TypesPackage", "org.eclipse.xtext.xbase.XbasePackage" ]
import com.tocea.codewatch.architecture.query.dsl.queryDsl.QueryDslPackage; import com.tocea.scertify.architecture.xadl.architectureDSL.ArchitectureExtension; import com.tocea.scertify.architecture.xadl.architectureDSL.Arity; import com.tocea.scertify.architecture.xadl.architectureDSL.Constraint; import com.tocea.scertify.architecture.xadl.architectureDSL.Datatype; import com.tocea.scertify.architecture.xadl.architectureDSL.Enumeration; import com.tocea.scertify.architecture.xadl.architectureDSL.EnumerationElement; import com.tocea.scertify.architecture.xadl.architectureDSL.ExtensionConstraint; import com.tocea.scertify.architecture.xadl.architectureDSL.ExtensionEntity; import com.tocea.scertify.architecture.xadl.architectureDSL.Field; import com.tocea.scertify.architecture.xadl.architectureDSL.Import; import com.tocea.scertify.architecture.xadl.architectureDSL.MetricComparator; import com.tocea.scertify.architecture.xadl.architectureDSL.NamedEntity; import com.tocea.scertify.architecture.xadl.architectureDSL.Parameter; import com.tocea.scertify.architecture.xadl.architectureDSL.ParametrizedType; import com.tocea.scertify.architecture.xadl.architectureDSL.Pattern; import com.tocea.scertify.architecture.xadl.architectureDSL.PrimitiveRole; import com.tocea.scertify.architecture.xadl.architectureDSL.ReferencedType; import com.tocea.scertify.architecture.xadl.architectureDSL.Relationship; import com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipConjunctionConstraint; import com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipConstraint; import com.tocea.scertify.architecture.xadl.architectureDSL.RelationshipPrimitiveConstraint; import com.tocea.scertify.architecture.xadl.architectureDSL.Role; import com.tocea.scertify.architecture.xadl.architectureDSL.Type; import com.tocea.scertify.architecture.xadl.architectureDSL.TypeConstraint; import com.tocea.scertify.architecture.xadl.architectureDSL.TypeReference; import org.eclipse.emf.ecore.EPackage; import org.eclipse.xtext.common.types.TypesPackage; import org.eclipse.xtext.xbase.XbasePackage;
import com.tocea.codewatch.architecture.query.dsl.*; import com.tocea.scertify.architecture.xadl.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.common.types.*; import org.eclipse.xtext.xbase.*;
[ "com.tocea.codewatch", "com.tocea.scertify", "org.eclipse.emf", "org.eclipse.xtext" ]
com.tocea.codewatch; com.tocea.scertify; org.eclipse.emf; org.eclipse.xtext;
2,465,942
private void renderDroppedItem(EntityTravellingItem p_77020_1_, IIcon p_77020_2_, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_) { this.renderDroppedItem(p_77020_1_, p_77020_2_, p_77020_3_, p_77020_4_, p_77020_5_, p_77020_6_, p_77020_7_, 0); }
void function(EntityTravellingItem p_77020_1_, IIcon p_77020_2_, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_) { this.renderDroppedItem(p_77020_1_, p_77020_2_, p_77020_3_, p_77020_4_, p_77020_5_, p_77020_6_, p_77020_7_, 0); }
/** * Renders a dropped item */
Renders a dropped item
renderDroppedItem
{ "repo_name": "NEMESIS13cz/Evercraft", "path": "java/evercraft/NEMESIS13cz/Renderers/Entity/EntityTravellingItemRenderer.java", "license": "gpl-3.0", "size": 35380 }
[ "net.minecraft.util.IIcon" ]
import net.minecraft.util.IIcon;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
2,167,351
public static Integer setKeyValue(Object obj,String key) { try { Method method = obj.getClass().getDeclaredMethod("set"+key.substring(0, 1).toUpperCase()+key.substring(1),Integer.class); Integer i=AutoPackage.createKey(Integer.MAX_VALUE); method.invoke(obj,i); return i; } catch (SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } return 0; }
static Integer function(Object obj,String key) { try { Method method = obj.getClass().getDeclaredMethod("set"+key.substring(0, 1).toUpperCase()+key.substring(1),Integer.class); Integer i=AutoPackage.createKey(Integer.MAX_VALUE); method.invoke(obj,i); return i; } catch (SecurityException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } return 0; }
/** * 8.22 fix a big bug * */
8.22 fix a big bug
setKeyValue
{ "repo_name": "748251120/bainian_audit01", "path": "audit3/src/java/com/gbicc/bll/uitl/AutoPackage.java", "license": "apache-2.0", "size": 22549 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,952,302
public FieldWriter<FieldType> getWriter(String fieldName);
FieldWriter<FieldType> function(String fieldName);
/** * Get a writer for an individual field given the ID. * * @param fieldName the unique field ID * @return the writer for the given field */
Get a writer for an individual field given the ID
getWriter
{ "repo_name": "locationtech/geowave", "path": "core/store/src/main/java/org/locationtech/geowave/core/store/data/DataWriter.java", "license": "apache-2.0", "size": 958 }
[ "org.locationtech.geowave.core.store.data.field.FieldWriter" ]
import org.locationtech.geowave.core.store.data.field.FieldWriter;
import org.locationtech.geowave.core.store.data.field.*;
[ "org.locationtech.geowave" ]
org.locationtech.geowave;
886,857
@ExportMessage @SuppressWarnings({"static-method", "unused"}) boolean hasScopeParent( @Shared("block") @Cached(value = "this.block", adopt = false) SLBlockNode cachedBlock, @Shared("parentBlock") @Cached(value = "this.block.findBlock()", adopt = false, allowUncached = true) Node parentBlock) { // Cache the parent block for the fast-path access return parentBlock instanceof SLBlockNode; }
@SuppressWarnings({STR, STR}) boolean hasScopeParent( @Shared("block") @Cached(value = STR, adopt = false) SLBlockNode cachedBlock, @Shared(STR) @Cached(value = STR, adopt = false, allowUncached = true) Node parentBlock) { return parentBlock instanceof SLBlockNode; }
/** * There is a parent scope if we're in a block. */
There is a parent scope if we're in a block
hasScopeParent
{ "repo_name": "smarr/Truffle", "path": "truffle/src/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/local/SLScopedNode.java", "license": "gpl-2.0", "size": 37980 }
[ "com.oracle.truffle.api.dsl.Cached", "com.oracle.truffle.api.nodes.Node", "com.oracle.truffle.sl.nodes.controlflow.SLBlockNode" ]
import com.oracle.truffle.api.dsl.Cached; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.sl.nodes.controlflow.SLBlockNode;
import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.sl.nodes.controlflow.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,353,804
public static Operator<?>[] standard() { return StandardOperators.STANDARD_OPERATORS.toArray(new Operator[0]); } /** * Validate an {@link Operator} implementation. * * @param <OPERATOR> type * @param operator to check * @return {@code operator}
static Operator<?>[] function() { return StandardOperators.STANDARD_OPERATORS.toArray(new Operator[0]); } /** * Validate an {@link Operator} implementation. * * @param <OPERATOR> type * @param operator to check * @return {@code operator}
/** * Get standard operators. * * @return Operator[] * @see Therian#standard() */
Get standard operators
standard
{ "repo_name": "mbenson/therian", "path": "core/src/main/java/therian/Operators.java", "license": "apache-2.0", "size": 5703 }
[ "org.apache.commons.lang3.Validate" ]
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
377,709
public void setIslandLocation(final Location l) { islandLocation = Util.getStringLocation(l); }
void function(final Location l) { islandLocation = Util.getStringLocation(l); }
/** * Records the player's island location in a string form * * @param l * a Bukkit Location */
Records the player's island location in a string form
setIslandLocation
{ "repo_name": "Pokechu22/askyblock", "path": "src/com/wasteofplastic/askyblock/Players.java", "license": "gpl-2.0", "size": 29215 }
[ "com.wasteofplastic.askyblock.util.Util", "org.bukkit.Location" ]
import com.wasteofplastic.askyblock.util.Util; import org.bukkit.Location;
import com.wasteofplastic.askyblock.util.*; import org.bukkit.*;
[ "com.wasteofplastic.askyblock", "org.bukkit" ]
com.wasteofplastic.askyblock; org.bukkit;
181,215
@Test public void testParserRuleNameStartingWithUnderscore() { String[] pair = new String[] { "grammar A;\n" + "_a : 'x' ;\n", "error(" + ErrorType.SYNTAX_ERROR.code + "): A.g4:2:0: syntax error: '_' came as a complete surprise to me\n" }; super.testErrors(pair, true); }
@Test void function() { String[] pair = new String[] { STR + STR, STR + ErrorType.SYNTAX_ERROR.code + STR }; super.testErrors(pair, true); }
/** * This is a regression test for antlr/antlr4#262 * "Parser Rule Name Starting With an Underscore" * https://github.com/antlr/antlr4/issues/262 */
This is a regression test for antlr/antlr4#262 "Parser Rule Name Starting With an Underscore" HREF
testParserRuleNameStartingWithUnderscore
{ "repo_name": "Distrotech/antlr4", "path": "tool-testsuite/test/org/antlr/v4/test/tool/TestToolSyntaxErrors.java", "license": "bsd-3-clause", "size": 23180 }
[ "org.antlr.v4.tool.ErrorType", "org.junit.Test" ]
import org.antlr.v4.tool.ErrorType; import org.junit.Test;
import org.antlr.v4.tool.*; import org.junit.*;
[ "org.antlr.v4", "org.junit" ]
org.antlr.v4; org.junit;
363,306
public boolean contains(ItemStack item) { return first(item) >= 0; }
boolean function(ItemStack item) { return first(item) >= 0; }
/** * Check if the inventory contains any ItemStacks matching the given ItemStack * This will only match if both the type and the amount of the stack match * * @param item The ItemStack to match against * @return If any matching ItemStacks were found */
Check if the inventory contains any ItemStacks matching the given ItemStack This will only match if both the type and the amount of the stack match
contains
{ "repo_name": "karlthepagan/Glowstone", "path": "src/main/java/net/glowstone/inventory/GlowInventory.java", "license": "mit", "size": 14882 }
[ "org.bukkit.inventory.ItemStack" ]
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.*;
[ "org.bukkit.inventory" ]
org.bukkit.inventory;
2,569,912
List<SickNoteType> getSickNoteTypes();
List<SickNoteType> getSickNoteTypes();
/** * Returns a list of all sicknote types that are available * * @return list of all types */
Returns a list of all sicknote types that are available
getSickNoteTypes
{ "repo_name": "synyx/urlaubsverwaltung", "path": "src/main/java/org/synyx/urlaubsverwaltung/sicknote/sicknotetype/SickNoteTypeService.java", "license": "apache-2.0", "size": 288 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,678,109
public boolean isModuleLoaded(String moduleId) throws NoModuleException { if (currentPhase != ConstructionPhase.ENABLING && currentPhase != ConstructionPhase.ENABLED) { return false; } ModuleMetadata ms = discoveredModules.get(moduleId); if (ms == null) { // No module throw new NoModuleException(moduleId); } return ms.getPhase() == ModulePhase.ENABLED; }
boolean function(String moduleId) throws NoModuleException { if (currentPhase != ConstructionPhase.ENABLING && currentPhase != ConstructionPhase.ENABLED) { return false; } ModuleMetadata ms = discoveredModules.get(moduleId); if (ms == null) { throw new NoModuleException(moduleId); } return ms.getPhase() == ModulePhase.ENABLED; }
/** * Gets whether a module is enabled and loaded. * * @param moduleId The module ID to check for. * @return <code>true</code> if it is enabled. * @throws NoModuleException Thrown if the module does not exist and modules have been loaded. */
Gets whether a module is enabled and loaded
isModuleLoaded
{ "repo_name": "NucleusPowered/QuickStartModuleLoader", "path": "src/main/java/uk/co/drnaylor/quickstart/ModuleHolder.java", "license": "mit", "size": 40035 }
[ "uk.co.drnaylor.quickstart.enums.ConstructionPhase", "uk.co.drnaylor.quickstart.enums.ModulePhase", "uk.co.drnaylor.quickstart.exceptions.NoModuleException" ]
import uk.co.drnaylor.quickstart.enums.ConstructionPhase; import uk.co.drnaylor.quickstart.enums.ModulePhase; import uk.co.drnaylor.quickstart.exceptions.NoModuleException;
import uk.co.drnaylor.quickstart.enums.*; import uk.co.drnaylor.quickstart.exceptions.*;
[ "uk.co.drnaylor" ]
uk.co.drnaylor;
1,013,351
protected void executeInternal(JobExecutionContext context) throws JobExecutionException { try { this.methodInvoker.invoke(); } catch (InvocationTargetException ex) { String errorMessage = getInvocationFailureMessage(); logger.warn(errorMessage, ex.getTargetException()); if (ex.getTargetException() instanceof JobExecutionException) { throw (JobExecutionException) ex.getTargetException(); } if (oldJobExecutionExceptionConstructor != null) { Exception jobEx = (ex.getTargetException() instanceof Exception) ? (Exception) ex.getTargetException() : ex; throw (JobExecutionException) BeanUtils.instantiateClass( oldJobExecutionExceptionConstructor, new Object[] {errorMessage, jobEx, Boolean.FALSE}); } else { throw new JobExecutionException(errorMessage, ex.getTargetException()); } } catch (Exception ex) { String errorMessage = getInvocationFailureMessage(); logger.warn(errorMessage, ex); if (oldJobExecutionExceptionConstructor != null) { throw (JobExecutionException) BeanUtils.instantiateClass( oldJobExecutionExceptionConstructor, new Object[] {errorMessage, ex, Boolean.FALSE}); } else { throw new JobExecutionException(errorMessage, ex); } } }
void function(JobExecutionContext context) throws JobExecutionException { try { this.methodInvoker.invoke(); } catch (InvocationTargetException ex) { String errorMessage = getInvocationFailureMessage(); logger.warn(errorMessage, ex.getTargetException()); if (ex.getTargetException() instanceof JobExecutionException) { throw (JobExecutionException) ex.getTargetException(); } if (oldJobExecutionExceptionConstructor != null) { Exception jobEx = (ex.getTargetException() instanceof Exception) ? (Exception) ex.getTargetException() : ex; throw (JobExecutionException) BeanUtils.instantiateClass( oldJobExecutionExceptionConstructor, new Object[] {errorMessage, jobEx, Boolean.FALSE}); } else { throw new JobExecutionException(errorMessage, ex.getTargetException()); } } catch (Exception ex) { String errorMessage = getInvocationFailureMessage(); logger.warn(errorMessage, ex); if (oldJobExecutionExceptionConstructor != null) { throw (JobExecutionException) BeanUtils.instantiateClass( oldJobExecutionExceptionConstructor, new Object[] {errorMessage, ex, Boolean.FALSE}); } else { throw new JobExecutionException(errorMessage, ex); } } }
/** * Invoke the method via the MethodInvoker. */
Invoke the method via the MethodInvoker
executeInternal
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java", "license": "apache-2.0", "size": 11215 }
[ "java.lang.reflect.InvocationTargetException", "org.quartz.JobExecutionContext", "org.quartz.JobExecutionException", "org.springframework.beans.BeanUtils" ]
import java.lang.reflect.InvocationTargetException; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.beans.BeanUtils;
import java.lang.reflect.*; import org.quartz.*; import org.springframework.beans.*;
[ "java.lang", "org.quartz", "org.springframework.beans" ]
java.lang; org.quartz; org.springframework.beans;
151,112
void setFactoryFinderResolver(FactoryFinderResolver resolver); /** * Gets the current {@link org.apache.camel.spi.ProcessorFactory}
void setFactoryFinderResolver(FactoryFinderResolver resolver); /** * Gets the current {@link org.apache.camel.spi.ProcessorFactory}
/** * Sets the factory finder resolver to use. * * @param resolver the factory finder resolver */
Sets the factory finder resolver to use
setFactoryFinderResolver
{ "repo_name": "nikhilvibhav/camel", "path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java", "license": "apache-2.0", "size": 27051 }
[ "org.apache.camel.spi.FactoryFinderResolver", "org.apache.camel.spi.ProcessorFactory" ]
import org.apache.camel.spi.FactoryFinderResolver; import org.apache.camel.spi.ProcessorFactory;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
1,354,554
final String propertyName = appName + "-NODES"; final String nodeListString = EVCacheConfig.getInstance().getPropertyRepository().get(propertyName, String.class).orElse("").get(); if (log.isDebugEnabled()) log.debug("List of Nodes = " + nodeListString); if(nodeListString != null && nodeListString.length() > 0) return bootstrapFromSystemProperty(nodeListString); if(env != null && region != null) return bootstrapFromEureka(appName); return Collections.<ServerGroup, EVCacheServerGroupConfig> emptyMap(); }
final String propertyName = appName + STR; final String nodeListString = EVCacheConfig.getInstance().getPropertyRepository().get(propertyName, String.class).orElse(STRList of Nodes = " + nodeListString); if(nodeListString != null && nodeListString.length() > 0) return bootstrapFromSystemProperty(nodeListString); if(env != null && region != null) return bootstrapFromEureka(appName); return Collections.<ServerGroup, EVCacheServerGroupConfig> emptyMap(); }
/** * Pass a System Property of format * * <EVCACHE_APP>-NODES=setname0=instance01:port,instance02:port, * instance03:port;setname1=instance11:port,instance12:port,instance13:port; * setname2=instance21:port,instance22:port,instance23:port * */
Pass a System Property of format -NODES=setname0=instance01:port,instance02:port, instance03:port;setname1=instance11:port,instance12:port,instance13:port; setname2=instance21:port,instance22:port,instance23:port
discoverInstances
{ "repo_name": "Netflix/EVCache", "path": "evcache-core/src/main/java/com/netflix/evcache/pool/SimpleNodeListProvider.java", "license": "apache-2.0", "size": 12622 }
[ "com.netflix.evcache.util.EVCacheConfig", "java.util.Collections" ]
import com.netflix.evcache.util.EVCacheConfig; import java.util.Collections;
import com.netflix.evcache.util.*; import java.util.*;
[ "com.netflix.evcache", "java.util" ]
com.netflix.evcache; java.util;
1,715,693
public int read(short[] d, int off, int len) throws IOException { return rawRead(d, off * 2, len * 2); }
int function(short[] d, int off, int len) throws IOException { return rawRead(d, off * 2, len * 2); }
/** * Read short array from the stream * * @param d input * @param off offset * @param len the number of short elements to read * @return the total number of bytes read into the buffer, or -1 if there is * no more data because the end of the stream has been reached. * @throws IOException */
Read short array from the stream
read
{ "repo_name": "linux-on-ibm-z/snappy-java", "path": "src/main/java/org/xerial/snappy/SnappyInputStream.java", "license": "apache-2.0", "size": 14540 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
883,770
public void appendValue(String value) throws JspException { if (!inTag()) { throw new IllegalStateException("Cannot write tag value. No open tag available."); } closeTagAndMarkAsBlock(); this.writer.append(value); }
void function(String value) throws JspException { if (!inTag()) { throw new IllegalStateException(STR); } closeTagAndMarkAsBlock(); this.writer.append(value); }
/** * Close the current opening tag (if necessary) and appends the * supplied value as inner text. * @throws IllegalStateException if no tag is open */
Close the current opening tag (if necessary) and appends the supplied value as inner text
appendValue
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/servlet/tags/form/TagWriter.java", "license": "unlicense", "size": 7209 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
128,799
if (null != bitmap) { Object buffer = null; try { if (null == mBufferField) { mBufferField = Bitmap.class.getDeclaredField("mBuffer"); if (!mBufferField.isAccessible()) { mBufferField.setAccessible(true); } } buffer = mBufferField.get(bitmap); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } if (null == buffer || !buffer.getClass().isArray()) { // native backed bitmaps don't support reconfiguration, // so alloc size is always content size if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) { return bitmap.getByteCount(); } else { return bitmap.getRowBytes() * bitmap.getHeight(); } } return ((byte[]) buffer).length; } return -1; }
if (null != bitmap) { Object buffer = null; try { if (null == mBufferField) { mBufferField = Bitmap.class.getDeclaredField(STR); if (!mBufferField.isAccessible()) { mBufferField.setAccessible(true); } } buffer = mBufferField.get(bitmap); } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } if (null == buffer !buffer.getClass().isArray()) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) { return bitmap.getByteCount(); } else { return bitmap.getRowBytes() * bitmap.getHeight(); } } return ((byte[]) buffer).length; } return -1; }
/** * Returns the size of the allocated memory used to store this bitmap's pixels. * * <p>This can be larger than the result of Bitmap.getByteCount() if a bitmap is reused to * decode other bitmaps of smaller size.</p> * * <p>This value will not change over the lifetime of a Bitmap.</p> * */
Returns the size of the allocated memory used to store this bitmap's pixels. This can be larger than the result of Bitmap.getByteCount() if a bitmap is reused to decode other bitmaps of smaller size. This value will not change over the lifetime of a Bitmap
getAllocationByteCount
{ "repo_name": "badpx/BitmapFactoryCompat", "path": "library/src/com/badpx/BitmapFactoryCompat/BitmapHelper.java", "license": "apache-2.0", "size": 3169 }
[ "android.graphics.Bitmap", "android.os.Build" ]
import android.graphics.Bitmap; import android.os.Build;
import android.graphics.*; import android.os.*;
[ "android.graphics", "android.os" ]
android.graphics; android.os;
2,753,355
public CharSequence getName(Context context) { return getName(context.getResources()); }
CharSequence function(Context context) { return getName(context.getResources()); }
/** * Return the properly localized/resource selected name of this route. * * @param context Context used to resolve the correct configuration to load * @return The user-friendly name of the media route. This is the string presented * to users who may select this as the active route. */
Return the properly localized/resource selected name of this route
getName
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/media/MediaRouter.java", "license": "apache-2.0", "size": 78874 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,861,061
public static ITable includedColumnsTable(ITable table, String[] columnNames) throws DataSetException { logger.debug("includedColumnsTable(table={}, columnNames={}) - start", table, columnNames); DefaultColumnFilter columnFilter = new DefaultColumnFilter(); for (int i = 0; i < columnNames.length; i++) { String columnName = columnNames[i]; columnFilter.includeColumn(columnName); } return new ColumnFilterTable(table, columnFilter); }
static ITable function(ITable table, String[] columnNames) throws DataSetException { logger.debug(STR, table, columnNames); DefaultColumnFilter columnFilter = new DefaultColumnFilter(); for (int i = 0; i < columnNames.length; i++) { String columnName = columnNames[i]; columnFilter.includeColumn(columnName); } return new ColumnFilterTable(table, columnFilter); }
/** * Returns a table backed by the specified table that only exposes specified * columns. */
Returns a table backed by the specified table that only exposes specified columns
includedColumnsTable
{ "repo_name": "wbstr/dbunit", "path": "src/main/java/org/dbunit/dataset/filter/DefaultColumnFilter.java", "license": "lgpl-2.1", "size": 6352 }
[ "org.dbunit.dataset.ColumnFilterTable", "org.dbunit.dataset.DataSetException", "org.dbunit.dataset.ITable" ]
import org.dbunit.dataset.ColumnFilterTable; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.ITable;
import org.dbunit.dataset.*;
[ "org.dbunit.dataset" ]
org.dbunit.dataset;
230,264
public long readLongDelta() throws IOException { final int size = readGamma(); return ((1L << size) | readInt(size)) - 1L; }
long function() throws IOException { final int size = readGamma(); return ((1L << size) readInt(size)) - 1L; }
/** * Reads positive number from delta coding into a long. * (see {@link org.pebble.core.encoding.OutputBitStream#writeDelta(long)}). * @return Read number. * @throws IOException in case there is an exception reading from input stream. */
Reads positive number from delta coding into a long. (see <code>org.pebble.core.encoding.OutputBitStream#writeDelta(long)</code>)
readLongDelta
{ "repo_name": "groupon/pebble", "path": "src/main/java/org/pebble/core/decoding/InputBitStream.java", "license": "apache-2.0", "size": 7289 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
982,247
public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { return new Environment() {}; }
Environment function(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { return new Environment() {}; }
/** * Runs before the {@link SCM#checkout(AbstractBuild, Launcher, FilePath, BuildListener, File)} runs, and performs a set up. * Can contribute additional properties to the environment. * * @param build * The build in progress for which an {@link Environment} object is created. * Never null. * @param launcher * This launcher can be used to launch processes for this build. * If the build runs remotely, launcher will also run a job on that remote machine. * Never null. * @param listener * Can be used to send any message. * @return * non-null if the build can continue, null if there was an error * and the build needs to be aborted. * @throws IOException * terminates the build abnormally. Hudson will handle the exception * and reports a nice error message. */
Runs before the <code>SCM#checkout(AbstractBuild, Launcher, FilePath, BuildListener, File)</code> runs, and performs a set up. Can contribute additional properties to the environment
setUp
{ "repo_name": "v1v/jenkins", "path": "core/src/main/java/hudson/slaves/NodeProperty.java", "license": "mit", "size": 7895 }
[ "hudson.model.AbstractBuild", "hudson.model.BuildListener", "hudson.model.Environment", "java.io.IOException" ]
import hudson.model.AbstractBuild; import hudson.model.BuildListener; import hudson.model.Environment; import java.io.IOException;
import hudson.model.*; import java.io.*;
[ "hudson.model", "java.io" ]
hudson.model; java.io;
1,813,690
@Override public List<Subfield> getSubfields() { return Collections.emptyList(); }
List<Subfield> function() { return Collections.emptyList(); }
/** * Always returns an immutable empty list. * @return */
Always returns an immutable empty list
getSubfields
{ "repo_name": "NCSU-Libraries/groovy-marc", "path": "src/main/jaaaava/edu/ncsu/lib/marc/NullDataField.java", "license": "gpl-3.0", "size": 4840 }
[ "java.util.Collections", "java.util.List", "org.marc4j.marc.Subfield" ]
import java.util.Collections; import java.util.List; import org.marc4j.marc.Subfield;
import java.util.*; import org.marc4j.marc.*;
[ "java.util", "org.marc4j.marc" ]
java.util; org.marc4j.marc;
1,435,193
@Override public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException { build.executeAsync(new BuildCallable<Void, IOException>() { // record is transient, so needs to make a copy first private final Set<MavenDependency> d = dependencies;
boolean function(MavenBuildProxy build, MavenProject pom, BuildListener listener) throws InterruptedException, IOException { build.executeAsync(new BuildCallable<Void, IOException>() { private final Set<MavenDependency> d = dependencies;
/** * Sends the collected dependencies over to the master and record them. */
Sends the collected dependencies over to the master and record them
postBuild
{ "repo_name": "shikloshi/jenkins-artifactory-plugin", "path": "src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java", "license": "apache-2.0", "size": 4017 }
[ "hudson.maven.MavenBuildProxy", "hudson.model.BuildListener", "java.io.IOException", "java.util.Set", "org.apache.maven.project.MavenProject", "org.jfrog.hudson.MavenDependency" ]
import hudson.maven.MavenBuildProxy; import hudson.model.BuildListener; import java.io.IOException; import java.util.Set; import org.apache.maven.project.MavenProject; import org.jfrog.hudson.MavenDependency;
import hudson.maven.*; import hudson.model.*; import java.io.*; import java.util.*; import org.apache.maven.project.*; import org.jfrog.hudson.*;
[ "hudson.maven", "hudson.model", "java.io", "java.util", "org.apache.maven", "org.jfrog.hudson" ]
hudson.maven; hudson.model; java.io; java.util; org.apache.maven; org.jfrog.hudson;
418,222
@Test public void testGetSupplierByAnonymous() throws IOException, JSONException { String supplierXml = StreamHelper.readFromFile(FILENAME); String email = rand.nextInt(200) + "@sap.com"; supplierXml = supplierXml.replace( "<d:EmailAddress>email</d:EmailAddress>", "<d:EmailAddress>" + email + "</d:EmailAddress>"); String id = RequestExecutionHelper.createEntityViaREST(ENTITY_NAME, supplierXml, true); HttpResponse resp = RequestExecutionHelper.executeGetRequest( ENTITY_NAME + "?$format=json&$filter=SupplierId%20eq%20'" + id + "'", false); assertEquals("Supplier OData service not secure for HTTP_GET request", HttpURLConnection.HTTP_UNAUTHORIZED, resp.getResponseCode()); resp = RequestExecutionHelper.executeDeleteRequest(ENTITY_NAME + "('" + id + "')", true); assertEquals( "Unable to delete Supplier via REST or incorrect HTTP Response Code:" + resp.getResponseMessage(), HttpURLConnection.HTTP_OK, resp.getResponseCode()); }
void function() throws IOException, JSONException { String supplierXml = StreamHelper.readFromFile(FILENAME); String email = rand.nextInt(200) + STR; supplierXml = supplierXml.replace( STR, STR + email + STR); String id = RequestExecutionHelper.createEntityViaREST(ENTITY_NAME, supplierXml, true); HttpResponse resp = RequestExecutionHelper.executeGetRequest( ENTITY_NAME + STR + id + "'", false); assertEquals(STR, HttpURLConnection.HTTP_UNAUTHORIZED, resp.getResponseCode()); resp = RequestExecutionHelper.executeDeleteRequest(ENTITY_NAME + "('" + id + "')", true); assertEquals( STR + resp.getResponseMessage(), HttpURLConnection.HTTP_OK, resp.getResponseCode()); }
/** * Test Get Supplier by Anonymous user. * * @throws IOException * @throws JSONException */
Test Get Supplier by Anonymous user
testGetSupplierByAnonymous
{ "repo_name": "steve27/espm-cloud-beta", "path": "espm-cloud-web/src/test/java/com/sap/espm/model/web/SupplierODataIT.java", "license": "apache-2.0", "size": 9787 }
[ "com.sap.espm.model.web.util.HttpResponse", "com.sap.espm.model.web.util.RequestExecutionHelper", "com.sap.espm.model.web.util.StreamHelper", "java.io.IOException", "java.net.HttpURLConnection", "org.codehaus.jettison.json.JSONException", "org.junit.Assert" ]
import com.sap.espm.model.web.util.HttpResponse; import com.sap.espm.model.web.util.RequestExecutionHelper; import com.sap.espm.model.web.util.StreamHelper; import java.io.IOException; import java.net.HttpURLConnection; import org.codehaus.jettison.json.JSONException; import org.junit.Assert;
import com.sap.espm.model.web.util.*; import java.io.*; import java.net.*; import org.codehaus.jettison.json.*; import org.junit.*;
[ "com.sap.espm", "java.io", "java.net", "org.codehaus.jettison", "org.junit" ]
com.sap.espm; java.io; java.net; org.codehaus.jettison; org.junit;
1,571,882
private void renderCB(int dx, int dy, List<FeatureTerm> terms, FTKBase dm, Path sp, Path dp, FTLGUI ftlgui) { // set up the renderers // draw the nodes as basic shapes // Renderer nodeR = new ShapeRenderer(20); LabelRenderer nodeR = new LabelRenderer("name"); nodeR.setHorizontalPadding(4); nodeR.setVerticalPadding(2); nodeR.setRoundedCorner(8, 8); // round the corners EdgeRenderer edgeR = new LabelEdgeRenderer(Constants.EDGE_TYPE_LINE, Constants.EDGE_ARROW_FORWARD); edgeR.setArrowHeadSize(6, 6); // draw aggregates as polygons with curved edges PolygonRenderer polyR = new PolygonRenderer(Constants.POLY_TYPE_CURVE); polyR.setCurveSlack(0.15f); DefaultRendererFactory drf = new DefaultRendererFactory(nodeR, edgeR); drf.add("ingroup('aggregates')", polyR); m_vis.setRendererFactory(drf); // set up the visual operators // first set up all the color actions ColorAction nFill = new ColorAction(NODES, VisualItem.FILLCOLOR); nFill.setDefaultColor(ColorLib.gray(255)); nFill.add("_hover", ColorLib.gray(200)); ColorAction nEdges = new ColorAction(EDGES, VisualItem.STROKECOLOR); nEdges.setDefaultColor(ColorLib.gray(100)); // ColorAction aStroke = new ColorAction(AGGR, VisualItem.STROKECOLOR); // aStroke.setDefaultColor(ColorLib.gray(200)); // aStroke.add("_hover", ColorLib.rgb(255,100,100)); // bundle the color actions ActionList colors = new ActionList(); colors.add(nFill); colors.add(nEdges); // colors.add(aStroke); // colors.add(aFill); // now create the main layout routine ActionList layout = new ActionList(Activity.INFINITY); ForceDirectedLayout fdl = new ForceDirectedLayout(GRAPH, false, false); ForceSimulator m_fsim = new ForceSimulator(); float gravConstant = -10f; // the more negative, the more repelling float minDistance = 50; // -1 for always on, the more positive, the more space between nodes float theta = 0; // the lower, the more single-node repell calculation m_fsim.addForce(new NBodyForce(gravConstant, minDistance, theta)); m_fsim.addForce(new SpringForce(1E-4f, 200)); m_fsim.addForce(new DragForce()); fdl.setForceSimulator(m_fsim); layout.add(colors); layout.add(fdl); // layout.add(new AggregateLayout(AGGR)); layout.add(new RepaintAction()); m_vis.putAction("layout", layout); // set up the display setPreferredSize(new Dimension(dx, dy)); // pan(250, 250); setHighQuality(true); // addControlListener(new AggregateDragControl()); addControlListener(new DragControl(true)); addControlListener(new ZoomControl()); addControlListener(new PanControl(false));// arrastrar para mover el conjunto addControlListener(new TermSelectControl(terms, dm, sp, dp, ftlgui)); // addControlListener(new WheelZoomControl()); ZoomToFitControl zoomListener = new ZoomToFitControl(); zoomListener.setZoomOverItem(false); addControlListener(zoomListener); addControlListener(new WheelScrollControl(this.getHeight())); // ActionList draw = new ActionList(); // draw.add(new GraphDistanceFilter(GRAPH, 50)); // m_vis.putAction("draw", draw); if (distancesComputed) setCursor(null); // set things running m_vis.run("layout"); }
void function(int dx, int dy, List<FeatureTerm> terms, FTKBase dm, Path sp, Path dp, FTLGUI ftlgui) { LabelRenderer nodeR = new LabelRenderer("name"); nodeR.setHorizontalPadding(4); nodeR.setVerticalPadding(2); nodeR.setRoundedCorner(8, 8); EdgeRenderer edgeR = new LabelEdgeRenderer(Constants.EDGE_TYPE_LINE, Constants.EDGE_ARROW_FORWARD); edgeR.setArrowHeadSize(6, 6); PolygonRenderer polyR = new PolygonRenderer(Constants.POLY_TYPE_CURVE); polyR.setCurveSlack(0.15f); DefaultRendererFactory drf = new DefaultRendererFactory(nodeR, edgeR); drf.add(STR, polyR); m_vis.setRendererFactory(drf); ColorAction nFill = new ColorAction(NODES, VisualItem.FILLCOLOR); nFill.setDefaultColor(ColorLib.gray(255)); nFill.add(STR, ColorLib.gray(200)); ColorAction nEdges = new ColorAction(EDGES, VisualItem.STROKECOLOR); nEdges.setDefaultColor(ColorLib.gray(100)); ActionList colors = new ActionList(); colors.add(nFill); colors.add(nEdges); ActionList layout = new ActionList(Activity.INFINITY); ForceDirectedLayout fdl = new ForceDirectedLayout(GRAPH, false, false); ForceSimulator m_fsim = new ForceSimulator(); float gravConstant = -10f; float minDistance = 50; float theta = 0; m_fsim.addForce(new NBodyForce(gravConstant, minDistance, theta)); m_fsim.addForce(new SpringForce(1E-4f, 200)); m_fsim.addForce(new DragForce()); fdl.setForceSimulator(m_fsim); layout.add(colors); layout.add(fdl); layout.add(new RepaintAction()); m_vis.putAction(STR, layout); setPreferredSize(new Dimension(dx, dy)); setHighQuality(true); addControlListener(new DragControl(true)); addControlListener(new ZoomControl()); addControlListener(new PanControl(false)); addControlListener(new TermSelectControl(terms, dm, sp, dp, ftlgui)); ZoomToFitControl zoomListener = new ZoomToFitControl(); zoomListener.setZoomOverItem(false); addControlListener(zoomListener); addControlListener(new WheelScrollControl(this.getHeight())); if (distancesComputed) setCursor(null); m_vis.run(STR); }
/** * Render cb. * * @param dx * the dx * @param dy * the dy * @param terms * the terms * @param dm * the dm * @param sp * the sp * @param dp * the dp * @param ftlgui * the ftlgui */
Render cb
renderCB
{ "repo_name": "santiontanon/fterm", "path": "src/ftl/base/visualization/CBVisualizer.java", "license": "bsd-3-clause", "size": 38895 }
[ "java.awt.Dimension", "java.util.List" ]
import java.awt.Dimension; import java.util.List;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
2,774,673
public String loadAsString() throws IOException { return new String(load(), StandardCharsets.UTF_8); }
String function() throws IOException { return new String(load(), StandardCharsets.UTF_8); }
/** * Load the slice as a string. * * @return the string * @throws IOException * if slice cannot be read. */
Load the slice as a string
loadAsString
{ "repo_name": "lukehutch/fast-classpath-scanner", "path": "src/main/java/nonapi/io/github/classgraph/fileslice/Slice.java", "license": "mit", "size": 11519 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets" ]
import java.io.IOException; import java.nio.charset.StandardCharsets;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,093,355
protected void addBranchedVersionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Version_branchedVersions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Version_branchedVersions_feature", "_UI_Version_type"), VersioningPackage.Literals.VERSION__BRANCHED_VERSIONS, true, false, true, null, null, null)); }
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VersioningPackage.Literals.VERSION__BRANCHED_VERSIONS, true, false, true, null, null, null)); }
/** * This adds a property descriptor for the Branched Versions feature. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @generated */
This adds a property descriptor for the Branched Versions feature.
addBranchedVersionsPropertyDescriptor
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/provider/VersionItemProvider.java", "license": "epl-1.0", "size": 10614 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.emfstore.internal.server.model.versioning.VersioningPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.emfstore.internal.server.model.versioning.VersioningPackage;
import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.emfstore.internal.server.model.versioning.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
18,794
public List<DataLakeStoreAccountInformationInner> dataLakeStoreAccounts() { return this.dataLakeStoreAccounts; }
List<DataLakeStoreAccountInformationInner> function() { return this.dataLakeStoreAccounts; }
/** * Get the list of Data Lake Store accounts associated with this account. * * @return the dataLakeStoreAccounts value */
Get the list of Data Lake Store accounts associated with this account
dataLakeStoreAccounts
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/datalakeanalytics/mgmt-v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java", "license": "mit", "size": 13498 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,610,884
protected Rectangle getHighlightBounds() { AffineTransform at = component.getRenderingTransform(); Shape s = at.createTransformedShape(selectionHighlight); return outset(s.getBounds(), 1); } protected class SelectionOverlay implements Overlay {
Rectangle function() { AffineTransform at = component.getRenderingTransform(); Shape s = at.createTransformedShape(selectionHighlight); return outset(s.getBounds(), 1); } protected class SelectionOverlay implements Overlay {
/** * The highlight bounds. */
The highlight bounds
getHighlightBounds
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/swing/gvt/TextSelectionManager.java", "license": "apache-2.0", "size": 10759 }
[ "java.awt.Rectangle", "java.awt.Shape", "java.awt.geom.AffineTransform" ]
import java.awt.Rectangle; import java.awt.Shape; import java.awt.geom.AffineTransform;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,389,031
@Override public void println(long x) throws IOException { print(x); println(); }
void function(long x) throws IOException { print(x); println(); }
/** * Print a long integer and then terminate the line. This method behaves * as though it invokes <code>{@link #print(long)}</code> and then * <code>{@link #println()}</code>. */
Print a long integer and then terminate the line. This method behaves as though it invokes <code><code>#print(long)</code></code> and then <code><code>#println()</code></code>
println
{ "repo_name": "barreiro/jastow", "path": "src/main/java/org/apache/jasper/runtime/JspWriterImpl.java", "license": "apache-2.0", "size": 17429 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
241,542
public static Expression messageExpression(final Function<Message, Object> function) { return inMessageExpression(function); }
static Expression function(final Function<Message, Object> function) { return inMessageExpression(function); }
/** * Returns a functional expression for the IN message */
Returns a functional expression for the IN message
messageExpression
{ "repo_name": "christophd/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java", "license": "apache-2.0", "size": 65509 }
[ "java.util.function.Function", "org.apache.camel.Expression", "org.apache.camel.Message" ]
import java.util.function.Function; import org.apache.camel.Expression; import org.apache.camel.Message;
import java.util.function.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,015,019
public void setAuthToken(AuthToken auth) { authToken = auth; }
void function(AuthToken auth) { authToken = auth; }
/** * Sets the new Authorization Token for this session. The session is not yet considered fully * authenticated (i.e. active) since a resource has not been binded at this point. This * message will be sent after SASL authentication was successful but yet resource binding * is required. * * @param auth the authentication token obtained from SASL authentication. */
Sets the new Authorization Token for this session. The session is not yet considered fully authenticated (i.e. active) since a resource has not been binded at this point. This message will be sent after SASL authentication was successful but yet resource binding is required
setAuthToken
{ "repo_name": "mhd911/openfire", "path": "src/java/org/jivesoftware/openfire/session/LocalClientSession.java", "license": "apache-2.0", "size": 36702 }
[ "org.jivesoftware.openfire.auth.AuthToken" ]
import org.jivesoftware.openfire.auth.AuthToken;
import org.jivesoftware.openfire.auth.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
1,487,208
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString(); return isFeatureSupportedByServer(connection, featureName); }
static boolean function(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + STR + action.toString(); return isFeatureSupportedByServer(connection, featureName); }
/** * Check if server supports specified action. * @param connection active xmpp connection * @param action action to check * @return true if this action is supported. * @throws XMPPErrorException * @throws NoResponseException * @throws NotConnectedException * @throws InterruptedException */
Check if server supports specified action
isActionSupported
{ "repo_name": "Tibo-lg/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java", "license": "apache-2.0", "size": 4999 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPConnection", "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smackx.amp.packet.AMPExtension" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.amp.packet.AMPExtension;
import org.jivesoftware.smack.*; import org.jivesoftware.smackx.amp.packet.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
org.jivesoftware.smack; org.jivesoftware.smackx;
1,132,082
public static AttributeType createAttribute(String name, String nameFormat, Object... attributeValues) { AttributeType att = new AttributeType(name); att.setNameFormat(nameFormat); if (attributeValues != null && attributeValues.length > 0) { for (Object attributeValue : attributeValues) { att.addAttributeValue(attributeValue); } } return att; } /** * <p> * Add validity conditions to the SAML2 Assertion * </p> * <p> * There is no clock skew added. * * @param assertion * @param durationInMilis * * @throws ConfigurationException * @throws IssueInstantMissingException * @see {{@link #createTimedConditions(AssertionType, long, long)}
static AttributeType function(String name, String nameFormat, Object... attributeValues) { AttributeType att = new AttributeType(name); att.setNameFormat(nameFormat); if (attributeValues != null && attributeValues.length > 0) { for (Object attributeValue : attributeValues) { att.addAttributeValue(attributeValue); } } return att; } /** * <p> * Add validity conditions to the SAML2 Assertion * </p> * <p> * There is no clock skew added. * * @param assertion * @param durationInMilis * * @throws ConfigurationException * @throws IssueInstantMissingException * @see {{@link #createTimedConditions(AssertionType, long, long)}
/** * Create an attribute type * * @param name Name of the attribute * @param nameFormat name format uri * @param attributeValues an object array of attribute values * * @return */
Create an attribute type
createAttribute
{ "repo_name": "chameleon82/keycloak", "path": "saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/util/AssertionUtil.java", "license": "apache-2.0", "size": 22336 }
[ "org.keycloak.dom.saml.v2.assertion.AssertionType", "org.keycloak.dom.saml.v2.assertion.AttributeType", "org.keycloak.saml.common.exceptions.ConfigurationException", "org.keycloak.saml.common.exceptions.fed.IssueInstantMissingException" ]
import org.keycloak.dom.saml.v2.assertion.AssertionType; import org.keycloak.dom.saml.v2.assertion.AttributeType; import org.keycloak.saml.common.exceptions.ConfigurationException; import org.keycloak.saml.common.exceptions.fed.IssueInstantMissingException;
import org.keycloak.dom.saml.v2.assertion.*; import org.keycloak.saml.common.exceptions.*; import org.keycloak.saml.common.exceptions.fed.*;
[ "org.keycloak.dom", "org.keycloak.saml" ]
org.keycloak.dom; org.keycloak.saml;
1,842,664
List<Member> findMembersInParentGroup(PerunSession sess, Group group, String searchString);
List<Member> findMembersInParentGroup(PerunSession sess, Group group, String searchString);
/** * Return list of members by the searchString udner parentGroup of defined Group. Search is done in name, email and login. * If the group is top-level group, searching in "members" group of vo in which the group exists. * * @param sess * @param group this group is used to get parent group, we are searching members of the parent group * @param searchString * @return * @throws InternalErrorException */
Return list of members by the searchString udner parentGroup of defined Group. Search is done in name, email and login. If the group is top-level group, searching in "members" group of vo in which the group exists
findMembersInParentGroup
{ "repo_name": "balcirakpeter/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/MembersManagerBl.java", "license": "bsd-2-clause", "size": 74930 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "java.util.List" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import java.util.List;
import cz.metacentrum.perun.core.api.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,151,329
public void close() throws IOException { //nop }
void function() throws IOException { }
/** * Closing a <tt>ByteArrayOutputStream</tt> has no effect. The methods in * this class can be called after the stream has been closed without * generating an <tt>IOException</tt>. * * @throws IOException never (this method should not declare this exception * but it has to now due to backwards compatability) */
Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException
close
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "commons/fr.opensagres.xdocreport.commons.utils/src/fr/opensagres/xdocreport/commons/utils/ByteArrayOutputStream.java", "license": "lgpl-2.1", "size": 10399 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,954,338
public static String getExtension(File file) { String filePath = file.getAbsolutePath(); return TFileUtils.getExtension(filePath); }
static String function(File file) { String filePath = file.getAbsolutePath(); return TFileUtils.getExtension(filePath); }
/** * Returns the extension of the specified <code>file</code>. * * @param file The specified <code>file</code> * @return The extension of the specified <code>file</code> */
Returns the extension of the specified <code>file</code>
getExtension
{ "repo_name": "hendyyou/FST", "path": "src/tico/components/resources/TFileUtils.java", "license": "gpl-3.0", "size": 12894 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
201,867
public void testConstructor() { CopyOnWriteArraySet a = new CopyOnWriteArraySet(); assertTrue(a.isEmpty()); }
void function() { CopyOnWriteArraySet a = new CopyOnWriteArraySet(); assertTrue(a.isEmpty()); }
/** * Default-constructed set is empty */
Default-constructed set is empty
testConstructor
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java", "license": "gpl-2.0", "size": 13665 }
[ "java.util.concurrent.CopyOnWriteArraySet" ]
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,960,377
public FileSystem getFileSystem() { return fileSystem; }
FileSystem function() { return fileSystem; }
/** * Returns the FileSystem in use. */
Returns the FileSystem in use
getFileSystem
{ "repo_name": "meteorcloudy/bazel", "path": "src/test/java/com/google/devtools/build/lib/testutil/Scratch.java", "license": "apache-2.0", "size": 8117 }
[ "com.google.devtools.build.lib.vfs.FileSystem" ]
import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
495,122
public void draw(Graphics2D g) { g.setColor(color); g.drawLine(x1, y1, x2, y2); } // used with a potential scaling technique // public void drawScaled(Graphics2D g, int scaleFactor) { // g.setColor(color); // g.drawLine(x1*scaleFactor, y1*scaleFactor, x2*scaleFactor, y2*scaleFactor); // }
void function(Graphics2D g) { g.setColor(color); g.drawLine(x1, y1, x2, y2); }
/** * Draws the line into the give graphics object */
Draws the line into the give graphics object
draw
{ "repo_name": "mathturtle/javapaint", "path": "src/waldonsm/paint/tools/drawables/LineDrawable.java", "license": "artistic-2.0", "size": 1861 }
[ "java.awt.Graphics2D" ]
import java.awt.Graphics2D;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,428,279
default <KeyT> WindowByBuilder<InputT, KeyT> projected(UnaryFunction<InputT, KeyT> transform) { return projected(transform, SelectionPolicy.ANY, null); }
default <KeyT> WindowByBuilder<InputT, KeyT> projected(UnaryFunction<InputT, KeyT> transform) { return projected(transform, SelectionPolicy.ANY, null); }
/** * Optionally specifies a function to transform the input elements into another type among which * to find the distincts. * * <p>This is, while windowing will be applied on basis of original input elements, the distinct * operator will be carried out on the transformed elements. * * @param <KeyT> the type of the transformed elements * @param transform a transform function applied to input element * @return the next builder to complete the setup of the {@link Distinct} operator */
Optionally specifies a function to transform the input elements into another type among which to find the distincts. This is, while windowing will be applied on basis of original input elements, the distinct operator will be carried out on the transformed elements
projected
{ "repo_name": "RyanSkraba/beam", "path": "sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/client/operator/Distinct.java", "license": "apache-2.0", "size": 15666 }
[ "org.apache.beam.sdk.extensions.euphoria.core.client.functional.UnaryFunction" ]
import org.apache.beam.sdk.extensions.euphoria.core.client.functional.UnaryFunction;
import org.apache.beam.sdk.extensions.euphoria.core.client.functional.*;
[ "org.apache.beam" ]
org.apache.beam;
1,702,930
public int find(String what, int start) { try { ByteBuffer src = ByteBuffer.wrap(this.bytes, 0, this.length); ByteBuffer tgt = encode(what); byte b = tgt.get(); src.position(start); while (src.hasRemaining()) { if (b == src.get()) { // matching first byte src.mark(); // save position in loop tgt.mark(); // save position in target boolean found = true; int pos = src.position() - 1; while (tgt.hasRemaining()) { if (!src.hasRemaining()) { // src expired first tgt.reset(); src.reset(); found = false; break; } if (!(tgt.get() == src.get())) { tgt.reset(); src.reset(); found = false; break; // no match } } if (found) { return pos; } } } return -1; // not found } catch (CharacterCodingException e) { // can't get here e.printStackTrace(); return -1; } }
int function(String what, int start) { try { ByteBuffer src = ByteBuffer.wrap(this.bytes, 0, this.length); ByteBuffer tgt = encode(what); byte b = tgt.get(); src.position(start); while (src.hasRemaining()) { if (b == src.get()) { src.mark(); tgt.mark(); boolean found = true; int pos = src.position() - 1; while (tgt.hasRemaining()) { if (!src.hasRemaining()) { tgt.reset(); src.reset(); found = false; break; } if (!(tgt.get() == src.get())) { tgt.reset(); src.reset(); found = false; break; } } if (found) { return pos; } } } return -1; } catch (CharacterCodingException e) { e.printStackTrace(); return -1; } }
/** * Finds any occurence of <code>what</code> in the backing buffer, starting as position <code>start</code>. The * starting position is measured in bytes and the return value is in terms of byte position in the buffer. The backing * buffer is not converted to a string for this operation. * * @return byte position of the first occurence of the search string in the UTF-8 buffer or -1 if not found */
Finds any occurence of <code>what</code> in the backing buffer, starting as position <code>start</code>. The starting position is measured in bytes and the return value is in terms of byte position in the buffer. The backing buffer is not converted to a string for this operation
find
{ "repo_name": "KulykRoman/drill", "path": "exec/vector/src/main/java/org/apache/drill/exec/util/Text.java", "license": "apache-2.0", "size": 19110 }
[ "java.nio.ByteBuffer", "java.nio.charset.CharacterCodingException" ]
import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException;
import java.nio.*; import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,117,287
public void initializeFileDirectories() throws APIRestGeneratorException { // Get the name of the translator that is going to be generated final String translatorName = this.getTranslatorType(); TranslatorGeneratorBaseClientAngular2.LOGGER.info("Initializing files and creating directories with base [{}] for translator [{}]", this.getGenerationParams().getCodeGenOutputDirectory(), translatorName); // Build the paths final String sourcePath = this.getGenerationParams().getCodeGenOutputDirectory() + File.separator + translatorName ; // Resource path final String resourcePath = this.getGenerationParams().getCodeGenOutputDirectory() + File.separator + translatorName + File.separator + ConstantsOutputClientWeb.GEN_RESOURCES_DIR_WEB; // Initialize the files this.sourceDir = new File(sourcePath); this.resourceDir = new File(resourcePath); // Make the directories FilesUtility.createFullDirectoryTree(this.sourceDir); FilesUtility.createFullDirectoryTree(this.resourceDir); }
void function() throws APIRestGeneratorException { final String translatorName = this.getTranslatorType(); TranslatorGeneratorBaseClientAngular2.LOGGER.info(STR, this.getGenerationParams().getCodeGenOutputDirectory(), translatorName); final String sourcePath = this.getGenerationParams().getCodeGenOutputDirectory() + File.separator + translatorName ; final String resourcePath = this.getGenerationParams().getCodeGenOutputDirectory() + File.separator + translatorName + File.separator + ConstantsOutputClientWeb.GEN_RESOURCES_DIR_WEB; this.sourceDir = new File(sourcePath); this.resourceDir = new File(resourcePath); FilesUtility.createFullDirectoryTree(this.sourceDir); FilesUtility.createFullDirectoryTree(this.resourceDir); }
/** * Initialize the file references and directory references for the rest of the generation. * It will also create the required directory paths for the generation. * * @throws APIRestGeneratorException exception thrown if there is any problem. */
Initialize the file references and directory references for the rest of the generation. It will also create the required directory paths for the generation
initializeFileDirectories
{ "repo_name": "BBVA-CIB/APIRestGenerator", "path": "generator.client.angular2/src/main/java/com/bbva/kltt/apirest/generator/client/angular2/velocity/TranslatorGeneratorBaseClientAngular2.java", "license": "apache-2.0", "size": 5121 }
[ "com.bbva.kltt.apirest.core.util.APIRestGeneratorException", "com.bbva.kltt.apirest.core.util.FilesUtility", "com.bbva.kltt.apirest.generator.client.web.util.ConstantsOutputClientWeb", "java.io.File" ]
import com.bbva.kltt.apirest.core.util.APIRestGeneratorException; import com.bbva.kltt.apirest.core.util.FilesUtility; import com.bbva.kltt.apirest.generator.client.web.util.ConstantsOutputClientWeb; import java.io.File;
import com.bbva.kltt.apirest.core.util.*; import com.bbva.kltt.apirest.generator.client.web.util.*; import java.io.*;
[ "com.bbva.kltt", "java.io" ]
com.bbva.kltt; java.io;
2,838,679
public void forEach(CheckedConsumer<QueryCursor> consumer) throws JdbxException { Check.notNull(consumer, "consumer"); CheckedConsumer<QueryCursor> c = cursor -> { int index = -1; while (allowRow(++index) && cursor.next()) consumer.accept(cursor); }; result_.read(c); }
void function(CheckedConsumer<QueryCursor> consumer) throws JdbxException { Check.notNull(consumer, STR); CheckedConsumer<QueryCursor> c = cursor -> { int index = -1; while (allowRow(++index) && cursor.next()) consumer.accept(cursor); }; result_.read(c); }
/** * Loops through all rows of the ResultSet and calls * the consumer for each row. * @param consumer a ResultSet consumer */
Loops through all rows of the ResultSet and calls the consumer for each row
forEach
{ "repo_name": "jdlib/JDBX", "path": "src/java/org/jdbx/QResultRows.java", "license": "apache-2.0", "size": 12816 }
[ "org.jdbx.function.CheckedConsumer" ]
import org.jdbx.function.CheckedConsumer;
import org.jdbx.function.*;
[ "org.jdbx.function" ]
org.jdbx.function;
435,155
public static boolean isEnabled(String a11yClassName) { String[] paths = new String[] {System.getProperty("user.home") + File.separator + ".accessibility.properties", System.getProperty("java.home") + File.separator + "lib" + File.separator + "accessibility.properties"}; Properties properties = new Properties(); for (String path : paths) { try { FileInputStream in = new FileInputStream(new File(path)); try { properties.load(in); } finally { in.close(); } } catch (Exception ignore) { continue; } if (!properties.isEmpty()) break; } if (!properties.isEmpty()) { // First, check the system property String classNames = System.getProperty("javax.accessibility.assistive_technologies"); if (classNames == null) { // If the system property is not set, Toolkit will try to use the properties file. classNames = properties.getProperty("assistive_technologies", null); } if (classNames != null && classNames.contains(a11yClassName)) { return true; } } return false; }
static boolean function(String a11yClassName) { String[] paths = new String[] {System.getProperty(STR) + File.separator + STR, System.getProperty(STR) + File.separator + "lib" + File.separator + STR}; Properties properties = new Properties(); for (String path : paths) { try { FileInputStream in = new FileInputStream(new File(path)); try { properties.load(in); } finally { in.close(); } } catch (Exception ignore) { continue; } if (!properties.isEmpty()) break; } if (!properties.isEmpty()) { String classNames = System.getProperty(STR); if (classNames == null) { classNames = properties.getProperty(STR, null); } if (classNames != null && classNames.contains(a11yClassName)) { return true; } } return false; }
/** * Checks whether a particular a11y technology is enabled, in order of priority: * 1) via the sys. property: "javax.accessibility.assistive_technologies" * 2) in the prop. file: <user home>/.accessibility.properties * 3) in the prop. file: <jre>/lib/accessibility.properties * * @see #ACCESS_BRIDGE * @see #ATK_WRAPPER * @param a11yClassName the full class name representing the a11y technology * @return true if enabled, otherwise false */
Checks whether a particular a11y technology is enabled, in order of priority: 1) via the sys. property: "javax.accessibility.assistive_technologies" 2) in the prop. file: /.accessibility.properties 3) in the prop. file: /lib/accessibility.properties
isEnabled
{ "repo_name": "goodwinnk/intellij-community", "path": "platform/util/src/com/intellij/util/ui/accessibility/ScreenReader.java", "license": "apache-2.0", "size": 3287 }
[ "java.io.File", "java.io.FileInputStream", "java.util.Properties" ]
import java.io.File; import java.io.FileInputStream; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,507,704
@Override public int hashCode() { return Objects.hash(super.hashCode(), scale); }
@Override int function() { return Objects.hash(super.hashCode(), scale); }
/** Return a hash code value for this instance. * @see java.lang.Object#hashCode */
Return a hash code value for this instance
hashCode
{ "repo_name": "peterdettman/bitcoinj", "path": "core/src/main/java/org/bitcoinj/utils/BtcFixedFormat.java", "license": "apache-2.0", "size": 8003 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,587,149
private static String getCompatibleVersion(JasperReportsConfiguration jconfig) { // assume last version as safe fall-back String ver = Misc.nvl(jconfig.getProperty(StudioPreferencePage.JSS_COMPATIBILITY_VERSION), LAST_VERSION); if (LAST_VERSION.equals(ver)) { return net.sf.jasperreports.engine.JasperCompileManager.class.getPackage().getImplementationVersion(); } else { return ver; } }
static String function(JasperReportsConfiguration jconfig) { String ver = Misc.nvl(jconfig.getProperty(StudioPreferencePage.JSS_COMPATIBILITY_VERSION), LAST_VERSION); if (LAST_VERSION.equals(ver)) { return net.sf.jasperreports.engine.JasperCompileManager.class.getPackage().getImplementationVersion(); } else { return ver; } }
/** * Reads the information about the compatible version of JasperReports to be used. * * @param jconfig * the JasperReports context * @return the compatible version */
Reads the information about the compatible version of JasperReports to be used
getCompatibleVersion
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/compatibility/JRXmlWriterHelper.java", "license": "lgpl-3.0", "size": 9871 }
[ "com.jaspersoft.studio.preferences.StudioPreferencePage", "com.jaspersoft.studio.utils.Misc", "com.jaspersoft.studio.utils.jasper.JasperReportsConfiguration" ]
import com.jaspersoft.studio.preferences.StudioPreferencePage; import com.jaspersoft.studio.utils.Misc; import com.jaspersoft.studio.utils.jasper.JasperReportsConfiguration;
import com.jaspersoft.studio.preferences.*; import com.jaspersoft.studio.utils.*; import com.jaspersoft.studio.utils.jasper.*;
[ "com.jaspersoft.studio" ]
com.jaspersoft.studio;
1,196,012
// attach default role to user user.setRoles(new String[]{PlatformConstants.DEFAULT_USER_ROLE}); if (log.isDebugEnabled()) { log.debug(user.toString()); } FutureCallback<UserIdentifier> callback = new FutureCallback<>(); // reset the password here so we can authenticate later // this means we will set a random password every time we have a facebook user try to log in user.setPassword(RandomStringUtils.randomAlphabetic(15)); try { commandBus.dispatch(new GenericCommandMessage<>( new CreateFacebookUserCommand(new UserIdentifier(user.getId()), user)), callback ); } catch (StructuralCommandValidationFailedException e) { log.error(e.getMessage(), e); } UserIdentifier userIdentifier; try { userIdentifier = callback.get(); if (userIdentifier != null) { UserDetails userDetails = userDetailsService.loadUserByUsername(user.getEmail()); if (userDetails != null) { try { apiAuthenticationSuccessHandler.onAuthenticationSuccess(request, response, new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities())); } catch (IOException e) { log.error(e.getMessage(), e); throw new AuthenticationServiceException("Could not authenticate user", e); } catch (ServletException e) { log.error(e.getMessage(), e); throw new AuthenticationServiceException("Could not authenticate user", e); } } else { if (log.isDebugEnabled()) { log.debug("Could not find Facebook user with username: " + user.getEmail()); } } } } catch (InterruptedException e) { log.error(e.getMessage(), e); } catch (ExecutionException e) { log.error(e.getMessage(), e); } }
user.setRoles(new String[]{PlatformConstants.DEFAULT_USER_ROLE}); if (log.isDebugEnabled()) { log.debug(user.toString()); } FutureCallback<UserIdentifier> callback = new FutureCallback<>(); user.setPassword(RandomStringUtils.randomAlphabetic(15)); try { commandBus.dispatch(new GenericCommandMessage<>( new CreateFacebookUserCommand(new UserIdentifier(user.getId()), user)), callback ); } catch (StructuralCommandValidationFailedException e) { log.error(e.getMessage(), e); } UserIdentifier userIdentifier; try { userIdentifier = callback.get(); if (userIdentifier != null) { UserDetails userDetails = userDetailsService.loadUserByUsername(user.getEmail()); if (userDetails != null) { try { apiAuthenticationSuccessHandler.onAuthenticationSuccess(request, response, new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities())); } catch (IOException e) { log.error(e.getMessage(), e); throw new AuthenticationServiceException(STR, e); } catch (ServletException e) { log.error(e.getMessage(), e); throw new AuthenticationServiceException(STR, e); } } else { if (log.isDebugEnabled()) { log.debug(STR + user.getEmail()); } } } } catch (InterruptedException e) { log.error(e.getMessage(), e); } catch (ExecutionException e) { log.error(e.getMessage(), e); } }
/** * Creates / Updates a facebook user details with the user object locally * * @param user user * @return */
Creates / Updates a facebook user details with the user object locally
updateFacebookUser
{ "repo_name": "bjornharvold/bearchoke", "path": "bearchoke-backend/bearchoke-server/bearchoke-server-frontend/src/main/java/com/bearchoke/platform/server/frontend/web/controller/FacebookController.java", "license": "apache-2.0", "size": 5772 }
[ "com.bearchoke.platform.api.user.command.CreateFacebookUserCommand", "com.bearchoke.platform.api.user.identifier.UserIdentifier", "com.bearchoke.platform.base.PlatformConstants", "java.io.IOException", "java.util.concurrent.ExecutionException", "javax.servlet.ServletException", "org.apache.commons.lang3.RandomStringUtils", "org.axonframework.commandhandling.GenericCommandMessage", "org.axonframework.commandhandling.StructuralCommandValidationFailedException", "org.axonframework.commandhandling.callbacks.FutureCallback", "org.springframework.security.authentication.AuthenticationServiceException", "org.springframework.security.authentication.UsernamePasswordAuthenticationToken", "org.springframework.security.core.userdetails.UserDetails" ]
import com.bearchoke.platform.api.user.command.CreateFacebookUserCommand; import com.bearchoke.platform.api.user.identifier.UserIdentifier; import com.bearchoke.platform.base.PlatformConstants; import java.io.IOException; import java.util.concurrent.ExecutionException; import javax.servlet.ServletException; import org.apache.commons.lang3.RandomStringUtils; import org.axonframework.commandhandling.GenericCommandMessage; import org.axonframework.commandhandling.StructuralCommandValidationFailedException; import org.axonframework.commandhandling.callbacks.FutureCallback; import org.springframework.security.authentication.AuthenticationServiceException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.userdetails.UserDetails;
import com.bearchoke.platform.api.user.command.*; import com.bearchoke.platform.api.user.identifier.*; import com.bearchoke.platform.base.*; import java.io.*; import java.util.concurrent.*; import javax.servlet.*; import org.apache.commons.lang3.*; import org.axonframework.commandhandling.*; import org.axonframework.commandhandling.callbacks.*; import org.springframework.security.authentication.*; import org.springframework.security.core.userdetails.*;
[ "com.bearchoke.platform", "java.io", "java.util", "javax.servlet", "org.apache.commons", "org.axonframework.commandhandling", "org.springframework.security" ]
com.bearchoke.platform; java.io; java.util; javax.servlet; org.apache.commons; org.axonframework.commandhandling; org.springframework.security;
2,285,348
public LinkedHashSet<OWLAnnotationProperty> getSubAnnotationPropertyReflexiveClosureOf( OWLAnnotationProperty prop) { LinkedHashSet<OWLAnnotationProperty> subProps = new LinkedHashSet<OWLAnnotationProperty>(); subProps.add(prop); subProps.addAll(this.getSubAnnotationPropertyClosureOf(prop)); return subProps; }
LinkedHashSet<OWLAnnotationProperty> function( OWLAnnotationProperty prop) { LinkedHashSet<OWLAnnotationProperty> subProps = new LinkedHashSet<OWLAnnotationProperty>(); subProps.add(prop); subProps.addAll(this.getSubAnnotationPropertyClosureOf(prop)); return subProps; }
/** * Returns all sub-properties of <code>prop</code> in all ontologies, * and <code>prop</code> itself as the first element (reflexive). * The returned sub-properties are ordered from the more general (the closest * from <code>prop</code>) to the more precise. * * @param prop the <code>OWLAnnotationProperty</code> for which we want * the ordered sub-properties. * @return A <code>LinkedHashSet</code> of <code>OWLAnnotationProperty</code>s * ordered from the more general to the more precise, with <code>prop</code> * as the first element. * * @see #getSubAnnotationPropertiesOf(OWLAnnotationProperty) * @see #getSubAnnotationPropertyClosureOf(OWLAnnotationProperty) */
Returns all sub-properties of <code>prop</code> in all ontologies, and <code>prop</code> itself as the first element (reflexive). The returned sub-properties are ordered from the more general (the closest from <code>prop</code>) to the more precise
getSubAnnotationPropertyReflexiveClosureOf
{ "repo_name": "dhimmel/owltools", "path": "OWLTools-Core/src/main/java/owltools/graph/OWLGraphWrapperEdgesExtended.java", "license": "bsd-3-clause", "size": 87053 }
[ "java.util.LinkedHashSet", "org.semanticweb.owlapi.model.OWLAnnotationProperty" ]
import java.util.LinkedHashSet; import org.semanticweb.owlapi.model.OWLAnnotationProperty;
import java.util.*; import org.semanticweb.owlapi.model.*;
[ "java.util", "org.semanticweb.owlapi" ]
java.util; org.semanticweb.owlapi;
641,970