query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
/ Igual que Math.floorMod pero para valores de tipo double
private double floorMod(double n, double m) { while (n >= m) { n -= m; } while (n <= 0) { n += m; } return n; }
[ "public static double modulo(double val, double mod) {\n double n = Math.floor(val / mod);\n double r = val - n * mod;\n return Util.almost_equals(r,mod) ? 0.0 : r;\n }", "private double mod(double a, double b)\n\t{\n\t\tdouble result;\n\t\t// Calculate result with modulus operator\n\t\tresult = a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of Formatter.
private Formatter() { }
[ "public FileFormatter newFileFormatter(String format) throws InstantiationException,\n NoSuchMethodException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {\n Class<?> oClass = Class.forName(this.getDesignation().trim());\n Class[] argsClasses = new Class[]{Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Path'.
Path createPath();
[ "public Path() {\n\n\t}", "protected Path createPath()\n {\n Path path = new Path();\n path.setSurfacePath(true);\n path.setPathType(AVKey.GREAT_CIRCLE);\n path.setDelegateOwner(this.getActiveDelegateOwner());\n path.setAttributes(this.getActiveShapeAttributes());\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
burada path eger folderdirse return true eks halda false qaytarirsiniz. boolean exists = Files.exists(file); // Check if the file exists boolean isFile = Files.isRegularFile(file); // Check if it's a regular file
@Override public boolean isItFolder(String path) { Path file = new File(path).toPath(); boolean isDirectory = Files.isDirectory(file); // Check if it's a directory return isDirectory; }
[ "private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }", "private static boolean check_Fileexsist(String filename)\r\n {\r\n File f = new File(filename);\r\n if ( f.exists() && !f.isDirectory())\r\n {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Setter of the JspIncludeComponent.pageId attribute.
public void setPageId(final JspIncludeComponent item, final Integer value) { setPageId( getSession().getSessionContext(), item, value ); }
[ "public void setPageId(final SessionContext ctx, final JspIncludeComponent item, final Integer value)\n\t{\n\t\titem.setProperty(ctx, AnnexcloudaddonConstants.Attributes.JspIncludeComponent.PAGEID,value);\n\t}", "public void setPageId(final JspIncludeComponent item, final int value)\n\t{\n\t\tsetPageId( getSessio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Waits for a control message from the server
private String getControlMessageBlocking() throws ProtocolException { // Block while waiting for message String controlMessage = getControlMessage(); while (controlMessage == null) { try { Thread.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } controlMessage = getControlMe...
[ "void waitCommand();", "public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "private void waitServiceMessage()\n\t{\n \t \ttry {\n \t\t\tThread.sleep(SERVICE_ME...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
declare bacteria variables here
public void setup() { size(400,400); bac = new Bacteria[15]; for (int i = 0; i<bac.length; i++) { bac[i]= new Bacteria(200,200); bac[i].c(); } //initialize bacteria variables here }
[ "Variables createVariables();", "private void estableceVariablesDePaises() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t switch(globales.ii_pais){\n\t\t case Globales.ARGENTINA:\n\t\t\t globales.tdlg= new TomaDeLecturasArgentina(this);\n\t\t\t break;\n//\t\t case Globales.COLOMBIA:\n//\t\t\t globales.tdlg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Create Readers to read from the URL. URL is an inputparameter. Create form the returned String (Methode: readAll) one JSONObject. JSONObject ist returned
private JSONObject readJsonFromUrl(String url) throws IOException, JSONException { InputStream is = new URL(url).openStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); ...
[ "@Override\n public JSONObject readJsonFromUrl(String url){\n InputStream is = null;\n try {\n is = new URL(url).openStream();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n BufferedReader br = new BufferedReader(new InputStrea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get an Optional instance with the value for the specified badge. GitLab Endpoint: GET /groups/:id/badges/:badge_id
public Optional<Badge> getOptionalBadge(Object groupIdOrPath, Long badgeId) { try { return (Optional.ofNullable(getBadge(groupIdOrPath, badgeId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "@Test\n public void findBadgeTest() throws ApiException {\n Integer badgeId = null;\n Badge response = api.findBadge(badgeId);\n\n // TODO: test validations\n }", "public Badge getBadge(Object groupIdOrPath, Long badgeId) throws GitLabApiException {\n\tResponse response = get(Response....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set up the thread context classloader. JSF uses the this classloader in order to find related factory classes and other resources, but in some selected cases, the default classloader cannot be properly set.
protected void setUpClassloader() throws Exception { threadContextClassLoader = Thread.currentThread() .getContextClassLoader(); Thread.currentThread() .setContextClassLoader( new URLClassLoader(new URL[0], this.getClass() ...
[ "private void setupLoader() {\n if (classpath != null && loader == null) {\n loader = getProject().createClassLoader(classpath);\n loader.setThreadContextLoader();\n }\n }", "private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Type a program to print odd integers from 4 to25 on the console 1 use for loop 2
public static void printOddInt() { //For Loop for(int i=4; i<10; i++) { if(i%2!=0) { System.out.print(i + " "); } } }
[ "public static void printOdd1() {\n\t\t\n\t\tfor(int i=4; i<=25; i++) {\n\t\t\t\n\t\t\tif(i%2!=0) {\n\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n for (int i = 0; i <= 20; i++) {\n if(i % 2 == 0)\n System.out.println(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Midi Var F2 Sng Position'.
MidiVarF2SngPosition createMidiVarF2SngPosition();
[ "MidiVar createMidiVar();", "MidiVarFCStopSong createMidiVarFCStopSong();", "public String getPos2() {\n return pos2;\n }", "public void setPos2(String pos2) {\n this.pos2 = pos2;\n }", "public Vector2f() {\n\t\t//\n\t}", "public String toString() {\n return \"<VariablePoint2: (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the channel value entered (or changed) by the user.
public int getChannel() { return ((Integer) channelSpinner.getValue()).intValue(); }
[ "public String getChannel() {\n return channel.getText();\n }", "int getSelectedChannel();", "java.lang.String getChannel();", "public int getChannel()\r\n\t{\r\n\t\treturn channel;\r\n\t}", "public String getChannel() {\r\n\t\treturn channel;\r\n\t}", "public String getChannel() {\n\t\treturn c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the listener to be called when the openFolder is colsed.
public void setmOnFolderClosedListener(OnFolderClosedListener onFolderClosedListener) { this.mOnFolderClosedListener = onFolderClosedListener; }
[ "public void setListener(EventListener listener) {\n\t\tthis.ftpClient.setEventListener(listener);\n\t}", "public interface OnFolderClosedListener {\n\t\t/**\n\t\t * Called when this OpenFolder window is closed.\n\t\t */\n\t\tvoid onClosed();\n\t}", "protected void onFolderOpenedDo(final FolderOpenedEvent event...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 gravityPercent = 4;
int getGravityPercent();
[ "boolean hasGravityPercent();", "public int getGravityPercent() {\n return gravityPercent_;\n }", "public int getGravityPercent() {\n return gravityPercent_;\n }", "default Integer getGravity() {\n return null;\n }", "public Builder setGravityPercent(int value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "accessTokenPosition" element
com.eviware.soapui.config.AccessTokenPositionConfig xgetAccessTokenPosition();
[ "com.eviware.soapui.config.AccessTokenPositionConfig.Enum getAccessTokenPosition();", "org.apache.xmlbeans.XmlString xgetAccessToken();", "void xsetAccessTokenPosition(com.eviware.soapui.config.AccessTokenPositionConfig accessTokenPosition);", "org.apache.xmlbeans.XmlString xgetAccessTokenURI();", "public S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the value of lastTimeLanded to the current date and time. Also clear() the array.
public void land() { Date date1 = new Date(); System.out.print(date1); lastTimeLanded = date1; passengers.clear(); }
[ "public Date getLastTimeLanded() {\n \t\r\n \treturn lastTimeLanded;\r\n }", "public void setLastTime() {\r\n\t\tlLastTime = (new Date()).getTime();\r\n\t}", "public void setLastTime(Date lastTime);", "public void land(Date currentDate) {\n \tthis.lastTimeLanded = currentDate;\r\n \tthis.passen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ One Final EpsilonSFAs (OFSFAs) inductive construction operations. Returns an OFSFA that accepts the empty language. This OFSFA has an (initial) state that is not final and one unreachable final state.
public static SFA emptyLanguageOFSfa() { return newOFSfa(newEpsSfaState(false), newEpsSfaState(true)); }
[ "private NFA generateNFAFromEmptySymbol(){\n State s0 = new State(lowestAvailableId);\n lowestAvailableId++;\n State s1 = new State(lowestAvailableId);\n lowestAvailableId++;\n OwnSet<State> finishingStates = new OwnSet();\n finishingStates.add(s1);\n s0.addStatesRea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the user uuid of this actuacion.
@Override public String getUserUuid() { return model.getUserUuid(); }
[ "public String getUserUuid();", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _events.getUserUuid();\n\t}", "@Override\n\tpublic String getUserUuid();", "@Override\n\tpublic java.lang.String getUserUuid() {\n\t\treturn _userTracker.getUserUuid();\n\t}", "@Override\n\tpublic String getUse...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__GrupoSeguridad__Group__4__Impl" $ANTLR start "rule__GrupoSeguridad__Group__5" InternalCeffective.g:7491:1: rule__GrupoSeguridad__Group__5 : rule__GrupoSeguridad__Group__5__Impl rule__GrupoSeguridad__Group__6 ;
public final void rule__GrupoSeguridad__Group__5() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalCeffective.g:7495:1: ( rule__GrupoSeguridad__Group__5__Impl rule__GrupoSeguridad__Group__6 ) // InternalCeffective.g:7496:2: rule__Grupo...
[ "public final void rule__GrupoSeguridad__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:7507:1: ( ( ( rule__GrupoSeguridad__Group_5__0 )? ) )\n // InternalCeffective.g:7508:1: ( ( rule__GrupoSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CEvent__ContrNameAssignment_2" $ANTLR start "rule__OEvent__OblEventAssignment_0" InternalSymboleoide.g:11169:1: rule__OEvent__OblEventAssignment_0 : ( ruleOblEvent ) ;
public final void rule__OEvent__OblEventAssignment_0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalSymboleoide.g:11173:1: ( ( ruleOblEvent ) ) // InternalSymboleoide.g:11174:2: ( ruleOblEvent ) { // Internal...
[ "public final void rule__OEvent__OblNameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:11188:1: ( ( ( RULE_ID ) ) )\n // InternalSymboleoide.g:11189:2: ( ( RULE_ID ) )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of checkNull with a not null object
@Test void testCheckNull1() { assertFalse(DataChecker.checkNull(new Integer(42))); }
[ "protected boolean checkNull(Object obj) {\n return obj == null;\n}", "@Test\n\tvoid testCheckNull3() {\n\t\tassertTrue(DataChecker.checkNull((Object)null));\n\t}", "@Test\n\tvoid testCheckNull2() {\n\t\tassertTrue(DataChecker.checkNull(null));\n\t}", "private boolean isNotNull(Object object) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle in 'InnerScannerActivity' EntranceActivity.this.displayInfo(info);
@Override protected void displayDeviceInfo(String info) { Log.i("aaa","扫码="+info); playBeepSoundAndVibrate(); Intent intent=new Intent(mContext,ScanResultActivity.class); intent.putExtra("ScanCode",info); startActivity(intent); // ...
[ "void callInfoActivity() {\n Intent infoIntent = new Intent(this, InfoActivity.class);\n startActivity(infoIntent);\n\n }", "public void onInfo(ComputationInfo info) {\t\t\r\n\t\t//TODO move to UiGame\r\n\t\tLOG.debug(\"onInfo: \" + info.getOriginalString());\r\n\t\tfor(InfoListener infoListener ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Write triples for current node. Recursively call method for its children Parameter ancestors is the path of ancestors that the algorithm took to get to this node.
private void computeAncestorsDFS(String currNode, List<String> ancestors) { /* * add all ancestral triples for current node to print map */ Set<String> currAncestors = ancestorMap.get(currNode); if (currAncestors == null) currAncestors = new HashSet<String>(); for (String anc_i:ancestors) { //wri...
[ "public void writeChildNodes(NodeWithChildren node) throws IOException {\n for (Node n : node.getNodes()) n.toXML(this);\n }", "private void ancestors(Map<String, Person> ancestors, String personID){\n\n Person person = cache.getPeopleMap().get(personID);\n\n ancestors.put(personID,perso...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inserts one ProcApptColor into the database. Returns the new priKey.
public static long insert(ProcApptColor procApptColor) throws Exception { if (DataConnection.DBtype == DatabaseType.Oracle) { procApptColor.ProcApptColorNum = DbHelper.GetNextOracleKey("procapptcolor", "ProcApptColorNum"); int loopcount = 0; while (loopcount < 100) ...
[ "public static long insert(ProcApptColor procApptColor, boolean useExistingPK) throws Exception {\n if (!useExistingPK && PrefC.RandomKeys)\n {\n procApptColor.ProcApptColorNum = ReplicationServers.GetKey(\"procapptcolor\", \"ProcApptColorNum\");\n }\n \n String comman...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts the server by make it listening and responding to the Terminal.
public void start() { System.out.println("server started"); mTerminalNetwork.listen(mTerminalConfig.port); }
[ "public void startServer() {\n server.start();\n }", "public void start() {\n this.start(DEFAULT_LISTEN_SOCKET_PORT, DEFAULT_LISTEN_SOCKET_TIMEOUT);\n }", "private void start() {\n if (Thread.currentThread().isDaemon()) {\n server.start();\n return;\n }\n\n Thread thread = THREA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the dst switch.
public String getDstSwitch() { return dstSwitch; }
[ "public void setDstSwitch(final String dstSwitch) {\n this.dstSwitch = dstSwitch;\n }", "public int getDstPort() {\n\t\tlog.trace(\"Get dstPort, returns [{}]\", dstPort);\n\t\treturn dstPort;\n\t}", "public int getDstPort() {\n return dstPort;\n }", "public int getDestinationPort(){\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check an update is available and set the preference
private void checkUpdateAvailability() { // Grab the data from the device and manifest String currentVersion = Utils.getProp("ro.ota.version"); currentVersion = currentVersion.replaceAll("[^0-9]", ""); // Strip anyhting not a number String manifestVer = results.getVersion(); manifestVer = manifestVer.repla...
[ "public void checkForUpdate() {\n \tif (this.isUpdatecDisabled()) {\n \t\tLog.d(MSG_TAG, \"Update-checks are disabled!\");\t\n \t\treturn;\n \t}\n \tnew Thread(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\tLooper.prepare();\n \t\t\t\t// Getting Properties\n \t\t\t\tProperties updateProper...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set current state (board, player, moveNumber) by parsing a valid String
public void setCurrentState(String stateString) { String[] lines = stateString.split("\n"); char[][] newBoard = new char[6][5]; String[] firstLineArgs = lines[0].split(" "); setMoveNumber(Integer.parseInt(firstLineArgs[0])); setCurrentPlayer(firstLineArgs[1].charAt(0)); for (int lineIndex = 1; lineIndex ...
[ "public boolean loadState(String newState) {\n // Tokenize newState using whitespace as delimiter\n String[] tokenized = newState.split(\" \");\n\n // Ensure the length\n if (tokenized.length != 82)\n return false;\n\n // Validate first item, whose turn it is\n if (!tokenized[0].equals(\"1\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an instance of ResourceBalanceFullType
public com.vodafone.global.er.decoupling.binding.request.ResourceBalanceFullType createResourceBalanceFullType() throws javax.xml.bind.JAXBException { return new com.vodafone.global.er.decoupling.binding.request.impl.ResourceBalanceFullTypeImpl(); }
[ "public com.vodafone.global.er.decoupling.binding.request.SubscriptionFullType.ResourceBalancesType createSubscriptionFullTypeResourceBalancesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.SubscriptionFullTypeImpl.ResourceBalance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get any constraints from the named UI default as a HashMap keyed on the constraint ID.
public HashMap<String, DataConstraint> getConstraintsHash(String ui_default, String dsID, String varID) throws JDOMException { ArrayList<DataConstraint> constraintsList = getConstraints(ui_default, dsID, varID); HashMap<String, DataConstraint> constraints = new HashMap<String, DataConstraint>(constraintsList....
[ "Constraints getConstraints();", "public Map<T, String> getConstraintNames() {\r\n return constraintNames;\r\n }", "private MyGridBagConstraints lookupConstraints(Component comp) {\n return comptable.get(comp);\n }", "@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the chapterProperties object for a given chapter.
public ChapterProperties getChapterType(String chapter) { return chapterTypes.get(chapter); }
[ "@Override\n\tpublic Chapter getChapter(long chapterId)\n\t\tthrows PortalException, SystemException {\n\t\treturn chapterPersistence.findByPrimaryKey(chapterId);\n\t}", "public String getChapter()\n\t{\n\t\treturn probChapter;\n\t}", "public Integer getChapterId() {\n return chapterId;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtains imagery files from a given path location
private ArrayList<File> obtainImagery(String location) { ArrayList<File> imagePaths = new ArrayList<File>(); File path = new File(location); if (path.isDirectory()) { File[] files = path.listFiles(); for(File image : files) { if(image.isDirectory()) { System.err.println("ERROR - Subdirectories no...
[ "public Photo getPhotoByPath(String path);", "private ArrayList<String> getImagesPathList() {\n String MEDIA_IMAGES_PATH = \"CuraContents/images\";\n File fileImages = new File(Environment.getExternalStorageDirectory(), MEDIA_IMAGES_PATH);\n if (fileImages.isDirectory()) {\n File[]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wrap an object, if necessary. If the object is null, return the NULL object. If it is an array or collection, wrap it in a JSONArray. If it is a map, wrap it in a JSONObject. If it is a standard property (Double, String, et al) then it is already wrapped. Otherwise, if it comes from one of the java packages, turn it in...
@SuppressWarnings("unchecked") public static Object wrap(Object theObject) { try { if (theObject == null) { return null; } if (theObject instanceof CCDataObject || theObject instanceof CCDataArray || theObject instanceof Byte || ...
[ "public static BasicJSendDataObject wrap( Object object ) {\n\t\tif ( object == null ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tBasicJSendDataObject wrapped = null;\n\t\tif ( object instanceof Map ) {\n\t\t\t// if all keys are string, copy and make it an indexable wrapper, otherwise we'll treat it as a generic objec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts an array of graph values values indicating how far across a graph a bar should go into an array that the method sortStackedBar can use. For graphs that plot negative values, the graph values that indicate negative bars, must be converted to be negative values so that they can be sorted properly in an array wit...
int[][] stackedBarConvert (int[][] graphValues, int[][] lowBarValues) { int[][] convertedValues = new int[graphValues.length][graphValues[0].length]; for (int i = 0; i < graphValues.length; ++i) { for (int j = 0; j < graphValues[0].length; ++j) { convertedValues[i][j] = graphValues[i][j] < ...
[ "int[] stackedBarSort (int[][] graphValues, int barIndex) {\n\n boolean[] used = new boolean[graphValues.length];\n for (int i = 0; i < graphValues.length; ++i) {\n used[i] = false;\n }\n\n int[] sorted = new int[graphValues.length];\n for (int doing = 0; doing < graphValues.length; ++doing) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load all (existing) properties files, that are specified in variants. Properties files listed in variants, that are not existing, are ignored
private static final void loadProperties(Properties messages, String[] variants) { for (String variant : variants) { InputStream is = null; try { is = Thread.currentThread().getContextClassLoader().getResourceAsStream(variant); if (is != null) { messages.load(is); ...
[ "private static void loadProperties(final String[] filenames, final Properties props,\n final Properties logProps) {\n\n for(String filename : filenames) {\n\n File f = new File(filename);\n\n if(!f.exists()) {\n System.err.println(\"Start-up erro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ In insertion, if the first bit is clear, insert the item. Otherwise, check the second bit. If it is clear, we sure can insert it in backup position. Using a selection mechanism we can set the second bit and the first k bits for next element to proper position. If the second bit is set, drop the item and give an alert...
public int insert(long key, String val, int index, int k, int tableSize){ int result = -1; BDHopItem targetItem = new BDHopItem(new Item(key, new Value(val)), k); //new instance to be inserted BDHopItem curItem = bdTable.get(index); targetItem.setBitmapPosition(0); //set not-empty bit for target BDHopI...
[ "public void insertToBucket()\n {\n int value = 0;\n value = valueCheck(value);\n \n //inserts value in the array to the buckets\n if(value == 0)\n {\n zero.add(a[k]);\n a[k] = 0;\n }\n if(value == 1)\n {\n one.add(a[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the builder for the settings used for calls to getActiveDirectory.
public UnaryCallSettings.Builder<GetActiveDirectoryRequest, ActiveDirectory> getActiveDirectorySettings() { return getActiveDirectorySettings; }
[ "public UnaryCallSettings.Builder<CreateActiveDirectoryRequest, Operation>\n createActiveDirectorySettings() {\n return createActiveDirectorySettings;\n }", "public UnaryCallSettings<GetActiveDirectoryRequest, ActiveDirectory>\n getActiveDirectorySettings() {\n return getActiveDirectorySett...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A main program for testing purposes. Prints the number of inversions in the sequence ARGS.
public static void main(String[] args) { System.out.println(inversions(Arrays.asList(args))); }
[ "public static <T extends Comparable<? super T>> int inversions(List<T> args)\n {\n ArrayList<T> temp = new ArrayList<T>(args);\n int count = 0;\n for (int i = 1; i < temp.size(); i++) {\n T x = temp.get(i);\n for (int j = i - 1; j >= 0; j--) {\n if (temp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Title: LogEventProvider Description: This interface can be used by import plugins to see whether objects can connect with a LogEvent, and thus to a specific log by remapping these LogEvents Copyright: Copyright (c) 2004 Company:
public interface LogEventProvider { /** * This method returns the current LogEvent the LogEventProvider has stored * * @return LogEvent The stored LogEvent */ public LogEvent getLogEvent(); /** * This method sets the LogEvent for the LogEventProvider to store * * @param le * LogEvent T...
[ "public interface IGenericLogger {\n /**\n * Create a timer event and register it with the logger.\n * \n * @param name\n * The name of the timer event.\n * @return The new ITimerEvent instance.\n */\n public ITimerEvent makeTimerEvent(String name);\n\n /**\n * Cr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a resource bundle for the given locale.
ResourceBundle getResourceBundle(Locale locale);
[ "public static ResourceBundle get(Locale locale) {\n return ResourceBundle.getBundle(\"bundle.language\", locale);\n }", "public ResourceBundle getResourceBundle(Locale locale) {\n return ResourceBundle.getBundle(definition.getResourceBundle(), locale);\n }", "ResourceBundle loadBundle (String pat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets array of all "specimen" elements
public com.walgreens.rxit.ch.cda.POCDMT000040Specimen[] getSpecimenArray() { synchronized (monitor()) { check_orphaned(); java.util.List targetList = new java.util.ArrayList(); get_store().find_all_element_users(SPECIMEN$22, targetList); com.walgreens....
[ "public Collection<List<NameValueBean>> getSpecimenList()\r\n\t{\r\n\t\treturn this.specimenList;\r\n\t}", "@Programmatic\n public Collection<ObjectSpecification> allSpecifications() {\n return Lists.newArrayList(allCachedSpecifications());\n }", "public List getArraySpecifiers() {\n \tif (membe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
does this interval intersect that one?
public boolean intersects(Interval1D that) { if (that.high < this.low) return false; if (this.high < that.low) return false; return true; }
[ "boolean overlap(Interval otherInterval);", "public boolean intersects(Interval<T> b) {\n Interval<T> a = this;\n if (less(a.max, b.min)) return false;\n if (less(b.max, a.min)) return false;\n return true;\n }", "public boolean intersectsWith(BitVectorInterval other) {\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the intiatal BinarySearchTree is null root and size = 0;
public BinarySearchTree(){ this.root =null; this.size = 0; }
[ "public BinarySearchTree(){\n root=null;\n }", "public static void main(String[] args){\n Node root = null;\n BinarySearchTree bst = new BinarySearchTree();\n root = bst.insert(root, 15);\n root = bst.insert(root, 10);\n root = bst.insert(root, 20);\n root = bst.inser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get access modifier for of a method or else 'notFound'.
private static String getAccessModifier(Method method) { if (method.isPrivate()) { return "private"; } else if (method.isPublic()) { return "public"; } else if (method.isPackagePrivate()) { return "packagePrivate"; } else if (method.isProtected()) { ...
[ "ASTAccessModifier getAccessModifier();", "JApiModifier<AccessModifier> getAccessModifier();", "void checkAccessModifier(Method method);", "public final int getAccess() {\n return javaMethod.access;\n }", "Modifier getModifier();", "String getAccess();", "public String getAccess();", "@gw.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read major and minor version of compiler which created the file.
private void readVersion() throws IOException, ClassFormatException { minor = dataInputStream.readUnsignedShort(); major = dataInputStream.readUnsignedShort(); }
[ "int getCompilerVersion();", "int getMinorVersion();", "public abstract String majorVersion();", "public short getMajorSubsystemVersion()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt16(relpos(Offsets.MAJOR_SUBSYSTEM_VERSION.position));\n }", "public static int Major() thro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test metrics for Scan queries.
public void testScanQueryMetrics() throws Exception { IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A"); ScanQuery<String, Integer> qry = new ScanQuery<>(); testQueryMetrics(cache, qry); }
[ "public void testScanQueryNotFullyFetchedMetrics() throws Exception {\n IgniteCache<String, Integer> cache = grid(0).context().cache().jcache(\"A\");\n\n ScanQuery<String, Integer> qry = new ScanQuery<>();\n qry.setPageSize(10);\n\n testQueryNotFullyFetchedMetrics(cache, qry, true);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all files connected to this Genetic Modification.
public Collection getFiles() throws ApplicationException { try { Collection arr = fileHome.findByGeneticModification(gmid); return arr; } catch (Exception e) { throw new ApplicationException("Failed to get files for the Genetic modification...
[ "public List getAssociatedFiles()\n {\n return m_files;\n }", "public Collection<File> getRetrievedFiles() {\n Collection<File> result = new ArrayList<>(upToDateFiles.size() + copiedFiles.size());\n result.addAll(upToDateFiles);\n result.addAll(copiedFiles);\n return result;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a UUID based on the image meta data. Used for thumbnail generation. This way the same thumb can be reused even if the file has been moved in the file system.
private String generateUUID() { StringBuilder sb = new StringBuilder(255); File directory = new File(getAbsolutePath()); sb.append(directory.getName()).append("_").append(getFilename()); //Use metadata to make ID unique if (getMetaData().getCreationDate() != null) { ...
[ "public String generateIdentifierForImage() {\n UUID id = UUID.randomUUID();\n return id.toString();\n }", "java.lang.String getImageId();", "private String generateResourceName() {\r\n\t SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\r\n\t String timestamp = df.format...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if keyspace belongs to development or test stack. Certain commands are destructive, and should be never allowed on production stacks.
public static boolean isDevOrBackupStack(String keySpaceName) { Preconditions.checkArgument(StringExt.isNotEmpty(keySpaceName), "Expected keyspace name not null"); for (Pattern p : DEV_STACK_PATTERNS) { if (p.matcher(keySpaceName).matches()) { return true; } ...
[ "protected boolean isDevelopment() {\n\t\treturn ArrayUtils.contains(environment.getActiveProfiles(), \"dev\")\n\t\t\t\t|| ArrayUtils.contains(environment.getActiveProfiles(), \"test\");\n\t}", "public boolean isProductionEnvironment();", "public static boolean isDevelopmentMode() {\n return getCurrent()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for retrieveAllForPriority method override this method for handling normal response from retrieveAllForPriority operation
public void receiveResultretrieveAllForPriority( org.eclipse.mylyn.targetprocess.modules.services.RequestServiceStub.RetrieveAllForPriorityResponse result ) { }
[ "ResponseEntity<List<Priority>> findTaskPriorities();", "public void receiveResultgetPriority(final org.wso2.carbon.core.services.authentication.GetPriorityResponse result) {}", "public com.zeus.soap.zxtm._1_0.PoolPriorityValueDefinition[][] getPriorityValues(java.lang.String[] names) throws java.rmi.RemoteExce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if a string represents a database null value.
protected static boolean isDBNull( String s ) { return ( s == null ) || s.equals( "\\N" ) || s.equals( "NULL" ); }
[ "private boolean isStringNull(String string) {\n return string.equals(\"\");\n }", "private static boolean isNull(String value) {\n\t\treturn (value!=null) && (value.trim().equalsIgnoreCase(\"null\"));\n\t}", "private boolean isNullString(String str) {\n\t\t\tif ((str == null) || (\"\".equals(str)) ||...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the confidenceCode property.
public int getConfidenceCode() { return confidenceCode; }
[ "public void setConfidenceCode(int value) {\n this.confidenceCode = value;\n }", "public final String getCodeAttribute() {\n return getAttributeValue(\"code\");\n }", "public BigDecimal getCode() {\n return (BigDecimal) getAttributeInternal(CODE);\n }", "public String getCode() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
pre: 0 <= index < size() post: return the production at given index
public Vector<String> get(int index) { return productions.get(index); }
[ "public static production find(int indx) {\r\n return (production) _all.get(new Integer(indx));\r\n }", "public String GetProduction(int i)\n {\n Rule rule = rules.get(i - 1);\n return rule.GetProduction();\n }", "public ProdInfo getProdInfo(int index)\n throws java.lang.IndexOutO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the objXYPlaneBG branch group
public BranchGroup getObjXYPlaneBG() { return objXYPlaneBG; }
[ "public BranchGroup getObjZYPlaneBG() {\r\n return objZYPlaneBG;\r\n }", "public BranchGroup getObjXZPlaneBG() {\r\n return objXZPlaneBG;\r\n }", "public BranchGroup getObjBoxSliceY_BG() {\r\n return objBoxSliceY_BG;\r\n }", "public BranchGroup getVolRenderBG() {\r\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets ClientUserEO entity object.
public BaseEntityImpl getClientUserEO() { return (BaseEntityImpl) getEntity(ENTITY_CLIENTUSEREO); }
[ "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "public ClientEntity toClientEntity() {\n return this.clientEntity;\n }", "public SummitEntityImpl getEmpEO() {\r\n return (SummitEntityImpl)getEntity(1);\r\n }", "private Entity getUserEnt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method corresponds to the database table AL_HR_NON_FINISH_BY_AL_CLASS
public void insert(AlHrNonFinishByAlClass record) { getSqlMapClientTemplate().insert("AL_HR_NON_FINISH_BY_AL_CLASS.ibatorgenerated_insert", record); }
[ "public AlHrNonFinishByAlClassDAOImpl() {\r\n super();\r\n }", "LateFinishType getLateFinish();", "public void insertSelective(AlHrNonFinishByAlClass record) {\r\n getSqlMapClientTemplate().insert(\"AL_HR_NON_FINISH_BY_AL_CLASS.ibatorgenerated_insertSelective\", record);\r\n }", "EarlyFini...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses all requestable Layer elements of a capabilities document. Requestable layers are identified by the existence of a Name sub element.
public static NodeList parseRequestableLayerNodes( Document wmsCapabilities ) throws XPathFactoryConfigurationException, XPathExpressionException { String xPathAbstract = "//wms:Layer[wms:Name]"; return createNodeList( wmsCapabilities, xPathAbstract ); }
[ "public List<WmsLayerCapabilities> getNamedLayers() {\n\n WmsCapabilityInformation capInfo = (WmsCapabilityInformation) this.getField(this.capabilityInformation);\n\n if (capInfo == null) {\n return null;\n }\n\n List<WmsLayerCapabilities> namedLayers = new ArrayList<>();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field100' field has been set
public boolean hasField100() { return fieldSetFlags()[100]; }
[ "public boolean hasField101() {\n return fieldSetFlags()[101];\n }", "public boolean hasField1001() {\n return fieldSetFlags()[1001];\n }", "public boolean hasVar100() {\n return fieldSetFlags()[101];\n }", "public boolean hasField102() {\n return fieldSetFlags()[102];\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Article getDirect_url() is one of many inputs of this crawl
String crawlArticleContent(String url);
[ "String getArticleUrl();", "public String getDocumentUrl(Object entity);", "public String getTrueUrl() {\n Document doc;\n try {\n doc = Jsoup.connect(googleUrl).get();\n String wholeText = doc.text();\n String[] words = wholeText.split(\" \");\n for (in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This gets the physical address of the Member.
public String getPhysicalAddress() { return physicalAddress; }
[ "public String getInternalAddress();", "public int get_mem_address() {\n return this.address;\n }", "public String getMemaddress() {\r\n\t\treturn memaddress;\r\n\t}", "public int get_addr() {\n return (int)getUIntElement(offsetBits_addr(), 16);\n }", "public String getMAddr() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check each splits in the splits array.
static boolean checkSplitsArray (double[][] splitsArray) { throw new RuntimeException(); }
[ "static boolean checkSplits (double[] splits) { throw new RuntimeException(); }", "@Test\r\n public void testSplit() throws Exception {\r\n for (int i = 0; i < 9; i ++){\r\n assertTrue(\r\n splitResults.get(i).equals(\r\n splitLogic.split(cellToInsert,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/movePhoto(String albumIdSrc, String albumIdDest, String photoId) /JFrame frame, boolean modal, String source, java.util.List list,Photo toMove
public void callMoveGui(IAlbum source, Photo photo){ JFrame frame=new JFrame(); List <IAlbum> getMe=model.getUser(userId).getAlbums(); InteractiveControl.AlbumCompare comparePower=new InteractiveControl.AlbumCompare(); Collections.sort(getMe, comparePower); movePhotoDialog moving=new movePhotoDialog(fram...
[ "public void movePhoto(ActionEvent event) {\n\t\t\n\t\t//checks if photo is selected\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\tale...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updateGameMode Purpose: To update the gameMode (updates the pictures) Parameters: MouseEvent Returns: none
public void updateGameMode (MouseEvent e) { if ((e.getX() >= 512 && e.getX() <= 836) && (e.getY() >= 161 && e.getY() <=520)) sprite = 2; else if ((e.getX() >= 62 && e.getX() <= 386) && (e.getY() >= 161 && e.getY() <=520)) sprite = 1; else sprite = 0; }
[ "public void updateGameMode2 (MouseEvent e)\n {\n if ((e.getX() >= 512 && e.getX() <= 836) && (e.getY() >= 161 && e.getY() <=520))\n twoPPressed = true;\n else if ((e.getX() >= 62 && e.getX() <= 386) && (e.getY() >= 161 && e.getY() <=520))\n onePPressed = true;\n }", "void activateGa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets custom documentation for a given EDM property.
EdmDocumentation getDocumentationForProperty(String namespace, String typeName, String propName);
[ "private static String getPropertyDoc(final JPPFProperty<?> property) {\n final StringBuilder sb = new StringBuilder();\n if (property.isDeprecated()) {\n sb.append(\"<i><b>Deprecated:</b> \").append(convertForHTML(property.getDeprecatedDoc())).append(\"</i><br>\");\n }\n sb.append(property.getDocu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks to see if an edge exists. The edge is a string that signals one of the four basic directions.
@Override public boolean edgeExists(String edge) { return state.edgeExists(edge); }
[ "private static boolean validateEdge(String input) {\n if (input.charAt(0) == input.charAt(1)) {\n System.out.println(\"You may not connect a vertex to itself. Try again\");\n reader.next();\n return false;\n }\n for (Vertex v : verticesArray) {\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'field16' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField16() { field16 = null; fieldSetFlags()[16] = false; return this; }
[ "public com.dj.model.avro.LargeObjectAvro.Builder clearVar16() {\n var16 = null;\n fieldSetFlags()[17] = false;\n return this;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField168() {\n field168 = null;\n fieldSetFlags()[168] = false;\n return this;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display and input handler for checking vacancies of a course
public void printVacanciesOfCourse() { System.out.println("=== Check vacancies of a course ==="); System.out.println("Please input your CourseID to show indexes of the Course."); String courseCode = IO.getTextInput("CourseID: "); String[][] res = SC.getVacanciesForPrinting(courseCode); ...
[ "@Override\n\tpublic void allotCourse() {\n\t\tScanner sc = new Scanner(System.in);\n\t\ttry {\n\t\t\tadminDAO.showcourses();\n\t\t\tadminDAO.showprofessor();\n\t\t\tlogger.info(\"Please enter Professor ID from the above list\");\n\t\t\tint professorId = sc.nextInt();\n\t\t\tlogger.info(\"Please enter Course ID fro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the disc of player 2.
public Disc getPlayer2Disc() { return player2Disc; }
[ "public Disc getPlayer1Disc() {\n\t\treturn player1Disc;\n\t}", "public Card getC2()\n {\n return warCards.get(warCards.size()-2);\n }", "public int getCardsRemainingPlayer2()\n {\n return s.cardsRemainingPlayer2();\n }", "public static Player getPlayer2() {\n return player2;\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Not needed to have default constructor, but just to indicate that it exist no matter what. when "new BlackFridayDiscountStrategy()" then is provided as argument for setDiscountStrategy(arg),... ...the priceByDiscountmethod is implemented as defined in BlackFridayDiscountStrategymethod for the temporally created object ...
public BlackFridayDiscountStrategy() { }
[ "public interface DiscountStrategy {\n\n /**\n * Returns the discount amount given a quantity and a price.\n * @param qty\n * @param price\n * @return a double value for discount amount\n */\n public abstract double getDiscount(int qty, double price);\n \n /**\n * A getter for th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is the default constructor only present for failsafe purposes. The following constructor should be used: VisualisationPluginNode(String pluginName, int pluginId)
public VisualisationPlugin() { pluginName = ""; pluginId = 0; }
[ "public Plugin() {}", "public interface Plugin {\n\n\tpublic static class PluginException extends Exception {\n\t\tpublic PluginException() {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic PluginException(String message, Throwable cause) {\n\t\t\tsuper(message, cause);\n\t\t}\n\n\t\tpublic PluginException(String message) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a professor with the given params
public Professor(String surname, String firstName, float salary) { //stuff, but with params }
[ "public Professor(String surname, String firstName, double salary)\n\t{\n\t\t//stuff, but with params\n\t\tthis.setSurname(surname);\n\t\tthis.setFirstName(firstName);\n\t\tthis.setSalary(salary);\n\t}", "public Professor(Professor prof)\r\n {\r\n this.name = prof.name;\r\n this.id = prof.id;\r\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invoked just after a VLabtestInstBean record is inserted in the database.
public void afterInsert(VLabtestInstBean pObject) throws SQLException;
[ "public void afterInsert(DevicelabtestBean pObject) throws SQLException;", "public void beforeInsert(VLabtestInstBean pObject) throws SQLException;", "public void afterUpdate(VLabtestInstBean pObject) throws SQLException;", "public void afterInsert(VLabAnsByContragentBean pObject) throws SQLException;", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether the field has the given flag. E.g: The byte 00000100 has the 3rd flag set, which means that the flag value should be 8.
public static boolean hasFlag(long field, long flag) { return ((field & flag) == flag); }
[ "public static boolean hasFlag(byte field, byte flag) {\n return ((field & flag) == flag);\n }", "public static boolean hasFlag(int field, int flag) {\n return ((field & flag) == flag);\n }", "public boolean isFlagSet( int flag )\n {\n return ( value & ( 1 << flag ) ) != 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Warmup 2 Returns the frequency of value in inputData, that is, how often value appears
public int frequency(int value){ int count=0; for(int i=0; i<inputData.size(); i++){ if (inputData.get(i)==value){ count++; } } return count; }
[ "private HashMap<Byte, Double> calculateFrequencies(byte[] input) {\n HashMap<Byte, Double> freqs = new HashMap<>();\n\n for (byte b : input) {\n if (freqs.containsKey(b)) {\n freqs.put(b, freqs.get(b) + 1.0);\n } else {\n freqs.put(b, 1.0);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lock two EnterpriseObjects. Lock is on the SystemSBR table for the given EUID's.
private void lockSBR(Connection con, String euid1, Integer revisionNumber1, String euid2, Integer revisionNumber2) throws DataModifiedException { try { if (mLogger.isLoggable(Level.FINE)) { mLogger.fine("Locking SystemSBR EUID1: " + euid1 + " with revision nu...
[ "void lock(Connection con, EnterpriseObject eo1, EnterpriseObject eo2)\n throws DataModifiedException {\n try {\n if ((eo1 == null && eo2 == null) || (con.getAutoCommit())) {\n return;\n } else if (eo1 == null) {\n lock(con, eo2, true);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'E3_LEAGUE_CODE' field has been set.
public boolean hasE3LEAGUECODE() { return fieldSetFlags()[48]; }
[ "public void setE3LEAGUECODE(java.lang.Double value) {\n this.E3_LEAGUE_CODE = value;\n }", "public java.lang.Double getE3LEAGUECODE() {\n return E3_LEAGUE_CODE;\n }", "public java.lang.Double getE3LEAGUECODE() {\n return E3_LEAGUE_CODE;\n }", "public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCD...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used for the moving of the drawn object so whenever it is called it will make an object orbit around another object using the method setAngle
public void moveObject(){ location.setAngle(location.getAngle() + rotationSpeed); }
[ "public void move()\n {\n this.setAngle(this.getAngle() + orbitalVelocity);\n if(this.getAngle() > 360)\n {\n this.setAngle(0);\n }\n }", "public void changeYaw(double angle) throws RemoteException\r\n {\r\n // Don't move while this object is being copied...\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of DatacenterAddressResponse class.
public DatacenterAddressResponse() { }
[ "public BtcRpcGetAddressInfoEmbeddedResponse() {\n super();\n }", "Address createAddress();", "public ReverseSearchAddressBatchItemPrivateResponse() {}", "com.google.protobuf.ByteString getResponseAddress();", "public Address getFullAddress() throws DeviceAddressClientException {\n Closeabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Charge whether the intent is same with sMountPoint.
public static boolean isSameStorage(Intent intent, String sMountPoint) { StorageVolume storage = (StorageVolume) intent .getParcelableExtra(StorageVolume.EXTRA_STORAGE_VOLUME); boolean same = false; String mountPoint = null; String intentPath = null; if (storage !...
[ "boolean hasDeleteMountPoint();", "public static boolean do_isMountPoint(String dirname)\n {\n \tint i=0;\n \t\n \twhile(i!=Device.getTableSize())\n \t\n \t{\n \t\tif(IflMountTable.getMountPoint(i).contains(dirname))\n \t\t\treturn true;\n \t\t i++;\n \t}\n \t\t\n \t retu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mark the entire screen dirty. That causes everything to be rendered again.
public void markEverythingDirty() { fullUpdate = true; }
[ "public void markDirty() {\n dirty = true;\n }", "void flushDraw() {\n dirtyD = true;\n modelRoot.incrementNumberOfDirtyDNodes();\n }", "public void flushGraphics() {\n ScreenContainer.getInstance().repaint();\n }", "public void makeAllDirtyAndEnsurePendingClientPainting()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a random RPS. For the Foe choice.
public static RPS getRandom(){ Random random = new Random(); return values()[random.nextInt(Integer.MAX_VALUE)%values().length]; }
[ "public static int rpsBot() {\n Random rng = new Random();\n\n int randomPick = rng.nextInt(3) + 1;\n return randomPick;\n }", "private float randomPrice() {\n float price = floatRandom(this.maxRandomPrice);\n return price;\n }", "public int randomDP() {\n\t\treturn(getR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form Reserve
public Reserve() { initComponents(); }
[ "Reservation createReservation();", "CurrentReservation createCurrentReservation();", "Reservation create(Reservation reservation, int hotelID);", "PastReservation createPastReservation();", "public AddEditReservation() {\n\t\tsuper(\"Reservation\");\n\t\tsetupInterface();\n\t\tthisReservation = -1;\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the average difference value (D) of yt
private float getD(int[] yt){ float temp = 0; for(int i=0;i<=3;i++){ temp += yt[i] - getYmin(yt); } return (temp/3); }
[ "double getAvgTreatment();", "private static double FindMeanY(double[] _y)\n {\n double sum = 0;\n for(int i = 0; i < _y.length; i++)\n {\n sum += _y[i];\n }\n sum /= _y.length; // average of all y inputs\n\n double sum2 = 0;\n for(int j = 0; j < _y.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__FullJvmFormalParameter__Group__0__Impl" $ANTLR start "rule__FullJvmFormalParameter__Group__1" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13056:1: rule__FullJvmFormalParameter__Group__1 : rule__FullJvmFormalParameter__Group__1__Impl ;
public final void rule__FullJvmFormalParameter__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13060:1: ( rule__FullJvmFormalParameter__Group__1__Impl ) ...
[ "public final void rule__FullJvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11076:1:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here we are returning an object of type 'Vets' rather than a collection of Vet objects so it is simpler for JSon/Object mapping
@GetMapping({ "/vets" }) public @ResponseBody Vets showResourcesVetList() { Vets vets = new Vets(); vets.getVetList().addAll(this.vetRepository.findAll()); return vets; }
[ "private void loadVets() {\n // establish the Map of all vets\n List vets = doFindVets();\n vetsMap = mapEntityList(vets);\n\n // establish the map of all the possible specialties\n specialtiesMap = mapEntityList(doFindSpecialties());\n\n // establish each vet's List of spe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create own Packet and EventManager for the client
private void setupClient() { EventManager eventManager = new EventManager(); PacketManager packetManager = new PacketManager(); //Register the Client Listener eventManager.registerListener(new de.dragonlabs.scaleadapter.example.client.handler.MessageListener()); try { ...
[ "public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }", "public static void registerPackets() {\n ReforgedMod.network = NetworkRegistry.INSTANCE.newSimpleChannel(ReforgedMod.ID);\n int packetId = 0;\n ReforgedMod.network.registerMessage(MessageCustomReachAtt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clears the value of the 'kullanici_adi' field
public tr.com.siparis.sistemi.kafka.model.Kullanici.Builder clearKullaniciAdi() { kullanici_adi = null; fieldSetFlags()[1] = false; return this; }
[ "public tr.com.siparis.sistemi.kafka.model.Kullanici.Builder clearKullaniciSoyadi() {\n kullanici_soyadi = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "public Value.Builder clearHariKe() {\n fieldSetFlags()[1] = false;\n return this;\n }", "public void setKullaniciAdi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the create date of this dialog message.
@Override public Date getCreateDate() { return _dialogMessage.getCreateDate(); }
[ "public String getCreateDate() {\n return createDate;\n }", "@Override\n public java.util.Date getCreateDate() {\n return _contactInfo.getCreateDate();\n }", "public Date getCreateDt() {\t\n return this.createDt;\n }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _ann...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The stage of the job update allowing to specify ChainerSettings.
interface WithChainerSettings { /** * Specifies chainerSettings. * @param chainerSettings the chainerSettings parameter value * @return the next update stage */ Update withChainerSettings(ChainerSettings chainerSettings); }
[ "interface WithContainerSettings {\n /**\n * Specifies containerSettings.\n * @param containerSettings If the container was downloaded as part of cluster setup then the same container image will be used. If not provided, the job will run on the VM\n * @return the next ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns a HashMap for the JMSMessage properties
public static HashMap<String, Object> getMessageProperties(Message msg) throws JMSException { HashMap<String, Object> properties = new HashMap<String, Object> (); Enumeration<?> srcProperties = msg.getPropertyNames(); while (srcProperties.hasMoreElements()) { String propertyName = (String)src...
[ "public Map getMessageProperties()\r\n\t{\r\n\t\treturn this.properties;\r\n\t}", "public HashMap<String, String> getCustomMessageProperties() {\n return this.customMessageProperties;\n }", "MessageProperty[] getProperties();", "protected HashMap createApplicationProperties(MessageContext context) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shrinks an image if its width or height exceeds the boundaries given by maxWidth and maxHeight.
public static Image shrinkImageIfNeeded(Image img, int maxWidth, int maxHeight) { if (img.getHeight() > maxHeight) img = Theme.scaleImage(img, 10 * maxHeight / img.getHeight(), 10); if (img.getWidth() > maxWidth) img = Theme.scaleImage(img, 10 * maxWidth / img.getWidth(), 10); return img; }
[ "void \n\tresize(BufferedImage image, int scaleWidth, int scaleHeight);", "public void scaleBitmap(int newWidth, int newHeight) {\n\t\t// Technically since we always keep aspect ratio intact\n\t\t// we should only need to check one dimension.\n\t\t// Need to investigate and fix\n\t\tif ((newWidth > mMaxWidth) || ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests reading a PIC
public void testRead() throws IOException { File file; Pic pic; file = new File("src/test/resources/pic/test.pic"); pic = Pic.read(new FileInputStream(file), 288, 128); assertNotNull(pic); assertEquals(new File("src/test/resources/pic/test.png"), pic); }
[ "@Test\n public void testGetIC() throws IOException {\n System.out.println(\"getIC\");\n \n for (Term t : phenotypeData.getOntology().getTermsInTopologicalOrder()){\n Double ic = phenotypeData.getIC(t);\n System.out.println(\"TEST: getIC():\" + t.toString() + \":\" + St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the state of the sync service to busy.
void setBusy();
[ "public synchronized void setBusy()\n\t{\n\t\tisBusy = true;\n\t}", "public synchronized void makeBusy(){\n isBusy = true;\n }", "public void setBusy(boolean busy) {\n mBusy = busy;\n }", "public void setBusy(boolean busy) {\n\t\tthis.busy = busy;\n\t}", "public void setBusy(String busy)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the selected object name to the specified text.
public void setObjectName(String text) { if (selectedObjects.size() > 0) selectedObjects.get(0).changeName(text); }
[ "void setSelectedItemName(String name);", "void setCustomName(String text);", "public void setNameFieldText(String text) {\n nameField.setText(text);\n }", "@Override\n public String setText(Selector obj, String text) throws UiObjectNotFoundException {\n return null; //To change body of i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the given member as a Long, null if it doesn't exist.
public static Long getAsLong(JsonObject o, String member) { if (o.has(member)) { JsonElement e = o.get(member); if (e != null && e.isJsonPrimitive()) { return e.getAsLong(); } else { return null; } } else { retur...
[ "long getLongValue();", "public static Long getLongValue(Attribute attr) {\r\n Object obj = getSingleValue(attr);\r\n return obj != null ? (Long) obj : null;\r\n }", "private long getLongValue(Element element, String tagName)\n {\n try\n {\n return Long.parseLong(getValue(element...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
View fragmentView = inflater.inflate(R.layout.fragment_sms_list,container,false);
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { binding = DataBindingUtil.inflate(inflater,R.layout.fragment_sms_list,container,false); View view = binding.getRoot(); //mRecyclerView = (Recycler...
[ "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\r\n\t\treturn inflater.inflate(R.layout.fragment_mine, container, false);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets playing action bar.
public static ActionBar getPlayingActionBar(Player player) { if (isRunning(player)) return bars.get(player.getName()); else return null; }
[ "String getActiveTopBarItem();", "void requestActionBar();", "public abstract Composite getScreenActionBar();", "public View getActionBarView(Activity activity) {\n Window window = activity.getWindow();\n View view = window.getDecorView();\n int resId = activity.getResources().getIdentifi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specifies the Component ID Generator to use for generating UUID's of components that are to be added to a ProcessGroup
public Builder componentIdGenerator(final ComponentIdGenerator componentIdGenerator) { this.componentIdGenerator = componentIdGenerator; return this; }
[ "public static String getNextComponentId() {\n return \"C\" + IntegerComponentAdapter.getComponents().size();\n }", "@Override\n\tpublic native final String createUniqueId() /*-{\n // In order to force uid's to be document-unique across multiple modules,\n // we hang a counter from the document.\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all the fact posts where postGradeId = &63; from the database.
public void removeByPostGrade(long postGradeId) throws com.liferay.portal.kernel.exception.SystemException;
[ "public java.util.List<com.idetronic.eis.model.FactPost> findByPostGrade(\n\t\tlong postGradeId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public com.idetronic.eis.model.PostGrade remove(long postGradeId)\n\t\tthrows com.idetronic.eis.NoSuchPostGradeException,\n\t\t\tcom.liferay.portal.k...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }