query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns the y position the argument in relation to the root argument. The root argument is an argument which parent is not an Argument.
protected int getYToRoot() { int y = 0; Container parent = getParent(); while (parent instanceof Argument) { y += parent.getY(); parent = parent.getParent(); } return y; }
[ "public int getY() {\n return (int)this.position.getEntry(1);\n }", "public double posY()\r\n {\r\n return y;\r\n }", "public int getY()\r\n {\r\n return (int)y - 10;\r\n }", "public int getY(){\r\n return (int)this.p.getY();\r\n }", "public int getY() {\n\t\tre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public final String emFilePath public final String adFilePath
public void readCustomer(Database data) { try { FileInputStream fileIn = new FileInputStream(cusFilePath); ObjectInputStream in = new ObjectInputStream(fileIn); data.customerList = (HashMap<String, Customer>) in.readObject(); in.close(); fileIn.close(); } catch...
[ "public String getAssetFilePath() {\n\t\treturn fSettings.getAssetFilePath();\n\t}", "public String getFilePath() {\r\n\treturn filePath;\r\n }", "public LuuDiem() {\n\t\t// this.gamePanel = gamePanel;\n\t\tfile = new File(Environment.getExternalStorageDirectory(), filename);\n\t\tLog.v(\"duong dan\", \"duon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns unit of memory size
public MemoryUnit getUnit() { return unit; }
[ "protected abstract long getUnitSize();", "public String totalMem() {\n return appropriateSizeUnit(Runtime.getRuntime().totalMemory());\n }", "public long totalMemory();", "public int getMemorySize()\r\n\t{\r\n\t\treturn memorySize;\r\n\t}", "public int getMemorySize() {\n return blockCount...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the latitude of the geographical position. The value should reflect the decimal value calculated from following formula: decimal = degrees + minutes/60 + seconds/3600
public double getLatitude();
[ "public float getLatitude();", "public double getLatitude(){\n if(location != null){\n latitude = location.getLatitude();\n }\n \n // return latitude\n return latitude;\n }", "public double getLatitude(){\n if(mLocation != null){\n mLatitude = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method Remove fl from the list of listeners to the formation's messages.
void removeFormationLisener(FormationLisener fl);
[ "void removeListeners();", "@Override\r\n\tpublic void removeListeners() {\n\r\n\t}", "public void _removeNotificationListeners()\n {\n // import Component.Net.Management.NotificationHandler.RemoteHandler;\n \n RemoteHandler handler = get_RemoteNotificationHandler();\n if (han...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public static void m15658a(String str, Throwable th) { m15656a(3, str + '\n' + m15665d(th)); }
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Persist the given document
public <T> void persist(T document);
[ "@Override\n\tpublic void store(D document) {\n\t\tString key = this.metaData.getOrLoadDocumentKey(document);\n\n\t\t// Update session with document\n\t\tthis.session.put(key, document);\n\t}", "public void save() {\n\t\tthis.document.save();\n\t}", "@Override\n\tpublic void saveDocument(DocumentUpload document...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public Blob createBlob() throws SQLException { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for ObjectId. The unique identifier of the entity represented in the cell. Not present for cells with an object_type of PLACEHOLDER.
@JsonGetter("object_id") public String getObjectId() { return this.objectId; }
[ "BigInteger getObjectId();", "public ObjectId getId() {\r\n\t\treturn id;\r\n\t}", "public ObjectIdentifier getOID() {\n return oid;\n }", "public String getRow0ObjectId() {\n\n if (mRows.get(0) != null && mRows.get(0).size() > 0) {\n if (mRows.get(0).getObject(0) != null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the Connection object that was passed to this RowSet object.
Connection getConnection() throws SQLException;
[ "public Object getUnderlyingConnection() {\n return uConnection;\n }", "@NonNull\n protected final C getConnection() {\n return connection;\n }", "@Override\n\tpublic Connection getConnection() {\n\t\treturn conn;\n\t}", "public ModeledConnection getConnection() {\n return connec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
exponential running time O(2^N)
public int recursiveCoinChange(int M, int[] v, int index) { if (M < 0) return 0; if (M == 1) return 1; if (v.length == index) return 0; return recursiveCoinChange(M - v[index], v, index) + recursiveCoinChange(M, v, index + 1); }
[ "public double exp(double X, int N){\n // sum is 1 becouce we did zero step by hands\n double sum = 1;\n long f = 1; // f is f!\n for(int i = 1; i <= N; ++i){\n f *= i;\n sum += X/f;\n }\n return sum;\n }", "public static int fastExp(int num, int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Future work > Backends use this endpoint to let the backbone know when a job fails to execute
private JSONObject buildProgressResponse(long id, int progress, String status) { JSONObject response = new JSONObject(); response.put("id", id); response.put("progress", progress); response.put("status", status); return response; }
[ "public abstract void jobLogic() throws Exception;", "@Override\n public void jobError(ThreadedQueue<Book> queue, IQueueJob job, Book o, Throwable th) {\n\n }", "public abstract void viewSignUpErrorOnJob(String jobName);", "@Override\n public String process() throws Exception {\n\n long executi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Aqui programaremos un hascode
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((Pass == null) ? 0 : Pass.hashCode()); result = prime * result + ((Profila == null) ? 0 : Profila.hashCode()); result = prime * result + ((Usuario == null) ? 0 : Usuario.hashCode()); return result; }
[ "boolean hasDaCode();", "private String calculCode () {\r\n\t\tString debutNom;\r\n\t\tString debutPrenom;\r\n\t\tString debutCategorie;\r\n\t\tint longueurIsbn;\r\n\t\tString finIsbn;\r\n\r\n\t\tdebutNom=nomAuteur.substring(0,2);\r\n\t\tdebutPrenom=prenomAuteur.substring(0,2);\r\n\t\tdebutCategorie=categorie.sub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The class is designed in such a way that when a new instance of RealmController is created, a new instance of Realm is created as well
public static RealmController with() { if(instance == null) { instance = new RealmController(); } return instance; }
[ "protected void realmInit() {\n// mRealm = Realm.getDefaultInstance();\n }", "public Realm newRealmInstanceOnCurrentThread() {\n return Realm.getInstance(realm.getConfiguration());\n }", "public LessonController() {\n\n\t\tthis.databaseController = DatabaseController.getInstance();\n\n\t\tthis.exe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a single AdministrativeUnits
public IAdministrativeUnitRequestBuilder administrativeUnits(final String id) { return new AdministrativeUnitRequestBuilder(getServiceRoot() + "/administrativeUnits/" + id, this, null); }
[ "List<OrganisationUnit> getOrganisationUnitByName( String name );", "public java.util.List<org.landxml.schema.landXML11.AdministrativeAreaDocument.AdministrativeArea> getAdministrativeAreaList()\r\n {\r\n final class AdministrativeAreaList extends java.util.AbstractList<org.landxml.schema.landXM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch initialized SearchService handle.
public SearchService getSearchServiceHandle() { // MHL return searchServiceHandle; }
[ "public SearchService() {\n\n }", "public static SearchService getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new SearchService();\n\t\t\tToDoList.getInstance().addObserver(instance);\n\t\t\tcreateElasticSearchIndex();\n\t\t}\n\t\treturn instance;\n\t}", "public SearchService(Context context)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor used for testing.
public SOAP11Fault(String faultCode, String faultString, String faultActor) { this.faultCode = faultCode; this.faultString = faultString; this.faultActor = faultActor; }
[ "private BaseTest() {\n\t\t\n\t}", "protected ExampleObject() {\n super();\n }", "private TestingTools() {\n\t\n\t}", "public TestingResource() {\n }", "private Utility ()\n {\n }", "public Tanh() {\n\t}", "private Utils()\n {\n super();\n }", "public Cachorro() {\r\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the audit plans before and after the current audit plan in the ordered set where groupId = &63;.
@Override public AuditPlan[] findByGroupId_PrevAndNext(long PlanId, long groupId, OrderByComparator orderByComparator) throws NoSuchAuditPlanException, SystemException { AuditPlan auditPlan = findByPrimaryKey(PlanId); Session session = null; try { session = open...
[ "private ArrayList<AdviceAndPointCut> adjustAdviceOrder() {\r\n \t\tArrayList<AdviceAndPointCut> result = new ArrayList<AdviceAndPointCut>();\r\n \t\tfor (AdviceAndPointCut advice : this.advices) {\r\n \t\t\tif (advice.pos.equals(\"before\")) {\r\n \t\t\t\tresult.add(0, advice);\r\n \t\t\t} else {\r\n \t\t\t\tresul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a scale position (a level number) from the scale of a specified elevator.
public int getScalePosition(int number) throws RemoteException, IllegalParamException;
[ "public double getScale()\r\n {\r\n return myPosition.getScale();\r\n }", "float getMinScale();", "Optional<Integer> scale();", "public Scale getScale()\r\n {\r\n return scale;\r\n }", "public double getScale()\n {\n\tsynchronized (scaleLock)\n\t{\n\t return scale;\n\t}\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifica se uma string eh apenas numerica
private static boolean isNumeric(String string) { try { double number = Double.parseDouble(string); } catch(NumberFormatException nfe) { return false; } return true; }
[ "private static boolean isNumerico(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public int\n IsNumber( String str )\n {\n try {\n Double.valueOf( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
exprTreeParentsNodesToStack is a helper method to build the TIA. It traverses the nodes in post order and places the parent nodes/operator nodes on a stack
private ExprNode exprTreeParentsNodesToStack(ExprNode node){ if (!node.isLeaf()){ exprTreeParentsNodesToStack(node.getLeftChild()); exprTreeParentsNodesToStack(node.getRightChild()); parentNodeStack.push(node); } return node; }
[ "private void setParents() {\n for (DAGNode node : getAllNodes()) {\n node2parents.put(node.getNode(), new HashSet<>());\n }\n \n for (DAGNode parent : getAllNodes()) {\n for (DAGNode child : parent.getChildren()) {\n node2parents.get(child.getNode())...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests whether the testPoint is in the tile rectangle defined by rectCorner and TILE_WIDTH_NOMINAL size
private boolean pointInTileRect(Point testPoint, Point rectCorner){ int dx = rectCorner.x + (int)(TILE_WIDTH_NOMINAL * scale); int dy = rectCorner.y + (int)(TILE_WIDTH_NOMINAL * scale); if (testPoint.x >= rectCorner.x && testPoint.x <= dx){ if (testPoint.y >= rectCorner.y && testPoi...
[ "@Test\n void pointInRect() {\n boolean pointInRect = Utils.pointInRect(new Rectangle(0, 0, 100, 100), 50, 50);\n assertTrue(pointInRect);\n }", "public boolean hasTile(int x, int y, int zoom);", "private boolean isTile(int x, int y) {\n\t\tif ((x >= 0) && (y >= 0) && (y < getHeight()) && (x...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps this vector from circular space to square space as defined by Simple Stretching Method <a href="
public Vector2D mapCircleToSquare() { double fromOrigin = Math.sqrt(x * x + y * y); double u = fromOrigin; double v = x / y * fromOrigin; if (x * x >= y * y) { x = Math.signum(x) * u; y = Math.signum(x) * v; } else { x = Math.signum(y) * v; ...
[ "@Override\n\tvoid resize(double scale) {\n\t\tradius +=radius * scale;\n\t}", "void RescaleToOrigin(float scale, T center)\n {\n// typename std::vector<T>::iterator it = m_vecs.begin();\n// typename std::vector<T>::const_iterator itEnd = m_vecs.end();\n//\n// while (it != itEnd)\n// ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 friendID = 2;
public int getFriendID() { return friendID_; }
[ "public void addFriend(int friendID){\n\n }", "public void addFriend(int uid);", "public boolean isFriend(Long userID1, Long userID2);", "public void createFriend(){\r\n\t\t\r\n\t}", "int getFriendStatus();", "public int addFriend(Friend friend){\n friend.setStatus(1);\n return friendDao....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new continuation, which continue a previous continuation.
public Continuation(Continuation parent, Object context) { if (parent == null) throw new NullPointerException("Parent continuation is null"); stack = new ContinuationStack(parent.stack); this.context = context; restoring = true; }
[ "Continuation() {\r\n\t\t\r\n\t}", "public boolean continuation() { return continuation; }", "private Node continue_statement() {\n\t\tNode c = new Node();\n\t\tif (inputTokens.firstElement().getKey() == TokenNames.Continue) {\n\t\t\tcurrentPair = inputTokens.remove(0);\n\t\t\tcurrentToken = currentPair.getKey(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Operation__Group__2__Impl" $ANTLR start "rule__Operation__Group__3" ../org.xtext.idm.projet.ui/srcgen/org/xtext/idm/projet/ui/contentassist/antlr/internal/InternalStateMachine.g:2576:1: rule__Operation__Group__3 : rule__Operation__Group__3__Impl rule__Operation__Group__4 ;
public final void rule__Operation__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.idm.projet.ui/src-gen/org/xtext/idm/projet/ui/contentassist/antlr/internal/InternalStateMachine.g:2580:1: ( rule__Operation__Group__3__Impl rule_...
[ "public final void rule__Operation__Group__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.mydsl2.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalMyDsl.g:446:1: ( rule__Operation...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table xwzydr_comments
int insertSelective(XwzydrComments record);
[ "@Repository\n@Mapper\npublic interface CommentMapper {\n @Insert(\"INSERT INTO CommentSet(comment_id, \" +\n \" status_id, \" +\n \" parent_id, \" +\n \" comment_message, \" +\n \" comment_author, \" +\n \" comment_published, \" +\n \" comment_li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the command is initially scheduled.
@Override public void initialize() { }
[ "@Override\n public void autonomousPeriodic()\n {\n CommandScheduler.getInstance().run();\n }", "@Override\n public void autonomousInit() {\n m_autonomousCommand = new MoveToFire(shootingDistance); \n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do the complete handling of the sbox for a given string.
public String getStringThroughBox(String value) { String sBoxString = ""; for (int sb = 0; sb < value.length(); sb += 4) { sBoxString += this.getFromOriginal(value.substring(sb, sb+4)); } return sBoxString; }
[ "private void process(String s){\n\t\tswitch(s){\n\t\tcase \"initialize\" : initialize(); break;\n\t\tcase \"enable\": enable(); break;\n\t\tcase \"disable\": disable(); break;\n\t\tcase \"choose\" : chooseMeeple(); break;\n\t\tcase \"win\": win(); break;\n\t\tcase \"lose\": lose(); break;\n\t\tcase \"message\": me...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check out user from club and set currentClub to null
public void checkOut(final Context context, final CheckInOutCallbackInterface callback) { L.d("Try to Check out user"); ClubbookPreferences clubbookPreferences = ClubbookPreferences.getInstance(mContext); HttpClientManager.getInstance().checkout(mCurrentPlace.getId(), clubbookPreferences.getAcc...
[ "public void removeLeaderFromClub(View v){\n if(selectedLeader == null) return;\n if(checkNumLeaders()) return;\n thisClub.deleteLeaderFirebase(selectedLeader.getID());\n selectedLeader.removeClubFromLeaderFirebase(thisClubID);\n selectedLeader = null;\n TextView currentMem...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
signed int 8bit change unsigned int 8bit.
public static byte getSign(byte b) throws Exception { int ret = 0; int c = (b&0xff); try { if(c <= 127){ ret = c; } else { ret = (-1)*(~c)-256-1; ret = (-1)*ret; } return (byte)(ret&0xff); } catch(Exception e){ throw e; } }
[ "public static int signExtend8(int value) {\n Preconditions.checkBits8(value);\n byte temp = (byte) value;\n return (int) temp;\n }", "public UnsignedInt8(short a) {\n\tif ((a < MIN_VALUE) || (a > MAX_VALUE)) {\n\t throw new NumberFormatException();\n\t}\n\tvalue = new Short(a);\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the backgroundattachment property
public final CssBackgroundAttachment getBackgroundAttachment() { if (cssBackground.attachment == null) { cssBackground.attachment = (CssBackgroundAttachment) style.CascadingOrder(new CssBackgroundAttachment(), style, selector); } return cssBackground.attachment; }
[ "@DISPID(180)\r\n @PropGet\r\n java.lang.Object getBackground();", "public ScrollableBackground getBackground () {\n return background;\n }", "public int getBackground() {\r\n\t\treturn this.nBackground;\r\n\t}", "public io.cucumber.messages.Messages.GherkinDocument.Feature.BackgroundOrBuilder get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a set of nonnegative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum. DECISION PROBLEM
public void canSum(int target, int[] nums) { HashMap<Integer, Boolean> map = new HashMap<>(); System.out.println(canSumutil(target, nums, map)); }
[ "static boolean isSubsetSum(int arr[], int n, int sum) \n { \n // The value of subset[i%2][j] will be true \n // if there exists a subset of sum j in \n // arr[0, 1, ...., i-1] \n boolean subset[][] = new boolean[2][sum + 1]; \n \n for (int i = 0; i <= n; i++) { \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verify the required parameter 'namespace' is set
@SuppressWarnings("rawtypes") private com.squareup.okhttp.Call createNamespacedDeploymentValidateBeforeCall(String namespace, V1Deployment body, String pretty, String dryRun, String fieldManager, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progress...
[ "protected void validateNamespace(String namespace, Object entity) {\n if (Strings.isNullOrBlank(namespace)) {\n String message = \"No namespace supported\";\n if (entity != null) {\n message += \" for \" + KubernetesHelper.summaryText(entity);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onClick(View v) { clickListener.onClick(d, null); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The maximum permitted number of user updates per hour. .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = "&gt;=0"];
public boolean hasMaxUpdatesPerHour() { return maxUpdatesPerHourBuilder_ != null || maxUpdatesPerHour_ != null; }
[ "com.google.protobuf.Int64Value getMaxUnitsPerHour();", "@java.lang.Override\n public com.google.protobuf.Int64ValueOrBuilder getMaxUnitsPerHourOrBuilder() {\n return getMaxUnitsPerHour();\n }", "public int getRefreshTimeMax() {\n return refreshTimeMax.get();\n }", "@ApiModelPropert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Date now = new Date(); SimpleDateFormat sf; sf = new SimpleDateFormat("yyyyMMddHHmmss"); return sf.format(now);
public String getDateTimeType() { String result = ""; int[] a = getDateTime(); String y = a[0] + ""; String m = a[1] + ""; String d = a[2] + ""; String s = a[3] + ""; String b = a[4] + ""; String c = a[5] + ""; if (m.length() < 2...
[ "private static String curTime() {\n\t\tSimpleDateFormat curTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\r\n\t\treturn curTime.format(new Date());\r\n\t}", "public String timeStamp() {\n\n DateFormat df = new SimpleDateFormat(\"MMddyyhhmmss\");\n java.util.Date today = Calendar.getInstance().getTime();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 65 /Coverage entropy=0.0
@Test(timeout = 4000) public void test065() throws Throwable { int[] intArray0 = new int[8]; int int0 = MethodWriter.getNewOffset(intArray0, intArray0, 1, 66); assertEquals(65, int0); }
[ "public void test128() throws Exception {\n testNScenario(\"java128\");\n }", "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evalua...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Name of the House Card
public String getHouseName () { return this.houseName; }
[ "public String name() {\n name = \" My Cards\" ;\n return name;\n }", "public String toString() {\n\t\tString cardName = indexToRank(cardRank) + \" of \" + indexToSuit(cardSuit);\n\t\treturn cardName;\n\t}", "private String setName()\n {\n if(cardNumber>10)\n {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
controllo appartenenza simboli chiave all'alfabeto di codifica
private boolean checkKey(String key) { System.out.println(key); if (key.length()!=m) return false; for (int i = 0; i<key.length() ; i++) { if (!dict.containsKey( Character.toString(key.charAt(i)))) return false; } return true; }
[ "public void setCodigoCiclo(int codigoCiclo) { this.codigoCiclo = codigoCiclo; }", "public String aprobar(int cod) {\t\n\t\tfor (SolicitudDeCredito sol : solicitudes) {\n\t\t\tif (sol.getCodigoCredito() == cod && sol.getEstadoCredito().equalsIgnoreCase(\"Solicitando\") ) {\n\t\t\t\tsolicitudDeCredito.setEstadoCre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column FMSAPPL.REOPENED_DATE
public void setREOPENED_DATE(Date REOPENED_DATE) { this.REOPENED_DATE = REOPENED_DATE; }
[ "public void setTO_BE_REVERSED_DATE(Date TO_BE_REVERSED_DATE) {\r\n this.TO_BE_REVERSED_DATE = TO_BE_REVERSED_DATE;\r\n }", "public void setRecDate(Date date)\r\n\t{\r\n\t\trecDate = date;\r\n\t}", "public void setRentDate(LocalDate rentDate) { this.rentDate = rentDate; }", "public void setRechargeC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jp_principal = new javax.swing.JPanel(); jp_titulo = new javax.swing.JPanel(); lb_titulo = new javax.swing.JLabel(); jp_c_data...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void deleteAllInBatch(Iterable<Products> entities) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates the AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch constraint of 'Assembly Connector'.
public boolean validateAssemblyConnector_AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch(AssemblyConnector assemblyConnector, DiagnosticChain diagnostics, Map<Object, Object> context) { return assemblyConnector.AssemblyConnectorsReferencedRequiredRoleAndChildContextMustMatch(diagnostics, context); }
[ "AssemblyContext getAssemblyContext__RequiredInfrastructureDelegationConnector();", "private ValidationFindings compileAssembly(URL assemblyUrl) throws SchemaCompilerException {\n ServiceAssemblyManager assemblyManager = new ServiceAssemblyManager( repositoryManager );\n ValidationFindings findings ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes back to the text file "UserCollection.txt"
public void saveUser() { try { new FileOutputStream("UserCollection.txt").close(); FileOutputStream f = new FileOutputStream(new File("UserCollection.txt")); ObjectOutputStream o = new ObjectOutputStream(f); // Write objects to file o.writeObject(UserIdentity); o.close(); f.close(); } catch ...
[ "public void saveUsers() {\n try { //Write to a file called \"users.txt\"\n FileWriter writer = new FileWriter(\"users.txt\");\n writer.write(\"=====USERS=====\\n\");\n for(User u : users.values()) { //Loop through each user and write their info to file\n write...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set new body position.
public void set_position(VectorN r) { getTransform(Trans); Vd.x = r.x[0]; Vd.y = r.x[1]; Vd.z = r.x[2]; Trans.setTranslation(Vd); Trans.setScale(scale); setTransform(Trans); }
[ "public void setBodyPosition(float x, float y){\n\t\tthis.xW = x;\n\t\tthis.yW = y;\n\n\t\tthis.topBody.setTransform(x, y + (this.hW -BODY_HEIGHT)/2f, 0f);\n\t\tthis.angleBody.setTransform(x + (SLOPE_RATIO - 0.5f)*this.wW + (1.0f - SLOPE_RATIO)/2f * this.wW/2f, y, ANGLE);\n\t}", "public void setBody( Body body ) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected boolean isRouteDisplayed() { return true; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper function to read the user input and tidy it up.
public static String readInput() { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String input = ""; try { input = br.readLine(); } catch (IOException ioe) { System.out.println("IO error trying to read your input: " + input); } ...
[ "private static String[] collectInput() {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] userInput = sc.nextLine().split(\"\\s+\");\n\n\t\treturn userInput;\n\t}", "static void getInput() {\n System.out.print(\"Site name: \");\n name = scan.nextLine();\n System.out.print(\"Auth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
model.addAttribute("todo", new Todo(0,getLoggedinUserName(model),"Default Desc",new Date(), false));
@RequestMapping(path="/add-todo", method=RequestMethod.GET) public String showAddTodo(ModelMap model) { model.addAttribute("todo", new Todo(0,getLoggedinUserName(),"Default Desc",new Date(), false)); return "todo"; }
[ "@ModelAttribute\n public void addCommonThings(Model model,Principal principal){\n try{\n model.addAttribute(\"title\", \"Dashboard-BootApp\");\n Userdto dto = this.userService.getUserByUsername(principal.getName());\n model.addAttribute(\"user\", dto);\n }catch(Use...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
There may be multiple widgets active, so update all of them
@Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { for (int appWidgetId : appWidgetIds) { updateAppWidget(context, appWidgetManager, appWidgetId); } }
[ "protected void UpdateContent()\n\t{\n\t\tif (focused_index != null)\n\t\t{\n\t\t\tUpdateFocusedSlider();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tUpdateAllSliders();\n\t\t}\t\n\t}", "private void updateAllWidgets(Context context) {\n //Get the widget manager and IDs associated with this widget\n AppWidgetMan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provides substring functionality to Directed Graphs. Calls either String.substring(String beginIndex) or String.substring(String beginInded, String endIndex) if the endindex is present or not.
public void substring( Map<String, String> parameters, SvcLogicContext ctx ) throws SvcLogicException { try { SliPluginUtils.checkParameters( parameters, new String[]{"string","begin-index","result"}, LOG ); final String string = parameters.get("string"); final String result ...
[ "public AttributedString substring(int start, int end) {\n/* 251 */ return subSequence(start, end);\n/* */ }", "public LinkedString substring(int a, int b) throws StringIndexOOBException;", "public String substring(int beginIndex, int endIndex) {\n return source.substring(beginIndex, endIndex);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs this object with the specified parameters.
public AppException(String message, String errorCode, int severity, Exception exception) { this(message, errorCode, null, severity, null); }
[ "public UmoComponentParameters() {\r\n \r\n }", "public Params() {\n\t\tsuper(JOM.getInstance().getNodeFactory());\n\t}", "public ParameterMst() {\n\n\t}", "public RequestParams() {\n\t}", "public Parameter() { }", "public Create() {\n\t\t\tsuper();\n\t\t}", "public Motorcycle()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Atomically update the globalcommitpointer to the given newglobalhead, if the value in the database is the given expectedglobalhead.
protected abstract boolean globalPointerCas( NonTransactionalOperationContext ctx, GlobalStatePointer expected, GlobalStatePointer newPointer);
[ "public void setBranchGlobalNum(short branchGlobalNum) {\n this.branchGlobalNum = branchGlobalNum;\n }", "@Override\n\tpublic void update(BillGlobalItem globalItem) {\n\t\tthis.sessionFactory.getCurrentSession().update(globalItem);\n\t}", "public void postProcessCommit()\r\n {\r\n boolean is...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all floor tiles in the bundle
public FloorTile[] getFloorTiles() { return floorTiles; }
[ "public static List<Tile> getTiles() {\r\n\t\tif (tiles == null) tiles = new ArrayList<Tile>();\r\n\t\treturn tiles;\r\n\t}", "java.util.List<com.navatar.protobufs.MinimapProto.Minimap.Tile> \n getTilesList();", "public ArrayList<Tile> getTiles() { return this.tiles; }", "public ArrayList<Tile> getDoor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start running the camera
public static void startCamera() { SmartDashboard.putString(CameraData.Rp3.camerasTypeName, camerasType); camera0.setResolution(CameraData.Rp3.UsbCamWidth, CameraData.Rp3.UsbCamHeight); camera1.setResolution(CameraData.Rp3.UsbCamWidth, CameraData.Rp3.UsbCamHeight); camera0.setFPS(CameraData.Rp3.fps...
[ "@FXML\n\t\tprotected void startCamera()\n\t\t{\t\n\t\t\t//Abilito il pulsante per fare la cattura dell'emozione.\n\t\t\tenableEmotionDetectionButton();\t\n\t\t\tif (!this.cameraActive)\n\t\t\t{\n\t\t\t\t// start the video capture\n\t\t\t\tthis.capture.open(0);\n\t\t\t\t\n\t\t\t\t// is the video stream available?\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test: K2ABSFunc23 xs:unsignedInt and check the return type. .
@org.junit.Test public void k2ABSFunc23() { final XQuery query = new XQuery( "fn:abs(xs:unsignedInt(4)) instance of xs:integer", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); }...
[ "private void __builtin_unsigned_int() {\n \t\tIBinding temp = null;\n \t\tIFunctionType functionType = null;\n \t\tIParameter[] theParms = new IParameter[1];\n \t\tICPPParameter[] theCPPParms = new ICPPParameter[1];\n \t\tif (lang == ParserLanguage.C) {\n \t\t\tIType[] parms = new IType[1];\n \t\t\tparms[0] = c_un...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use ApplicationACLMapProto.newBuilder() to construct.
private ApplicationACLMapProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
[ "public Builder setAclBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n acl_ = value;\n onChanged();\n return this;\n }", "public com.google.api.apikeys.v2.Andro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
=================================================================================== Entity Delete =============
public void test_delete_nonOptimisticLockTable_deleted() throws Exception { // ## Arrange ## MemberStatus memberStatus = new MemberStatus(); memberStatus.setMemberStatusCode("NON"); // ## Act ## try { memberStatusBhv.delete(memberStatus); // ## ...
[ "@Override\n\tpublic void delete(Torneio entity) {\n\t\t\n\t}", "void deleteEntity(E entity);", "@Override\r\n\tpublic void delete(Venta entity) throws Exception {\n\t\t\r\n\t}", "@Override\n void delete(Single entity);", "public void deleteEgreso(Egreso entity) throws Exception;", "@Override\r\n\tpubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
don't need to synchronize because nothing else is happening before this
public void start() { teacher.beginEvolution(); }
[ "@Override\n public void sync() {\n \n }", "public void sync() {\n\t\t\r\n\t}", "@Override\n public synchronized void run() {\n }", "@Override\n\t\tprotected void swop() {\n\n\t\t}", "@Override\n\t\tpublic void syncReady() {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\tpublic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .CMsgVector2D pos = 2;
public Builder setPos(skadistats.clarity.wire.common.proto.NetworkBaseTypes.CMsgVector2D value) { if (posBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pos_ = value; onChanged(); } else { posBuilder_.setMessage(v...
[ "ROVector2f getPosition();", "public abstract Vector2 getPosition();", "PosInfo(float x, float y){\n this.x=x;\n this.y=y;\n }", "org.ga4gh.protobuf.Common.PositionOrBuilder getPositionOrBuilder();", "Point2f getPosition();", "at.fhj.swengb.apps.battleship.BattleShipProtobuf.BattleShip...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
test join where one load does not have schema
@Test public void testJoinSchema2() throws Exception { String[] input1 = { "1\t2", "2\t3", "3\t4" }; String[] input2 = { "1\thello", "4\tbye", }; String firstInput = createInputFile("a.txt", inpu...
[ "@Test\n public void testJoinHintWithoutAffectingJoinInViewWhileOuterQueryIsNotJoin() {\n String sql = \"select /*+ %s(T1)*/* from V5\";\n\n verifyRelPlanByCustom(String.format(sql, getTestSingleJoinHint()));\n }", "@Test\n public void testLeftJoinWithNullFilterInRightSide() {\n util...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Comprobar si se puede mover una pieza de donde esta a donde quiere
public boolean setupPiece (String clmn1, int rw1, String clmn2, int rw2) { int column1 = Board.letterToNumber(clmn1); int column2 = Board.letterToNumber(clmn2); --rw2; --rw1; if (board.validCell(rw1, column1) && board.validCell(rw2, column2)) { return board.setupPiece(rw1, column1, rw2, column2); } else ...
[ "public boolean controllaSpazioDestra() { // Come prima, ma verso destra\r\n Iterator it = pezzo.getElementi().iterator();\r\n while (it.hasNext()) {\r\n Coordinate correnti = (Coordinate) it.next();\r\n int X = correnti.getX();\r\n int Y = correnti.getY();\r\n if (Y == 9 || griglia[X][Y+1].getBackground(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Every frame we check to see if the keyboard left/right buttons are pressed, and based on that move the paddle to the left or right.
@Override public void timePassed() { if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) { this.moveLeft(); } if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) { this.moveRight(); } }
[ "public void act() \n {\n //If left is pressed, the paddle moves left\n if(Greenfoot.isKeyDown(\"left\"))\n {\n move(-7);\n }\n //If right is pressed, the paddle moves right\n if(Greenfoot.isKeyDown(\"right\"))\n {\n move(7);\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 22 /Coverage entropy=1.7129309526044174
@Test(timeout = 4000) public void test022() throws Throwable { FileSystemHandling.createFolder((EvoSuiteFile) null); StringReader stringReader0 = new StringReader("class"); JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 65, 109, 889); JavaParserTokenManager javaParserToke...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Never called. Disable default constructor
protected CCPComplexSlotMention() { /* intentionally empty block */ }
[ "private O()\r\n {\r\n super();\r\n }", "private MiniMiser() {\r\n // nothing\r\n }", "DefaultConstructor() {\n\t\tSystem.out.println(\"DefaultConstructor\");\n\t}", "private PrivateConstructor() { \n \t\n }", "private MyObject() {\r\n }", "public MyClass(){\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
initializes storage and sets basic reference which should identify application, and do not conflict with other projects within cache. if reference is null then its empty string
void initialize(String reference);
[ "public String defineStorage()\r\n {\r\n return DEFAULT_STORAGE;\r\n }", "@Override\n public void initStorage() {\n }", "public AchieveStorage () {\n\t\tthis.awsDb = null;\n\t\tthis.awsDbClient = null;\n\t\tthis.awsKeyClient = null;\n\t\tthis.drive = null;\n\t}", "String getLocalRef();", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Procedimiento__NombreAssignment_1" $ANTLR start "rule__Procedimiento__ParametrofuncionAssignment_3_0" ../vary.pseudocodigo.dsl.cpp.ui/srcgen/vary/pseudocodigo/dsl/cpp/ui/contentassist/antlr/internal/InternalVaryGrammar.g:16126:1: rule__Procedimiento__ParametrofuncionAssignment_3_0 : ( ruleParametroFun...
public final void rule__Procedimiento__ParametrofuncionAssignment_3_0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../vary.pseudocodigo.dsl.cpp.ui/src-gen/vary/pseudocodigo/dsl/cpp/ui/contentassist/antlr/internal/InternalVaryGrammar.g:16130:1: ( (...
[ "public final void rule__Pago__PropiedadesAssignment_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../co.edu.uniandes.miso4202.vehicletax.ui/src-gen/co/edu/uniandes/miso4202/ehicletax/ui/contentassist/antlr/internal/InternalVtdsl.g:432...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fully qualified domain name of the endpoint.
public OracleSettings withServerName(String serverName) { setServerName(serverName); return this; }
[ "public String dnsName() {\n return url.getHost();\n }", "public String oathDnsName() {\n return oathUrl.getHost();\n }", "public String getDomainName(){\n return getClass().getSimpleName().toLowerCase();\n }", "@Schema(description = \"The DNS name of the cluster endpoint, if ava...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The oAuth Credentials for this backend.
@ApiModelProperty(value = "The oAuth Credentials for this backend.") public OAuthCredentials getOAuthCredentials() { return oAuthCredentials; }
[ "@Override\n public Object getCredentials() {\n return accessToken;\n }", "@Keep\n @NonNull\n public Credentials credentials() {\n return mAuthenticator.getCredentials();\n }", "public Credentials getCredentials() {\n return this.credentials;\n }", "public Object getCred...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Produce a sequence [0..n]
public static int[] range(int n){ int[] result = new int[n]; for(int i = 0;i < n; i ++){ result[i] = i; } return result; }
[ "public static int[] generateRandomSeq2(int n) {\n int[] sequence = new int[n];\n Random randomGen = new Random();\n\n for (int i = 0; i < n; i++) {\n sequence[i] = i + 1;\n }\n\n for (int i = 0; i < n; i++) {\n swapReferences(sequence, i, randomGen.nextInt(i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sort Map By Value
private Map<String,Double> sortMapByValue(Map<String,Double> map){ List list = new LinkedList(map.entrySet()); Collections.sort(list, new Comparator() { public int compare(Object o1, Object o2) { return ((Comparable) ((Map.Entry) (o1)).getValue()) ...
[ "private Map<String, Integer> sortByValue(Map<String, Integer> unsortMap) {\n List<Map.Entry<String, Integer>> list =\r\n new LinkedList<>(unsortMap.entrySet());\r\n\r\n \r\n Collections.sort(list, (Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) -> (o2.getValue()).compare...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
(Highcharts) An optional level index of where to place the node. The default behaviour is to place it next to the preceding node. Alias of nodes.column, but in inverted sankeys and org charts, the levels are laid out as rows.
public Builder level(double value) { object.setLevel(value); return this; }
[ "static public int indexToLevel (int nodeIndex) { throw new RuntimeException(); }", "@Override\n\tpublic void setLevel(int level) {\n\t\t_treeNode.setLevel(level);\n\t}", "public static void main(String[] args) {\n\n TreeNode root = new TreeNode(3);\n TreeNode val9 = new TreeNode(9);\n TreeNode val20...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table cash_flow
public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; }
[ "public static List<Incomedetails> LoadIncomeTable(){\r\n\t\t\t\r\n Session session = sessionFactory.openSession();\r\n\tsession.beginTransaction();\r\n\t\t\r\n Query q;\r\n\t\t\r\n q = session.getNamedQuery(\"INCOME_LoadIncomeTable\");\r\n \r\n List<Incomedetails> resultLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
throw new UnsupportedOperationException("Not supported yet.");
@Override public void keyReleased(KeyEvent ke) { }
[ "protected void unsupportedOp()\n\t{\n\t\tthrow new UnsupportedOperationException(\"this is not allowed\");\n\t}", "private String throwException() {\n throw new UnsupportedOperationException(\"Not supported\");\n }", "private void Bersih() {\n throw new UnsupportedOperationException(\"Not sup...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 30 / 1 covered goal: Goal 1. wheel.json.JSONObject.valueToString(Ljava/lang/Object;)Ljava/lang/String;: I6 Branch 110 IFNULL L1253 true
@Test public void test30() throws Throwable { String string0 = JSONObject.valueToString((Object) null); assertNotNull(string0); assertEquals("null", string0); }
[ "@Test\n public void test04() throws Throwable {\n String string0 = JSONObject.valueToString((Object) null);\n assertNotNull(string0);\n assertEquals(\"null\", string0);\n }", "@Test(timeout = 4000)\n public void test119() throws Throwable {\n String string0 = JSONObject.valueToString((...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public final void mo28189a() { AdEvents adEvents = this.f4948b; if (adEvents != null) { adEvents.impressionOccurred(); } }
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Standard "find all" for AccessRequestStatusItems.
public List<AccessRequestStatusItem> findAll() { return findAll(AccessRequestStatusItem.class); }
[ "public List<RequestItem> findAll(Context context)\n throws SQLException;", "public List<Status> allStatus();", "@Override\n\tpublic void checkAllItems() {\n\t\t\n\t}", "@GetMapping\n public ResponseEntity<List<Item>> getAllItems(@RequestParam Map<String,Object> allParams) {\n List<Item> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the quantity of items to drop on block destruction.
@Override public int quantityDropped(Random par1Random) { return 1; }
[ "public Number getDroppedCount()\n {\n return Integer.valueOf(droppedRequests);\n }", "public Integer getDroppedCount() {\n return droppedCount;\n }", "public int numberOfBlocksToRemove() {\r\n return 50;\r\n }", "@Override\n public int quantityDropped(Random par1Rand...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
we wrap the main method in this way to ensure a nonzero return value on failure
public static void main(String[] argv) { try { trueMain(argv); } catch (Exception e) { e.printStackTrace(); System.exit(1); } }
[ "final public int\n run(String[] args)\n {\n // This shouldn't be called.\n assert false;\n return 0;\n }", "public void testMain6(){\t\r\n\t\tString[] inputStrnew = {\"-?\"};\r\n\t\texceptionFlag = false;\r\n\t\ttry{\r\n\t\t\tTestcaseGenerator.main(inputStrnew);\r\n\t\t}catch(ExitEx...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update database with new player stats
private void updateDatabase(PlayerInfo info, Player player, int experience) { info.setDraw2(info.getDraw2() + player.getAnalytics().getDraw2()); info.setDraw4(info.getDraw4() + player.getAnalytics().getDraw4()); info.setWild(info.getWild() + player.getAnalytics().getWild()); info.setSkip...
[ "public void update(){\r\n\t\tString query;\r\n\t\tif(isNew){\r\n\t\t\tquery = \"INSERT INTO stats (name, kills, deaths, karma) VALUES ('\"+this.getName()+\"', '\"+this.totalKills+\"', '\"+this.totalDeaths+\"', '\"+this.karma+\"')\";\r\n\t\t\tisNew = false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tquery = \"UPDATE stats SET ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the output compression mode.
public OutputCompressionEnum getOutputCompression() { return outputCompression; }
[ "@Nullable\r\n public final String getCompressionModeAsString() {\r\n return getMediaInfo().getAsString(StreamKind.Video, getStreamNumber(), Video.COMPRESSIONMODE);\r\n }", "public CodePhrase getCompressionAlgorithm() {\n return compressionAlgorithm;\n }", "public int getCompressionLevel(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor pre: Slide file contains valid slide data in the format: first line: lenght of slide second line: width of slide remaining lines: slide data post: Slide data has been loaded from slide file.
public Slide(String s) { try { File slideFile = new File(s); FileReader in = new FileReader(slideFile); BufferedReader readSlide = new BufferedReader(in); int length = Integer.parseInt(readSlide.readLine()); int width = Integer.parseInt(readSlide.rea...
[ "public Slide(){\n\t\ttitle = null;\n\t\tbullets = new String[MAX_BULLETS];\n\t\tduration = 0;\n\t}", "public LodeSlide(int seqNum, String title, String text,String fileName) {\n this.seqNum=seqNum;\n if (title==null || title.trim().equals(\"\")) title=\"-\";\n this.title=title;\n if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to handle Qnames
private void writeQName(javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String namespaceURI = qname.getNamespaceURI(); if (namespaceURI != null) { java.lang.String prefix ...
[ "public int getIndex(String qName);", "public void setQyName(String qyName) {\n this.qyName = qyName;\n }", "private String qName(Namespace namespace, String localName)\n {\n \tString prefix = namespaces.getPrefix(namespace.URI);\n if (prefix == null || prefix.equals(\"\"))\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Failed to read value
@Override public void onCancelled (DatabaseError error){ Log.w("TAG", "Failed to read value.", error.toException()); }
[ "public abstract String getFailsafeValue();", "@Override\n public void onCancelled(DatabaseError error) {\n Log.w(\"value\", \"Failed to read value.\", error.toException());\n }", "private String readValue(JsonObject device) {\n String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void onCancelled(String result) { super.onCancelled(result); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle presses on the action bar items
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.edit_data_Shop: // Code you want run when activity is clicked Intent intent = new Intent(DataShopActivity.this, EditDataShopActivity.class); inten...
[ "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n default:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Purpose: resourceName method is used to name resource while creating .
public String resourceName() { String resourceName=null; try { ExtentTestManager.getTest().log(LogStatus.INFO, "User is trying create new resource by giving an Unique Resource name"); System.out.println("Passed here"); objListOFTestDataForSunbird1= ReadTestDataFromExcel.getTestDataForDiksha("testdatash...
[ "protected abstract String getResourceName();", "public abstract String getResourceName();", "public String getResourceName()\n {\n return resourceName; \n }", "String getResourceName(){\r\n\t\t\treturn resourceFile;\r\n\t\t}", "public String getResourceName()\n {\n return resourceName;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_my, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return iterator pointing to location before position.
public Iterator<T> findPrevious(Iterator<T> position) throws Exception { if (position == null) return null; if (!(position instanceof DListIterator)) return null; if (((DListIterator) position).currentNode == null) return null; DListIterator<T> p = ((...
[ "public Iterator<T> preOrder();", "@Override\r\n\t\tpublic Object previous() {\r\n\t\t\ttry {\r\n\t\t\t\tcursor -= 1;\r\n\t\t\t\tObject previous = getNodeByIndex(cursor);\r\n\t\t\t\tlastRet = cursor;\r\n\t\t\t\treturn previous;\r\n\t\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\t\tthrow new NoSuchElementExc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called on schedule to check for submitted actions then creates and distributes requests to action exporter or notify gateway
@Transactional(timeout = TRANSACTION_TIMEOUT_SECONDS) public void distribute() { List<ActionType> actionTypes = actionTypeRepo.findAll(); actionTypes.forEach(this::processActionType); }
[ "public void sendAvailableActions(byte requestId, List<ActionEntry> availableActions, String helpstring) {}", "private Integer doRun() {\n MeetingDumper dumper = new MeetingDumper(\n DateTimeFormat.forPattern(\"yyyy-MM-dd\"),\n DateTimeFormat.forPattern(\"HH:mm\"))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bool for_local_cs = 5; optional bool for_local_cs = 5;
boolean hasForLocalCs();
[ "void mo62420c(boolean z);", "public void mo2581c(boolean z) {\n }", "public void setLocal(boolean local) {\n \t\tthis.local = local;\n \t}", "void mo98807c(boolean z);", "void mo20834a(boolean z);", "void m1511a(gc gcVar, ec ecVar, boolean z) {\n }", "boolean hasLocal();", "void mo11528s(boolea...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table treasures_video
public TreasuresVideoExample() { oredCriteria = new ArrayList<Criteria>(); }
[ "@Mapper\npublic interface VideoMapper {\n\n @Select(\"select * from t_video where id = #{id}\")\n public Video get(@Param(\"id\") Long id);\n\n @Select(\"select * from t_video\")\n public List<Video> getAll();\n\n @Insert(\"insert into t_video(name, description, size, length, path) values(#{name}, #...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
private static void updatePost() { Post post = new Post(12, null,"Aloha"); Map<String,String> headers = new HashMap(); headers.put("Map-Header1", "Def"); headers.put("Map-Header2", "SAMPLE"); Call<Post> call = jsonplaceholderAPI.patchPost(headers,5, post); call.enqueue(new Callback<Post>() { ...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Property name : gHeating modes of stoves h setting EPC : 0xE0 Contents of property : Heating mode of the left stove: heating mode of the right stove: heating mode of the farside stove Value range (decimal notation) : Heating power control mode: 0x41 Deepfrying mode (tempura, etc.): 0x42 Water heating mode: 0x43 Rice bo...
protected boolean setGheatingModesOfStovesHSetting(byte[] edt) {return false;}
[ "public void parsePropertyString()\n {\n if(properties.substring(0,1).equals(\"X\"))\n {\n hydrophobic = 1.0;\n }\n else\n {\n hydrophobic = 0.0;\n }\n if(properties.substring(1,2).equals(\"X\"))\n {\n polar = 1.0;\n }\n else\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ToDo P level POST: Returns the sum of the nonnegativevalued nodes on level equal to selectedLevel Return 0 if selected level does not appear in the list
int traverseAndAdd(int selectedLevel) { if(!this.validate()||this.top == null) { return 0; } return addHelper(this.top,selectedLevel); }
[ "public int value(TreeNode tree){\n \ttree = level(tree, 1);\n return sum(tree);\n }", "public int computeNodesToInspect() {\n\t\tint sumLevel = 0;\n\t\tint sumLeaves = 0;\n\t\tRCSNode node;\n\t\tfor (Integer id : nodeMap.keySet()) {\n\t\t\tnode = nodeMap.get(id);\n\t\t\tif (node.isLeaf()) {\n\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table PUBLIC.PRODUCTCATEGORY
ProductCategory selectByPrimaryKey(Integer id);
[ "public ArrayList<Product> getCategoryList(String keyword, String category){\r\n ArrayList<Product> result = new ArrayList<Product>(0);\r\n Connection conn = null;\r\n try {\r\n \r\n DBConnectionFactory myFactory = DBConnectionFactory.getInstance();\r\n conn = m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Name: MoveToFinishRight Type: ArrayList Action: move the split which is being set to the right target position Input: stateGameAutoArrayList,positionDisableList,positionRealSplit,targetPosition Output: stateGameAutoArrayList
private ArrayList<StateGameAuto> MoveToFinishRight(ArrayList<StateGameAuto> stateGameAutoArrayList, ArrayList<Position> positionDisableList, Position positionRealSplit, ...
[ "public static int [] move_right(int [] trueStartPosition, int a_limit, int b_limit, boolean hault_app_on_limit_cap) throws Exception {\n \tint a = trueStartPosition[0];\n \tint b = trueStartPosition[1];\n \t\n \t//a\n \tb += 1; \n \t\n \treturn nextTrueStartPosition(trueStartPosition, Directio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method that adds one to usedVacation instance variable
public void usePaidVacation() { usedVacation++; }
[ "void useUnpaidVacation() {\n usedUnpaidVacation++;\n }", "int getUsedVacation() { // getter method for usedVacation\n return usedVacation;\n }", "void setUsedVacation(int usedVacation) {\n this.usedVacation = usedVacation; \n }", "public void addVac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Specifies the payment icon to display for this transaction.
public java.util.Date getProcessedAt() { return processedAt; }
[ "@Override\r\n\tpublic void setIcon(Icon icon) {\r\n\t\tthis.icon = icon;\r\n\t}", "@Override\r\n\t\tpublic void setIcon(String iconImage) {\r\n\t\t\t//don't need to do this\r\n\t\t}", "protected void setExtraIcon(Icon extraIcon) {\n\t\tthis.extraIcon = extraIcon;\n\t}", "public StatIcon getMerchantingIcon(){...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a bunch of random tables. Each table will have a Primary key column (name "id") and one foreign key relation to a randomly chosen other table. Every table will have a random number of columns (max 10
public List<Table> generateRandomTables(int number, int maxColumns) throws InvalidParamException { List<Table> tables = new ArrayList<>(); if (number < 1 || maxColumns < 2) { throw new InvalidParamException( "Number of tables must be at least 1; max number of ...
[ "public void createTables() {\r\n\t\tcreateFeedsTable();\r\n\t\tcreateTopicsTable();\r\n\t\tcreateLikedItemsTable();\r\n\t}", "public static void createTablesBestEffort() {\n \t\ttryCreateTable(Tag.class);\n \t\ttryCreateTable(Comment.class);\n \t\ttryCreateTable(Metadata.class);\n \t\ttryCreateTable(DefaultMetad...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }