query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Gets the value of the classID property. | public long getClassID() {
return classID;
} | [
"public int getClassID() {\n return classID;\n }",
"public long getClassid() {\n return classid_;\n }",
"public Integer getClassId() {\r\n return classId;\r\n }",
"public Integer getClassId() {\n return classId;\n }",
"public int getClassId() {\r\n return cla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property taxon. | public NCBITaxon getTaxon() {
return this.taxon;
} | [
"java.lang.String getTaxon();",
"public double getTaxa();",
"public String getTaxNo() {\n return taxNo;\n }",
"public BigDecimal getTax() {\n return tax;\n }",
"org.apache.xmlbeans.XmlString xgetTaxon();",
"public java.math.BigDecimal getTax() {\n return tax;\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get genre by unique id | Genre findById(Long id); | [
"Genre getGenre(int genreId);",
"public Single<Genre> getGenreById(String id) {\n return getById(id);\n }",
"List<Genre> getFilmGenres(int filmId);",
"protected abstract String getGenreId();",
"public static ArrayList<Genre> retrieveGenreOfMovieID(String movieId){\n ArrayList<Genre> toReturn = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.google.protobuf.StringValue name = 2; | com.google.protobuf.StringValue getName(); | [
"com.google.protobuf.StringValueOrBuilder getNameOrBuilder();",
"com.google.protobuf.StringValue getText();",
"com.google.protobuf.StringValue getCustomValue();",
"com.google.protobuf.Value getValue();",
"com.google.protobuf.StringValueOrBuilder getTextOrBuilder();",
"com.google.protobuf.StringValueOrBuil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An ArrayList of all InventoryItems on hand, one for each catalog item sold by the store. constructor for Inventory should initialize items to be empty | public Inventory(){
this.items = new ArrayList<InventoryItem>();
} | [
"public Inventory() {\r\n\t\t\tourItems = new ArrayList<>();\r\n\t\t}",
"public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }",
"public Inventory()\r\n\t{\r\n\t\ttheItems = new Item[50];\r\n\t}",
"public List<Item> getItemsInInventory() {\n\n List<Item... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that generates a Command APDU from a space separated hex encoded byte string. Ex: "00 20 12 13 14 15 A1" The string should contain the class, ins, p1 and p2 | private static CommandAPDU genCommand(String commandString) {
String[] byteStrings = commandString.split(" ");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (String byteString : byteStrings) {
baos.write(Integer.parseInt(byteString, 16));
}
return new ... | [
"public ISOCommandAPDU(byte classByte, byte instruction, byte p1, byte p2) {\n this(4, classByte, instruction, p1, p2, null, -1); // size = header length\n }",
"private CommandAPDU createCommandAPDU(byte[] commandNonce, byte[] responseNonce, byte[] commandAPDU) throws Exception {\r\n\t\tthis.validateNonce = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the WRoleDef list where its ids are into pkArray | public List<WRoleDef> getWRoleDefByPkArray(Integer[] pkArray, Integer currentUserId) throws WRoleDefException {
if (pkArray == null){
return null;
}
List<String> idList = new ArrayList<String>();
for (Integer id: pkArray) {
idList.add(id.toString());
}
return new WRoleDefDao().getWRo... | [
"public List<String> getRoleIDs() {\n List<String> ids = new ArrayList<String>();\n try {\n for (Role r : getRoles()) {\n ids.add(r.getID());\n }\n }\n catch (IOException ioe) {\n // nothing to do - returns empty list\n }\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the number of all rules in the rule list | public int numberOfRules() {
return this.rules.size();
} | [
"public int queryRuleCount() {\n return _rules.size();\n }",
"int getSubruleCount();",
"@Override\r\n public final int getUselessCount() {\r\n int i;\r\n\r\n i = 0;\r\n for (Rule r : this.m_rules) {\r\n if (r.isUseless())\r\n i++;\r\n }\r\n\r\n return i;\r\n }",
"public int ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last link in the ordered set where applicationId = &63;. | public de.fraunhofer.fokus.movepla.model.Link fetchByapp_Last(
long applicationId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public de.fraunhofer.fokus.movepla.model.Link findByapp_Last(\n long applicationId,\n com.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n throws com.liferay.portal.kernel.exception.SystemException,\n de.fraunhofer.fokus.movepla.NoSuchLinkException;",
"public de.f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of calcCurrencyReward method, of class JobControl. | @Test
public void testCalcCurrencyReward()
{
System.out.println("calcCurrencyReward");
int cDiff = 4;
JobControl instance = new JobControl();
//int result = instance.calcCurrencyReward(cDiff);
// System.out.println(cDiff + ", Congratulations! You have been awarde... | [
"@Test\n public void testCalcExpReward() \n {\n System.out.println(\"calcExpReward\");\n int cDiff = 4;\n JobControl instance = new JobControl();\n int result = instance.calcExpReward(cDiff);\n \n System.out.println(cDiff + \", You have gained \" + result + \" experie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
decodes an octal value. | public static String unescapeOctal(String v) {
if (v != null) {
try {
StringWriter writer = new StringWriter(v.length() * 2);
OCTAL.translate(v, writer);
// String out = writer.toString();
return writer.toString();
} catch (IOException var3) {
throw new RuntimeEx... | [
"private void readOctalEscapeSequence() throws CompilerException {\n\n int value = Character.digit((char) c, BASE_OCTAL);\n\n readChar();\n if (isOctalDigit()) {\n value = (value << 3) + Character.digit((char) c, BASE_OCTAL);\n readChar();\n if (isOctalDigit()) {\n value = (value << 3... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setWeight method, of class gov.sandia.cognition.learning.kernel.WeightedKernel. | public void testSetWeight()
{
WeightedKernel<Vector> instance = new WeightedKernel<Vector>();
assertEquals(WeightedKernel.DEFAULT_WEIGHT, instance.getWeight());
double weight = RANDOM.nextDouble();
instance.setWeight(weight);
assertEquals(weight, instance.getWeight()... | [
"public void setWeight(double weight);",
"protected abstract void setWeight(int v, double w);",
"public void setWeight(float weight)\n {\n this.weight = weight;\n }",
"abstract void setWeight(int i, int j, Double weight);",
"public final void setWeight(double w) {\n innerOperator.setWeig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for "toString" method in ResourceStack Class. | @Test
public void toStringTest() {
assertEquals("1 2 3 4", stack.toString());
} | [
"public void testToString()\n\t{\n\t\t//TODO Implement toString().\n\t}",
"@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n RevisorParentesis instance = null;\r\n String expResult = \"\";\r\n String result = instance.toString();\r\n assertEqual... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
State Match Node : admin1 > State match Node | @Test
public void testSubsystemCalledOnceForStateMatch() throws Exception{
Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> admin1Attributes = new HashMap<>();
FilterNode adminsFilterNode = getAdminsFilterNode("admin1");
admin1Attributes.put(CIRCUS_MODELNODEID, new Pair<>(new ArrayList... | [
"public boolean same_State(Search_Node n2){\n return state.same_State(n2.get_State());\n }",
"@Test\n public void testSubsystemCalledOnceForStateMatchNonMatch() throws Exception {\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> sponsorsAdmin3Attributes = new HashMap<>();\n List<Filt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new empty Item message. | public Item() {
this("", 0, 0);
} | [
"protected Item createCtorItem() {\n Item item = new Item( \n i18n( \"ctorItem_title\" ), i18n( \"ctorItem_description\" ),\n null, null, false, false );\n return item;\n }",
"private PBMailItem() {}",
"public NotificationItem() {\n }",
"public OrderItem() {}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleOutput" $ANTLR start "entryRuleVariable" InternalWh.g:203:1: entryRuleVariable : ruleVariable EOF ; | public final void entryRuleVariable() throws RecognitionException {
try {
// InternalWh.g:204:1: ( ruleVariable EOF )
// InternalWh.g:205:1: ruleVariable EOF
{
before(grammarAccess.getVariableRule());
pushFollow(FOLLOW_1);
ruleVariable();... | [
"public final EObject entryRuleVariable() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleVariable = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:2240:2: (iv_ruleVariable= rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Click on Continuous Integration Link. | public OPEN_POSITIONS clickContinuousIntegrationLink() {
if(continuousIntegration.isDisplayed())
continuousIntegration.click();
return this;
} | [
"HtmlPage clickSiteLink();",
"public void clickYourTargetLink(){\n\t\tdriver.findElement(yourTargetLink).click();\n\t\tReporter.log(\"Clicked on 'Your Target' link...\");\n\t}",
"public void clickYourTargetLink (){\n\t\tdriver.findElement(yourTargetLink).click();\n\t\tReporter.log(\"Clicked on 'Your Target' lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays an error message in red. | @Override
public void displayErrorMsg(String errorMsg) {
System.out.println(ANSI_RED + errorMsg + COLOR_RESET);
} | [
"void showError(String message);",
"public void error ( String msg )\n {\n insertLine( msg , _errorStyle , true ) ;\n }",
"public void printInvalidMessg() {\n System.out.println(ANSI_RED+\"Invalid user command!! \\n Please try again\"+ANSI_RESET);\n }",
"public void displayError(String msg) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "date_key" main.java.PLSQLKeys.g:2155:1: date_key : SQL92_RESERVED_DATE ; | public final date_key_return date_key() throws RecognitionException {
date_key_return retval = new date_key_return();
retval.start = input.LT(1);
Object root_0 = null;
Token SQL92_RESERVED_DATE462=null;
Object SQL92_RESERVED_DATE462_tree=null;
try {
// ma... | [
"Expression literal(Date d);",
"public final void mDATE() throws RecognitionException {\n try {\n int _type = DATE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will find and print the shortest and longest strings in the list | public void printShortestAndLongest()
{
int shortest;
String shortList = null;
int longest;
String longList = null;
if(head == null)
{
System.out.println("The list is empty. There is nothing to print.");
}
else
{
... | [
"public static void longestFirst(List<String> list) {\n\t\tlist.sort((s1, s2) -> s2.length() - s1.length());\n\t}",
"public static String longest(List<String> list) {\r\n\t\t\tIterator<String> i = list.iterator();\r\n\t\t\tString result = i.next(); //store in a var to avoid advancing\r\n\t\t\tSystem.out.println... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Install Payment Instruction Installs a payment instruction for caller. | public Future<InstallPaymentInstructionResponse> installPaymentInstructionAsync(final InstallPaymentInstructionRequest request); | [
"public InstallPaymentInstructionResponse installPaymentInstruction(InstallPaymentInstructionRequest request)\n throws AmazonFPSException {\n return invoke(InstallPaymentInstructionResponse.class, convertInstallPaymentInstruction(request));\n }",
"public static void makePayment() {\n /... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test method for getKeysForPlayer(long, long[]). In this case, the ids is null. | public void testGetKeysForPlayer_NullIds() throws Exception {
try {
dao.getKeysForPlayer(1, null);
fail("IllegalArgumentException expected.");
} catch (IllegalArgumentException e) {
// should land here
}
} | [
"public void testGetKeysForPlayer_NoPlayer() throws Exception {\n try {\n dao.getKeysForPlayer(1, new long[0]);\n fail(\"EntryNotFoundException expected.\");\n } catch (EntryNotFoundException e) {\n // should land here\n }\n }",
"java.util.List<java.lang.Lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Attribute Collection Reset'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAttributeCollectionReset(AttributeCollectionReset object) {
return null;
} | [
"public T caseAssociationCollectionReset(AssociationCollectionReset object) {\n\t\treturn null;\n\t}",
"public T caseCompositionCollectionReset(CompositionCollectionReset object) {\n\t\treturn null;\n\t}",
"@Override\n\t\tprotected void resetAttribute() {\n\t\t}",
"public T caseAttributeRemoved(AttributeRemov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
broadcast successful operations on group, the extend is additional message for notice to client, e.g. extend is the affected username when group member changes | public void broadcast(String groupId, GroupOperationType type, String extend); | [
"void extendModerators(User sender, User user, BasicGroup group);",
"default void onKicked(GroupID group, String name) {}",
"public void notifyGroupChanges(Group group) {\r\n ArrayList<User> members = group.getUsers();\r\n ArrayList<Transferable> data = new ArrayList<>();\r\n data.add(group... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
de.bht.fpa.statepattern.v2.CoffeeMachine machine = null; de.bht.fpa.statepattern.v3.CoffeeMachine machine = null; de.bht.fpa.statepattern.v5.CoffeeMachine machine = null; | @Before
public void setUp() throws Exception {
machine = new de.bht.fpa.statepattern.v1.CoffeeMachine();
// machine = new de.bht.fpa.statepattern.v2.CoffeeMachine();
// machine = new de.bht.fpa.statepattern.v3.CoffeeMachine();
// machine = new de.bht.fpa.statepattern.v5.CoffeeMachine();
} | [
"public Machine() {\n _isConfigured = false;\n }",
"public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }",
"public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is thrown when a client does not exist and a message is wanted to be provided. | public NoSuchClientException(String message){
super(message);
} | [
"public NoSuchClientException(String message) {\n super(message);\n }",
"public ClientNotFoundException() {\n super(\"Client record not available\");\n }",
"@Test(expected = NullPointerException.class)\n\tpublic void clintNotExistTest() {\n\t\tClientDTO client = service.getClient(\"thisdoesnotexist@hotm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getListFromTable method, of class RMAbuddyModel. | @Test
public void testGetListFromTable() {
System.out.println("getListFromTable");
String aTable = "";
RMAbuddyModel instance = new RMAbuddyModel();
List expResult = null;
List result = instance.getListFromTable(aTable);
assertEquals(expResult, result);
... | [
"@Test\r\n\tpublic List<LodgingInfo> getItem() {\r\n\t\tString sqlFields = \" * \";\r\n\t\tString sqlQuery = \" from lodger lr LEFT JOIN lodginginfo lo ON lr.`lodgingInfoId`= lo.id \";\r\n\t\tString sql = \"select \"+ sqlFields + sqlQuery ;\r\n\t\tConnection conn = JdbcUtils.getConnection();\r\n\t\t\r\n\t\tPrepared... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for property categoryCode. | public void setCategoryCode(String categoryCode) {
this.categoryCode = categoryCode;
} | [
"public void setCategoryCode(String categoryCode) {\r\n this.categoryCode = categoryCode;\r\n }",
"@Override\n\tpublic void setCategoryCode(java.lang.String categoryCode) {\n\t\t_lineaGastoCategoria.setCategoryCode(categoryCode);\n\t}",
"public String getCategoryCode() {\r\n return categoryCode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a hourglass force contribution to the node | public synchronized void addHourglassForce(Matrix param) {
hourglass_force.set(0, 0, hourglass_force.get(0, 0) + param.get(0, 0));
hourglass_force.set(1, 0, hourglass_force.get(1, 0) + param.get(1, 0));
hourglass_force.set(2, 0, hourglass_force.get(2, 0) + param.get(2, 0));
force.set... | [
"public synchronized void addHourglassMoment(Matrix param) {\r\n hourglass_force.set(3, 0, hourglass_force.get(3, 0) + param.get(0, 0));\r\n hourglass_force.set(4, 0, hourglass_force.get(4, 0) + param.get(1, 0));\r\n hourglass_force.set(5, 0, hourglass_force.get(5, 0) + param.get(2, 0));\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If both URIs are hierarchical, their scheme and authority components are identical, and the base path is a prefix of the child's path, then return a relative URI that, when resolved against the base, yields the child; otherwise, return the child. | private static URI relativize(URI base,URI child){
// check if child if opaque first so that NPE is thrown
// if child is null.
if(child.isOpaque()||base.isOpaque())
return child;
if(!equalIgnoringCase(base.scheme,child.scheme)
||!equal(base.authority,child.au... | [
"private static URI relativize(URI base, URI child) {\n\t\t// check if child if opaque first so that NPE is thrown\n\t\t// if child is null.\n\t\tif (child.isOpaque() || base.isOpaque())\n\t\t\treturn child;\n\t\tif (!equalIgnoringCase(base.scheme, child.scheme)\n\t\t\t|| !equal(base.authority, child.authority))\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reads private key from file and creates it | private PrivateKey getPrivateKey(String filename) throws Exception
{
File f = new File(filename);
FileInputStream fis = new FileInputStream(f);
DataInputStream dis = new DataInputStream(fis);
byte[] keyBytes = new byte[(int) f.length()];
dis.readFully(keyBytes);
... | [
"private PrivateKey private_key_reader(String filename)\r\n throws Exception {\r\n\r\n byte[] keyBytes = Files.readAllBytes(Paths.get(filename));\r\n\r\n PKCS8EncodedKeySpec spec =\r\n new PKCS8EncodedKeySpec(keyBytes);\r\n KeyFactory kf = KeyFactory.getInstance(\"RSA\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the mergeHelp method in Utils. | void testMergeHelp(Tester t) {
ArrayList<Edge> edges = new ArrayList<Edge>();
ArrayList<Edge> result = new ArrayList<Edge>();
this.initEdges();
Comparator<Edge> comp = new EdgeWeightComparator();
Utils.mergeHelp(edges, comp, 0, -1);
t.checkExpect(edges, result);
e... | [
"@Test(timeout = 4000)\r\n public void test55() throws Throwable {\r\n HelpFormatter helpFormatter0 = new HelpFormatter();\r\n Options options0 = new Options();\r\n Option option0 = new Option((String) null, (String) null);\r\n Options options1 = options0.addOption(option0);\r\n helpForm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "statisticalFunctionParameters" /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:448:1: statisticalFunctionParameters : '(' i= ID ( ',' ln= labelName )? ')' > ^( ARGUMENT $i) ( $ln)? ; | public final CQLParser.statisticalFunctionParameters_return statisticalFunctionParameters() throws RecognitionException {
CQLParser.statisticalFunctionParameters_return retval = new CQLParser.statisticalFunctionParameters_return();
retval.start = input.LT(1);
Object root_0 = null;
Toke... | [
"public String visit(FormalParameterTerm n, LLVMRedux argu) throws Exception {\n String _ret=null;\n u.print(\", \");\n n.f1.accept(this, argu);\n return _ret;\n }",
"public void visitFormalParameters(FormalParameters ast) throws ParseException\r\n {\n\r\n visitChildren(as... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Close all sessions to remote machine. | public void closeAll(){
for(Session s : sessions){
if(s.isConnected()) s.disconnect();
sessions.remove(s);
}
} | [
"@Override\n public void close() {\n try {\n if (tunnelSession != null) {\n tunnelSession.close();\n tunnelSession = null;\n }\n if (sshclient != null) {\n sshclient.stop();\n sshclient = null;\n }\n } catch (final Throwable t) {\n throw new RuntimeExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether the qualifier and schema are both null. If false, then both the qualifier and schema are nonnull. | public boolean isEmpty() {
return null == mQualifier;
} | [
"public boolean isSetQualifier() {\n return this.qualifier != null;\n }",
"public boolean nullPlusNonNullIsNull()\n throws SQLException\n {\n return true;\n }",
"public boolean nullPlusNonNullIsNull() throws SQLException {\n // Sybase 11.92 says true\n // MS SQLServer seems t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the only changes made are the addition, changing, or removal of the defined set of clients. | private boolean onlyClientSetChanged(RadiusServiceConfig cfg, RadiusServiceConfig currentCfg) {
return cfg.getPort() == currentCfg.getPort() && cfg.isEnabled() == currentCfg.isEnabled()
&& cfg.getThreadPoolConfig() != null
&& cfg.getThreadPoolConfig().equals(currentCfg.getThread... | [
"public boolean hasChanges() {\r\n return this.hasAdds() || this.hasRemoves() || this.hasChangedMapKeys() || this.getOwner().isNew();\r\n }",
"public boolean isObservers()\n {\n\n return !clientObservers.isEmpty();\n }",
"public boolean containsClient() {\n\t\treturn clients != null;\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor with another feature item | public FeatureItem(FeatureItem otherItem) {
super();
this.featureId = otherItem.getFeatureId();
this.featureName = otherItem.getFeatureName();
this.featureType = otherItem.getFeatureType();
this.valueId = otherItem.getValueId();
this.valueStr = otherItem.getValueStr();
this.value = otherItem.getVal... | [
"public FeatureVector(Feature f) {\n this();\n addFeature(f);\n }",
"Feature createFeature();",
"ShipmentItemFeature createShipmentItemFeature();",
"FeatureRef createFeatureRef();",
"public void add( Feature feature );",
"Feature feature(String featureName);",
"void addFeature(int index, Feature ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given unit to the set of units of this faction. | public void addUnit(@Raw Unit unit) throws IllegalArgumentException{
if (unit == null || unit.getFaction() != this)
throw new IllegalArgumentException();
units.add(unit);
} | [
"public void addUnit(Unit unit) {\r\n if (!allUnits.contains(unit)) {\r\n allUnits.add(unit);\r\n }\r\n }",
"public void addUnit(Unit unit) {\n\t\tunits.add(unit);\n\t}",
"public void addUnit(Unit unit) {\r\n\t\tRandom rand = new Random();\r\n\t\tassert unit != null;\r\n\t\tint[] a =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marks the leaf "nsresetretry" with operation "delete". | public void markNsResetRetryDelete() throws JNCException {
markLeafDelete("nsResetRetry");
} | [
"public void markNsBlockRetriesDelete() throws JNCException {\n markLeafDelete(\"nsBlockRetries\");\n }",
"public void markRequestRetryDelete() throws JNCException {\n markLeafDelete(\"requestRetry\");\n }",
"public void markNsUnblockRetriesDelete() throws JNCException {\n markLeafDel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
main() Internal methods Retrieves the default loading scripts. | private void retrieveDefaultLoadingScripts() {
// locate the pre-loading script
URL preScriptURL = this.locateScript(PRE_LOADING_SCRIPT_PATH);
if (preScriptURL != null) {
this.setPreLoadingScriptURL(preScriptURL);
}
// locate the post-loading script
URL postScriptURL = this.... | [
"private void loadDefaultResources() {\n\t\tadd(\"tooltipster.css\", Type.stylesheet);\n\t\tadd(\"jquery-treeTable.css\", Type.stylesheet);\n\t\tadd(\"jquery-ui.min.css\", Type.stylesheet);\n\t\tadd(\"jquery-ui.structure.min.css\", Type.stylesheet);\n\t\tadd(\"jquery-ui.theme.min.css\", Type.stylesheet);\n\t\tadd(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an empty header tag with the given element | public Header(DOMelement element){
super(tag(Header.class),element);
} | [
"public Header() {\n\t\tsuper(tag(Header.class)); \n\t}",
"Header createHeader();",
"@Override\n public String getHeaderElement(String h, String e) {\n return null;\n }",
"public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException;",
"private void generateHeader() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the number of cards in hands after splitting | private void updateCardsCountsForSplit() {
numberCardsInHandTwo = 1;
numberCardsInHandTwo = 1;
} | [
"public void split() {\n\n Card temp = playerHand[USING_HAND_ONE][CARD_TWO];\n playerHand[USING_HAND_ONE][CARD_TWO] = null;\n playerHand[USING_HAND_TWO][CARD_ONE] = temp;\n isSplit = true;\n\n updateCardsCountsForSplit();\n }",
"public int getNumCards(){\n return hand.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the file name of the testing partition given the fold. | public String testFold(int fold) {
return fold("test", fold);
} | [
"public String fold(String stage, int fold) {\n String s = path + folder + String.format(validationDirMask, numFolds) +\n String.format(fileNameMask, name, fold, stage);\n return s;\n }",
"String getPartitionName();",
"public String getPartition();",
"public static String getFileName(String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the mer entities. | public static java.util.List<com.viettel.ams.core.model.MerEntity> findAll()
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findAll();
} | [
"public List<Entity> getAll() {\n return entities;\n }",
"public HashSet<Entity> getEntities() {\n return entities;\n }",
"public List<EntityBase> getEntities() {\n return this.sirenEntity.getEntities();\n }",
"public static List<Entity> getEntities() {\n return entities;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a map of the locales and localized messages of this batch monitoring. | public Map<Locale, String> getMessageMap(); | [
"public HashMap<Locale, HashMap<String, String>> getLocalizedTexts();",
"public Map<Locale, String> getLocalizedValues() {\n return this.localizedValues;\n }",
"public Map<Locale, String> getDescriptionMap();",
"Set<Message> getMessagesByLocale(Locale locale);",
"public static Map<Long,Message> ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if input ticket is lucky with PiterTicketAlgorithm algorithm. | public boolean isLuckyTicket(int[] digits) {
if (digits.length != TICKET_NUMBER_LENGTH) {
throw new IllegalArgumentException("Ticket must have 6 digits");
}
int even = 0;
int odd = 0;
for (int i = 0; i < TICKET_NUMBER_LENGTH; i++) {
if (i % 2 == 0) {
... | [
"private static boolean isLucky(int luck)\n {\n assert luck < LUCK_RANGE;\n\n return Rng.getInt(0, LUCK_RANGE - 1) < luck;\n }",
"boolean isWinningCombination(Ticket ticket);",
"public boolean checkTicket(Ticket t) {\r\n int timeLim = clock.getTime() - t.getPaymentTime();\r\n\t\tif (t.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the URLs of all jars which are need for the current OS. | private static List<URL> getJarURLsForOS(String path) {
List<URL> urls = getJarURLsFromPath(path);
if (osWindows( )) {
urls.addAll(getJarURLsFromPath(path + File.separator +
LIB_WINDOWS_PLUGIN_DIR));
}
else {
urls.addAll(getJarURLsFromPath(path + File.separator +
LIB_LINUX_PLUGIN_DIR))... | [
"public URL[] getJars() throws MalformedURLException {\n List<URL> urls = new ArrayList<URL>();\n if (file.getName().endsWith(\".jar\")) {\n urls.add(file.toURI().toURL());\n for (File f: libs) {\n if (f.isAbsolute()) {\n urls.add(f.toURI().toURL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creating a MBean named as HelloMBean having setMessage,getMessage,sayHello,sayHi | public interface HelloMBean {
/**
* setting the value of message as userdefined string
* @param message
*/
public void setMessage(String message);
/**
* getting the value of message
* @return message
*/
public String getMessage();
/**
* To publish the hello statement to user
* @param ... | [
"public interface JMXHelloMBean {\r\n\r\n\tpublic String getName();\r\n\tpublic void setName(String name);\r\n\t\r\n\tpublic void sayHello();\r\n\tpublic int add(int x, int y);\r\n\t\r\n\tpublic int getCache();\r\n\tpublic void setCache(int cacheSize);\r\n}",
"private void createMBeans(){\r\n try{\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this function chooses randomly a bigInteger less than BigInteger n | public BigInteger nextRandomBigInteger(BigInteger n) {
Random rand = new Random();
BigInteger result = new BigInteger(n.bitLength(), rand);
//check if the BigInteger is bigger or equal the given BigInteger so we create another one instead
while( result.compareTo(n) >= 0 ) {
r... | [
"public static BigInteger RandomSmallerN(BigInteger n) {\r\n\t\t// if a is zero or a > n, try to again\r\n\t\tBigInteger a;\r\n\t\tdo {\r\n\t\t\tSecureRandom random = new SecureRandom();\r\n\t\t\tint sn = random.nextInt(n.bitLength()); // random bit length\r\n\t\t\ta = new BigInteger(sn, random); // random number\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
|/p\\| arg signifies that subsequent args are primitive |/o\\| signals that subsequent args are objects that require instantiation |/e(depth)\\| signals the end of arguments for an object at a specific depth |/l\\| signals the beginning of a long string if placed after String (long strings can have spaces) |/eS\\| sign... | private static Object constructFromArgs(Argument args,int depth) {
try {
ArrayList<Class> classList=new ArrayList<>(); //list of classes of arguments
ArrayList<Object> arguments=new ArrayList<>(); //the initialization arguments for the object being instantiated
... | [
"private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }",
"public StringArgument() {\n\t\tsuper(StringArgumentType.word());\n\t}",
"AstroArg unpack(Astro litChars);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HttpComponentsClientHttpRequestFactory clientHttpRequestFactory = new HttpComponentsClientHttpRequestFactory(); clientHttpRequestFactory.setHttpClient(httpClient()); return clientHttpRequestFactory; | @Bean
public HttpComponentsClientHttpRequestFactory clientHttpRequestFactory() {
HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
factory.setHttpClient(httpClient());
factory.setConnectTimeout(CONNECT_TIMEOUT);
factory.setReadTimeout(SOCKET_TIMEOU... | [
"HttpClientFactory getHttpClientFactory();",
"private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }",
"private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PartiturWorkflow__Group__4" $ANTLR start "rule__PartiturWorkflow__Group__4__Impl" InternalPartitur.g:689:1: rule__PartiturWorkflow__Group__4__Impl : ( ( rule__PartiturWorkflow__HandlersAssignment_4 ) ) ; | public final void rule__PartiturWorkflow__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalPartitur.g:693:1: ( ( ( rule__PartiturWorkflow__HandlersAssignment_4 )* ) )
// InternalPartitur.g:694:1: ( ( rule__PartiturWorkf... | [
"public final void rule__PartiturHandler__Group_7__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1221:1: ( rule__PartiturHandler__Group_7__1__Impl )\n // InternalPartitur.g:1222:2: rule__PartiturHandler__Gro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Rebuild the contents of an builder plugin menu for the given toolset. | public void
rebuildDefaultBuilderCollectionMenu
(
JPopupMenu topmenu,
int channel,
JMenu menu,
ActionListener listener,
boolean enabled
)
{
PluginMenuLayout layout = null;
TripleMap<String, String, VersionID, LayoutGroup> builderLayouts = null;
TripleMap<String,String,VersionID,Tre... | [
"private JMenuItem\n rebuildCollectionPluginMenuHelper\n (\n JPopupMenu topmenu,\n PluginMenuLayout layout, \n String prefix, \n TripleMap<String,String,VersionID,TreeSet<OsType>> plugins,\n TripleMap<String, String, VersionID, LayoutGroup> builderLayouts,\n ActionListener listener,\n boolean enable... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a test for getPieces | public static void getPiecesTest() {
OthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);
Board.setBoard();
Board.decPieceCount();
System.out.println(Board.getPieceCount());
System.out.println(Board.move(
TEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));
Board.m_Pieces[TEST_P... | [
"@Test\n\tpublic void validPiecesTest() {\n\t\tgs.playerNewRoll(pi,5);\n\t\tif(pi.getNumOfPieces().size() != 0) {\n\t\t\tfor(int i = 0; i < 5; i++) {\n\t\t\t\tif(pi.getNumOfPieces().get(i) > 0 && pi.getNumOfPieces().get(i) < 7) {\n\t\t\t\t\tassertTrue(true);\n\t\t\t\t} else {\n\t\t\t\t\tassertTrue(false);\n\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called after a branch has been saved to its parent. During invocation we should have a read lock on both the parent and child branch. This method should not throw an exception. This method functions more as a traditional listener: it should inspect, but not typically edit. If one listener throws an excep... | public void branchSaved(Branch<K> parent, Branch<K> child); | [
"public interface BranchListener<K> {\n\n\t/**\n\t * This method is called when a child branch is being saved to its parent\n\t * before data is saved to the parent. During invocation we should have a\n\t * write lock on the parent and a read lock on the child.\n\t * <p>\n\t * This method may throw a <code>SaveExce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the ratio of movement of the tank speed in y direction. | public static float getTankRatioMovementY(TankModeType tanklevel){
switch (tanklevel){
case EASY_MODE:
return EASY_RATIO_Y_DIRECTION;
case MEDIUM_MODE:
return MEDIUM_RATIO_Y_DIRECTION;
case HARD_MODE:
return HARD_RATIO_Y_DIRECT... | [
"public double getBallSpeedInYDirection() {\n return ball.getSpeedInYDirection();\n }",
"public int getySpeed() {\n\t\treturn this.ySpeed;\n\t}",
"double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }",
"public double getSpeedY() {\n return speedY;\n }",
"public int getySpeed()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates bimonthly Periods for the whole year in which the start date of the given Period exists. | @Override
public List<Period> generatePeriods(DateTimeUnit dateTimeUnit) {
Calendar cal = getCalendar();
dateTimeUnit.setMonth(1);
dateTimeUnit.setDay(1);
List<Period> periods = Lists.newArrayList();
int year = dateTimeUnit.getYear();
while (dateTimeUnit.getYear() == year) {
periods.... | [
"public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test AirportData object creation | @Test
public void testAirportData()
{
AirportData jfk = new AirportData("JFK", 40.639751, -73.778925);
assertEquals("JFK", jfk.getIata());
assertEquals(40.639751, jfk.getLatitude(), DELTA_FOR_COMPARE_DOUBLE);
assertEquals(-73.778925, jfk.getLongitude(), DELTA_FOR_COMPARE_DOUBLE);
} | [
"@Test\r\n void testAirportOf() {\r\n\r\n //test error handling for method\r\n assertThrows(NullPointerException.class, () -> { Airport.of(null, Duration.ofHours(2)); });\r\n assertThrows(NullPointerException.class, () -> { Airport.of(CLE.name(), null); });\r\n assertThrows(NullPointe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: mainDeclared returns mainDeclared Constraint: body+=BodyStatement | protected void sequence_mainDeclared(ISerializationContext context, mainDeclared semanticObject) {
genericSequencer.createSequence(context, semanticObject);
} | [
"@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(23)\n void mainBody(\n Body oMainBody);",
"public AtStmt body(Stmt body) {\n \t\tAtStmt_c n = (AtStmt_c) copy();\n \t\tn.body = body;\n \t\treturn n;\n \t}",
"Stmt\ngetHirBody();",
"protected void sequence_MainMethod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// Starting gameThread | private synchronized void start() {
if (running)
return;
running = true;
gameThread = new Thread(this);
gameThread.start();
} | [
"private void startGame(){\n if (mainThread == null || !running) {\n mainThread = new Thread(this);\n mainThread.start();\n }\n }",
"public void start() {\n\n\t\tgameloop = new Thread(this);\n\t\tgameloop.start();\n\n\t}",
"public void startGame() {\n\t\t//Start the render... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new Thread and executes the given command Then sends result as an embed generated from toEmbed(...) method. | @Override
public void run() {
String shellCommand = message.getContentDisplay().replace(HelperManager.prefix.getPrefixForGuild(message) + command + " ", "");
ProcessBuilder pb = new ProcessBuilder();
if (System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) {
pb.comman... | [
"public void run() {\n Log.i(LOGTAG, \"Running in new thread\"); // Show in Info Logcat window\n\n try {\n Log.i(LOGTAG,\"Sending command: \"+transmitterString); // Show in Info Logcat window\n printerRef.println(transmitterString); // Transmit text\n\n } catch (Exception ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method create an array that contains the fields values and its types. It will be used by jdbc PreparedStatement | @Override
public Object[] getParameterizedFieldsValues()
{
HBRecordDataModel dataModel = getMyDataModel();
Object[] object = new Object[] { dataModel.getLanguageCode(), dataModel.getFilePrefix(), dataModel.getFileKey(),
dataModel.getCodeDescription(), dataModel.getDateLastMaintained() };
return object;
... | [
"@Override\n\tpublic Object[] getParameterizedFieldsValues()\n\t{\n\t\tGAZRecordDataModel dataModel = getMyDataModel();\n\n\t\tObject[] object = new Object[] { dataModel.getOptionId(), dataModel.getFieldId(), dataModel.getPvId(), dataModel.getType(),\n\t\t\t\t\t\tdataModel.getClassName(), dataModel.getClassByte(), ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/this method is usefull for crypt a string (the CryptKey will be into the the class, and it will be static). | public String Crypt(String s); | [
"public String encrypt(String stringToEncrypt);",
"String encrypt(String text);",
"public final static String crypt(String clearPassword) {\n String encryptedPasswordWithSalt = jcrypt.crypt(clearPassword,\n clearPassword);\n String encryptedPassword =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the string representation of the RideRequestDto object | @Override
public String toString() {
return "RideRequestDto{" + "status=" + status + ", estimatedTime='" + estimatedTime + '\''
+ ", lastModified=" + lastModified + ", assignedDate=" + assignedDate + ", driverName='" + driverName
+ '\'' + ", vehicleColor='" + vehicleColor + '... | [
"String requestToString(MovilizerRequest request);",
"public String toString() {\n return \"TetheringRequest [ type= \" + mRequestParcel.tetheringType\n + \", localIPv4Address= \" + mRequestParcel.localIPv4Address\n + \", staticClientAddress= \" + mRequestParcel.st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inputs the specified URL into the input box for the website address. The insert URL link must be clicked for a dashboard widget before calling this method. | public void inputUrl( String url ) {
format( inputWebAddress, WEBSITE_ADDRESS ).type( url );
} | [
"private static void addSeedURL()\r\n\t{\r\n\t\tSystem.out.println(\"Enter a website to search for keywords.\");\r\n\t\tString userInput = input.nextLine();\r\n\t\t\r\n\t\tif(userInput.length() >= 7 && !(userInput.substring(0, 6).equals(\"https://\")))\r\n\t\t{\r\n\t\t\tuserInput = \"http://\" + userInput;\r\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the message from the server in realtime and sotres them into the queue. If the client cannot connect to the server, an exception will be caught and print the message. | public void run() {
while(true){
try {
Thread.sleep(200);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
try {
message = reader.readLine();
if(message.equals("NoMessage"))
continue;
queue.put(message);
} catch (Exception e) {
System.out... | [
"final public void run() {\n connectionEstablished();\n\n // The message from the server\n int msg;\n\n // Loop waiting for data\n\n try {\n // messageTimer.schedule(new TimerTask() {\n // @Override\n // public void run() {\n // try {\n // sendFromMessageQueue();\n // } ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows you to add any number of preconfigured InstanceId nested elements. | public void addConfiguredInstanceId(InstanceId instanceId) {
instanceIds.add(instanceId.getValue());
} | [
"private void addInstances (Object... instances) {\n for (int i = 0; i < instances.length; i++) {\n ic.add(instances[i]);\n }\n }",
"void setServiceInstances(Id.Program id, int instances);",
"private void assertInstanceIds(Response response, String ... expectedIds) {\n String body... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the True if the autoguider is currently available | public boolean getAutoguiderAvailable() { return autoguiderAvailable; } | [
"public void setAutoguiderAvailable(boolean autoguiderAvailable) { this.autoguiderAvailable = autoguiderAvailable; }",
"boolean isSetAuto();",
"boolean isAutomatic();",
"boolean isEnable_autotuning();",
"boolean getAuto();",
"public synchronized boolean isAutoWaitForIdle() {\n return isAutoWaitFor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorts the tasks in list of tasks based on natural order of tasks. | public void sortTasks() {
tasks.sort(null);
} | [
"public void sort() {\n Collections.sort(tasks);\n }",
"public void sortExecuteTime(){\n \n sortedList = new LinkedList<>(tasks.entrySet()); //initial sortedList\n \n Collections.sort(sortedList, new Comparator<Map.Entry<Integer, Task>>(){\n @Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PartiturHandler__Group__0" $ANTLR start "rule__PartiturHandler__Group__0__Impl" InternalPartitur.g:878:1: rule__PartiturHandler__Group__0__Impl : ( 'handler' ) ; | public final void rule__PartiturHandler__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalPartitur.g:882:1: ( ( 'handler' ) )
// InternalPartitur.g:883:1: ( 'handler' )
{
// InternalPartitur.g:88... | [
"public final void rule__PartiturHandler__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:870:1: ( rule__PartiturHandler__Group__0__Impl rule__PartiturHandler__Group__1 )\n // InternalPartitur.g:871:2: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the level defined by the game settings at the given index. | public Level getLevel(int i) {
return gameSettings.getLevel(i);
} | [
"public int getLevel(int index)\n\t{\n\t\tdouble value = (Math.log10(index/1.0)/Math.log10(2.0));\n\t\tint level = (int)Math.floor(value);\n\t\treturn level;\n\t}",
"int getLevelAt(int pos) {\n return levels[pos];\n }",
"public static LevelInformation getLevelByIndex(int index) {\n if (index == 1) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method accepts customer ID and amount to be blocked. It requests Administrator Application for blocking blockAmount from customer's balance. | public BlockAmountResponse blockAmount(String customerId, int blockAmount); | [
"public void setBLOCKED_AMOUNT(BigDecimal BLOCKED_AMOUNT) {\r\n this.BLOCKED_AMOUNT = BLOCKED_AMOUNT;\r\n }",
"private void blockCard() throws CardIsBlocked {\r\n this.isBlocked = true;\r\n throw new CardIsBlocked(\">>> Your card is blocked. Please contact your bank!\");\r\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A string representing a positive integer that specifies the number of rows spanned by this cell. The default is 1. | String getRowspan(); | [
"public int getRowSpan()\n {\n return rowSpan;\n }",
"public int getDisplayRows();",
"public int getRowNo() {\n return rowIndex+1;\n }",
"int getRowspan();",
"public int getRowSpan() {\n\t\treturn rowSpan;\n\t}",
"public int getNumRows()\r\n\t{\r\n\t return rows;\r\n\t}",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the button is pressed on any of our input translators. | @Override
public boolean isPressed(Action query) {
for (InputEventTranslator t : translators) {
if (t.isPressed(query))
return true;
}
return false;
} | [
"@SuppressWarnings(\"unused\")\n\tprivate boolean wasAnyButtonPressed() {\n\t\tfor (ArcadeButton button : buttons) {\n\t\t\tif (button.getPressCounter() > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isPressed(int button) {\n\t\treturn wrbevt.isPressed(button);\n\t}",
"@O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PART 3 Search for a record first in the shelf and then in the stacks | public Record findRecord(Record record){
Record target=new Record();
target=null;
for (int i=0; i< this.recordShelf.getSize(); i++){
if(!this.recordShelf.isEmptySlot(i)){
target=this.recordShelf.getRecordFromSlot(i);
if(target.equals(record)){
return target;
}
else{
this.recordShelf.p... | [
"void breadthFirstSearchFromBlip(B startBlip, Receiver<B> blipReceiver, boolean inSameRow);",
"public List<House> searchSoldHouses();",
"public static void consultShelf() {\n\t\tSystem.out.println(\"Insert a specific shelf id to show its features or insert all to show all shelves:\");\n\t\tString shelfIdSearch ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end::IssueCardCommandHandler[] Tag this handler to use it as code sample in the documentation tag::RedeemCardCommandHandler[] | @CommandHandler
public void handle(RedeemCardCommand command) {
if (command.amount() <= 0) {
throw new IllegalArgumentException("amount <= 0");
}
if (command.amount() > remainingValue) {
throw new IllegalStateException("amount > remaining value");
}
ap... | [
"public void handleCommand(String command);",
"public void setCardEventHandler(EventHandler<CardEvent> handler) {\n this.cardEventHandler = handler;\n }",
"ICommandObject discardCard();",
"byte[] handleCommand(byte[] cmdPayload) throws LEAPSerializationException;",
"public Object handleCommandResp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns list of existing participant collections names | public List<String> getParticipantsCollections() {
try {
List<String> colNames = new ArrayList<>();
MongoIterable<String> collections = database.listCollectionNames();
for (String collection : collections) {
if (collection.startsWith("PARTICIPANTS")) {
... | [
"Stream<String> listCollectionNames();",
"private void getCollections(){\r\n\t\tSet<String> colls = db.getCollectionNames();\r\n\r\n\t\tfor (String s : colls) {\r\n\t\t System.out.println(s);\r\n\t\t}\r\n\t}",
"String getCollectionName();",
"java.lang.String getCollection();",
"public List<String> getMes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find Department by id (departmentId). | Department findById(Integer departmentId); | [
"@Override\n\tpublic Optional<Department> findDepartmentById(Integer id) {\n\t\treturn departmentRepository.findById(id);\n\t}",
"public Department getDepartmentById(Integer id);",
"public Department getDepartmentById(long depatmentId);",
"public Department findById(Long id) {\n Optional<Department> or... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests Bid WON to String | @Test
public void testBidWonToString() {
BidWon ae = new BidWon("1","BID_WON",0L,"USER", 1L, 0);
assertEquals(ae.toString(), "BID_WON: Thu Jan 01 01:00:00 CET 1970 - Bid won on auction: 1 with value 0.0");
} | [
"@Test\n public void testToString() {\n Board b = new Board();\n assertEquals(INIT_BOARD_STATE, b.toString());\n makeSmile(b);\n assertEquals(SMILE, b.toString());\n }",
"java.lang.String getBunho();",
"@Test\n public void testingToStringMethod() {\n Bank amount = new... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .estafette.ci.manifest.v1.EstafetteStage stages = 6; | public com.estafette.ci.manifest.v1.EstafetteStage.Builder addStagesBuilder(
int index) {
return getStagesFieldBuilder().addBuilder(
index, com.estafette.ci.manifest.v1.EstafetteStage.getDefaultInstance());
} | [
"public com.estafette.ci.manifest.v1.EstafetteStageOrBuilder getStagesOrBuilder(\n int index) {\n return stages_.get(index);\n }",
"public com.estafette.ci.manifest.v1.EstafetteStage getStages(int index) {\n return stages_.get(index);\n }",
"public java.util.List<? extends com.estafette.ci.manifest... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
runs the ping command to the IP and stores the answer in the arraylist output | public String run(){
int i =0;
String outputStram = "";
try {
Process p = Runtime.getRuntime().exec("ping " + ip);
BufferedReader inputStream = new BufferedReader(
new InputStreamReader(p.getInputStream()));
String s = "";
// reading output stream of the command
wh... | [
"private void doPing(){\n ProcessBuilder pb = new ProcessBuilder().command(\"ip\", \"route\");\r\n\r\n try{\r\n Process process = pb.start();\r\n\r\n InputStream processStdOutput = process.getInputStream();\r\n Reader r = new InputStreamReader(processStdOutput);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .com.lvl6.proto.FullQuestProto newlyAvailableQuests = 2; | java.util.List<com.lvl6.proto.QuestProto.FullQuestProto>
getNewlyAvailableQuestsList(); | [
"com.lvl6.proto.QuestProto.FullQuestProto getNewlyAvailableQuests(int index);",
"java.util.List<? extends com.lvl6.proto.QuestProto.FullQuestProtoOrBuilder> \n getNewlyAvailableQuestsOrBuilderList();",
"com.lvl6.proto.QuestProto.FullQuestProtoOrBuilder getNewlyAvailableQuestsOrBuilder(\n int index... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method returns subset of Payment Method entities for given name. The name is passed through path param. | @GET
@Path("/named/{name : \\S+}")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public Response getPaymentMethodsByName( @PathParam("name") String name,
@BeanParam PaginationBeanParam params ) throws ForbiddenException {
RESTToolkit... | [
"public List<PaymentEntity> getAllPaymentMethods(){\n try{\n return this.entityManager.createNamedQuery(\"allPaymentMethods\", PaymentEntity.class).getResultList();\n } catch(NoResultException nre){\n return null;\n }\n }",
"public List<PaymentEntity> getPaymentMethod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calculates the numbers in the passed row and returns the corresponding string | String numbers(int row ,int n)
{
int decrementor=1;
int numDigits;
String number = ""; // Blank String is initialized.
if (row < n) // Before the mid point.
{
numDigits = 2 * row -1; // number of digits are counted ex. for 3rd row 12321
// (2 * 3 -1) = 6 - 1 = 5.
}
else // after t... | [
"public String numbers(int row, int totalRows) {\n\n\t\tString sequence = \"\"; // Required numbers string\n\n\t\t/*\n\t\t * Generates number string by counting from 1 to (totalRows - row + 1)\n\t\t * because the numbers string is decreasing with the increasing row\n\t\t * count.\n\t\t */\n\t\tfor (int count = 1; c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "items" attribute with a collection of TraPermiso entities that are retrieved from TraSeccion?cap_first and returns the navigation outcome. | public String navigateTraPermisoList() {
if (this.getSelected() != null) {
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("TraPermiso_items", this.getSelected().getTraPermisoList());
}
return this.mobilePageController.getMobilePagesPrefix() + "/traPermiso/... | [
"public String navigatePermisoList() {\r\n if (this.getSelected() != null) {\r\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Permiso_items\", this.getSelected().getPermisoList());\r\n }\r\n return \"/permiso/index\";\r\n }",
"public String naviga... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find all destinations in database | List<Destination> findAllDestinations(); | [
"List<DestinationDTO> getAllDestinations();",
"@GetMapping(path=\"/destinations\")\r\n\tpublic List<DestinationBO> getAllDestinations()\r\n\t{\r\n\t\treturn this.busy.findAllDestinations();\r\n\t}",
"public ArrayList<Destination> getDestinationList(){\n\t\tSession session = HibernateUtils.getSessionFactory().op... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Respond to a request to join. | @Override
public boolean respondToJoin(String username, String chatroomId, String response) {
int chatId;
if (chatroomId != null) {
chatId = Integer.parseInt(chatroomId);
if (userService.get(username) != null && chatroomService.get(chatId) != null && response != null) {
... | [
"private void sendJoinRequest() throws ConnectException, IOException,\n\t\t\tClassNotFoundException {\n\t\t// connect();\n\t\tObject req = (Object) new JoinRequest();\n\t\tHttpHandler.send(req, syncConn);\n\t\tcontext.getLogger().fine(\"Sending Join Request\");\n\t\thandleJoinResponse();\n\t}",
"@Override\n pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the game time of this game score. | @Override
public int getGameTime() {
return _gameScore.getGameTime();
} | [
"public synchronized int getTime(){\n\t\treturn gameTime;\n\t}",
"public Date getGameTime() {\n\t\treturn gameTime;\n\t}",
"public long getInGameTime() {\n \t\treturn inGameTime;\n \t}",
"public Integer getGameUseTime() {\n return gameUseTime;\n }",
"public long getSpentTime() {\r\n if (!ga... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .DeleteFriend.ServerToB delete_friend_server_to_b = 18; | private void mergeDeleteFriendServerToB(DeleteFriend.ServerToB value) {
if (rspCase_ == 18 &&
rsp_ != DeleteFriend.ServerToB.getDefaultInstance()) {
rsp_ = DeleteFriend.ServerToB.newBuilder((DeleteFriend.ServerToB) rsp_)
.mergeFrom(value).buildPartial();
} else {
rsp_ =... | [
"DeleteFriend.ServerToB getDeleteFriendServerToB();",
"private void setDeleteFriendServerToB(DeleteFriend.ServerToB value) {\n if (value == null) {\n throw new NullPointerException();\n }\n rsp_ = value;\n rspCase_ = 18;\n }",
"DeleteFriend.AToServer getDeleteFriendAToServer();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs a complete resolution of the dependency. The manager is asked to find the "right" implementations and instances for the provided dependency. If dependency is simple (not multiple), returns a singleton, and a single element in insts. WARNING: can return instances but no implementation, or vice versa (e.g. imple... | public Resolved resolveDependency(Instance client, Dependency dependency, boolean needsInstances); | [
"public interface DependencyManager extends Manager{\n\n//\t/**\n//\t * \n//\t * @return the name of that manager.\n//\t */\n//\tpublic String getName();\n//\n//\n//\n//\t// returns the relative priority of that manager, for the resolution algorithm\n//\tpublic int getPriority();\n//\n//\t/**\n//\t * A new composit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes only the list number and list level number. | protected void writeListNumbers(final OutputStream result) throws IOException {
if(listLevel > 0) {
result.write(RtfList.LIST_LEVEL_NUMBER);
result.write(intToByteArray(listLevel));
}
} | [
"public void setListLevel(int listLevel) {\r\n this.listLevel = listLevel;\r\n }",
"protected void writeList(List aList)\n {\n int len = _sb.length(); boolean simple = true;\n _sb.append('['); newline(); indent();\n for (Object val : aList) {\n writeIndent(); writeValu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a hex representation to a Java int. | public static int hexToInt(String s) {
return Integer.parseInt(s, 16);
} | [
"public static int hex_to_int(String s) {\n String digits = \"0123456789ABCDEF\";\n s = s.toUpperCase();\n int val = 0;\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n int d = digits.indexOf(c);\n val = 16*val + d;\n }\n r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
showing three point for team A | public void threePoint(View view){
scoreTeamA = scoreTeamA + 3;
displayForTeamA(scoreTeamA);
} | [
"public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }",
"public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }",
"public void addPointForTeamA(View view) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used to calculate how much memory in size the key, value and metadata use. | default long calculateSize(K key, V value, Metadata metadata) {
return calculateSize(key, value, metadata, null);
} | [
"long calculateSize(K key, V value, Metadata metadata, PrivateMetadata internalMetadata);",
"@Override\n public int getSizeInBytes() {\n int size = 12;\n // Key ID + each element size\n size +=\n ((4 + this.arrLen * 4) * this.getKVMap()\n .size());\n return size;\n }",
"private static ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a Company element for use in the companies XML file | private static Element genComElem(String name, Document doc) {
Element eRoot = doc.createElement("Company");
Element eName = doc.createElement("Name");
eName.appendChild(doc.createTextNode(name));
eRoot.appendChild(eName);
return eRoot;
} | [
"void createCompany(Company company);",
"private void saveCompany() {\n try {\n XmlHeader defaultXmlHeader = null;\n UjoManagerXML.getInstance().saveXML(dataFile, company, defaultXmlHeader, \"Save company\");\n } catch (IOException | RuntimeException | OutOfMemoryError e) {\n e.printStackTrac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field667' field. | public void setField667(java.lang.CharSequence value) {
this.field667 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField667(java.lang.CharSequence value) {\n validate(fields()[667], value);\n this.field667 = value;\n fieldSetFlags()[667] = true;\n return this; \n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField668(java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
api for create a new student details | @PostMapping("student-create")
public String createStudentDetails(@RequestBody Student student) throws SQLException {
return studentSerivce.createStudentDetails(student);
} | [
"@PostMapping(\"/students\")\r\n\t@ApiOperation(value = \"create new students\",response = Student.class)\r\n\tpublic Student createStud(@RequestBody Student student) {\r\n\t\treturn service.createNewStudent(student);\r\n\t}",
"Student createStudent();",
"@RequestMapping(\"students/create\")\r\n\t// Uses query ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Empty temporary tables; and check if they exist. | public static boolean emptyTempTables() {
ArrayList temp_tables = new ArrayList();
// Since the mrblock depends on mrfile it actually
// could be skipped but this way the program will also
// check if the tables exist and give an error back if any doesn't.
temp_tables.add( "mrfil... | [
"public void deleteTempTables();",
"private void cleanDB() {\n\t\tlog.info(\"<------------- Cleaning up DB tables ------------->\");\n\t\tfor (int i = 1; i <= ProgramConstants.TEMP_TABLES; i++) {\n\t\t\ttry {\n\t\t\t\tobjDAO.dropTempTable(ProgramConstants.DROP_TEMP_TABLE + i, null);\n\t\t\t} catch (Exception e) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "DSTSavings" element | boolean isSetDSTSavings(); | [
"public boolean isSetSd() {\n return this.sd != null;\n }",
"private boolean isDiscount(){\n Elements elemDiscount = this.doc.select(\"#regularprice_savings\");\n return elemDiscount.size() > 0;\n }",
"public boolean isSetSp3D()\n {\n synchronized (monitor())\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
place taker into order book | private void placeTakerOrder(Order exchangeOrder,
OrderBook takerOrder,
OrderBookList takerOrderBookListService,
int matchFlag,
List<MatchDetailItem> matchResultItemList) {
takerOr... | [
"public void placeOrder(TradeOrder order)\r\n {\r\n brokerage.placeOrder(order);\r\n }",
"@Step(\"Place an order\")\r\n\tpublic void placeOrder() {\r\n\t\tscrollAndSearchElement(driver, placeOrder, 15, Direction.UP, 15).click();\r\n\t}",
"void placeStake(int stake, int customerId, int betOfferId);"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |