query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Getter of the property atikSuTuru | public Integer getAtikSuTuru() {
return atikSuTuru;
} | [
"public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }",
"public Integer getIcmeSuTuru() {\r\n\t\treturn icmeSuTuru;\r\n\t}",
"public int getArmadura(){return armadura;}",
"public int getTahunLahir() {\n return tahunLahir;\r\n }",
"public int get_puntuacio(){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save this portfolio as a XML file. | void savePortfolio(String filename); | [
"private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(sco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set organisator to events and update ui | public void setOrganisator(MyUser organisator) {
if (createdEvents != null) {
for (int i = 0; i < createdEvents.size(); i++) {
createdEvents.get(i).setOrganisator(organisator);
}
adapderEventCard.notifyDataSetChanged();
}
} | [
"private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}",
"private void updateEvents() {\n eventListModel.clear();\n for (Event event: world.getEvents()) {\n eventListModel.addElement(event);\n }\n updateTable();\n }",
"public void updateEvents(){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form RepositoryPanel | public RepositoryPanel() {
initComponents();
} | [
"private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }",
"public JPanel createNewVersionPanel()\n\t{\n\t\t// Create and configure JPanels\n\t\tnewVersionPanel = new JPanel();\n\t\tnewVersionPanel.setLayout(new BoxLayout(newVersionPanel, BoxLayout.PAGE_AXIS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inicia o poder um do computador | private void usarPoderUmComputador() {
if (!poderUm) {
inserirDanoHabilidadeComputador(danoHabilidadeUmComputador);
iniciarEsperaPoderUmComputador();
}
} | [
"private void usarPoderDoisComputador() {\n if (!poderDois) {\r\n inserirDanoHabilidadeComputador(danoHabilidadeDoisComputador);\r\n iniciarEsperaPoderDoisComputador();\r\n\r\n }\r\n }",
"private void usarPoderTresComputador() {\n if (!poderTres) {\r\n inse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRulehasProperties" $ANTLR start "rulehasProperties" InternalJSchema.g:262:1: rulehasProperties : ( ( rule__HasProperties__PropertiesAssignment ) ) ; | public final void rulehasProperties() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalJSchema.g:266:2: ( ( ( rule__HasProperties__PropertiesAssignment ) ) )
// InternalJSchema.g:267:2: ( ( rule__HasProperties__PropertiesAssignment ) )
... | [
"public final void entryRulehasProperties() throws RecognitionException {\n try {\n // InternalJSchema.g:254:1: ( rulehasProperties EOF )\n // InternalJSchema.g:255:1: rulehasProperties EOF\n {\n before(grammarAccess.getHasPropertiesRule()); \n pushFoll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current value of the "numClientsWithCqs" stat. | public long getNumClientsWithCqs() {
return _stats.getLong(_numClientsWithCqsId);
} | [
"long getNumCqsOnClient() {\n return _stats.getLong(_numCqsOnClientId);\n }",
"void incClientsWithCqs() {\n _stats.incLong(_numClientsWithCqsId, 1);\n }",
"long getNumCqsActive() {\n return _stats.getLong(_numCqsActiveId);\n }",
"public int getCqCount() {\n return cqCount.get();\n }",
"long ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a scratch directory for test files created by the specified class. | public static File createClassScratchDirectory(Class<?> clazz) {
File dir = new File(generateDirectorynameFromClassname(clazz.getCanonicalName()));
dir.mkdirs();
return dir;
} | [
"public void create(String testRoot) {\n\t\tif (fw!=null) {return;}\t//Already created.\n\t\tassert testRoot!=null;\n\t\t\n\t\tFile f = CreateFileUtil.createOutFile(testRoot, \"JUnitAll\"); //default package\n\t\ttry {\n\t\t\tfw = new FileWriter(f);\n\t fw.write(junitAllHeader);\t//contents up until calls to te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the Compiler interface. Created: Mar 7, 2003 | public interface Compiler {
/**
* Compile the specified adjunct and generate a corresponding entry point.
* @param adjunctSource - The source for the adjunct.
* @param entryPointSpec - Information about the target: name, i/o policies, etc.
* @param targetModuleName - The name of the mo... | [
"protected abstract void compile(CompilerOutput code, SwitchData data);",
"public void activeCompilerChanged() { }",
"JavaCompiler javac();",
"public Compiler() {\n\t\tthis(DEFAULT_LAB);\n }",
"public void compileStarted() { }",
"public interface XpCompilerContext {\n\n JavaCompiler getJavaCompiler(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the backendHttpSettings property: Backend address pool settings of an application gateway. | public ApplicationGatewayBackendHttpSettings backendHttpSettings() {
return this.backendHttpSettings;
} | [
"public List<LBBackendAddressPoolResourceSettings> backendAddressPools() {\n return this.backendAddressPools;\n }",
"@Updatable\n public Set<BackendHttpConfiguration> getBackendHttpConfiguration() {\n if (backendHttpConfiguration == null) {\n backendHttpConfiguration = new HashSet<>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decode sequence step timeout in MCLKs from register value based on VL53L1X_decode_timeout() Note: the original function returned a uint32_t, but the return value is always stored in a uint16_t. | int decodeTimeout(int reg_val) {
// format: "(LSByte * 2^MSByte) + 1"
return (int) ((reg_val & 0x00FF) <<
(int) ((reg_val & 0xFF00) >> 8)) + 1;
} | [
"float getDecodedAudioTimeoutMs();",
"long getTimeoutDataCodeMillisecond();",
"com.google.protobuf.UInt32Value getTimeoutType();",
"com.google.protobuf.UInt32ValueOrBuilder getTimeoutTypeOrBuilder();",
"protected long encodeTimeout(int timeout_mclks) {\n // format: \"(LSByte * 2^MSByte) + 1\"\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Printer to display the .x source code | private static void displayXCode() {
if (dvm.getStartingLine() < 0){
System.out.println("===="+dvm.getCurrentFunction().toUpperCase()+"====");
}else{
for (int i = dvm.getStartingLine(); i <= dvm.getEndingLine(); i++) {
if (dvm.isLineABreakPoint(i)){
... | [
"public String print(){ return scg.Print.PrintM(this); }",
"public String printview() { return print(); }",
"public void printX()\r\n {\r\n System.out.println(_x);\r\n }",
"private static void printHeader()\n {\n println( \"--- VxC: Header ---------------------------------------------->\" ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checking if greatest candy can ith kid have. TC = O(n) and SC = O(n) | public static boolean[] greatestCandyCount(int[] candies, int extracandies) {
boolean[] result = new boolean[candies.length]; //Tc = O(1) , Sc = O(n)
int greaterCandy = greatestCandy(candies); // O(n) , O(1)
for (int i = 0; i < candies.length; i++) { // O(n) , O(1)
int canHaveCandi... | [
"public static int greatestCandy(int[] candies){ \n int greaterCandy = 0; //O(1) , O(1)\n\n for (int i = 0; i < candies.length; i++) { // O(n) , O(1)\n if(candies[i] > greaterCandy){ // O(1)\n greaterCandy = candies[i]; // O(1)\n } \n }\n\n return gr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstExpressionList__ExpressionsAssignment_2_1" $ANTLR start "rule__AstExpressionList__GeneratorsAssignment_3_1" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25606:1: rule__AstExpressionList__GeneratorsAssignment_3_1 : ( ruleAstGenerator ) ; | public final void rule__AstExpressionList__GeneratorsAssignment_3_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25610:1: ( ( ruleAstGenerato... | [
"public final void rule__AstExpressionList__GeneratorsAssignment_3_2_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25625:1: ( ( r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to set the preview bitmap. | public void setPreviewBitmap(String previewPath)
{
if (previewPath != null) {
// Set the preview image via Glide Library
Glide.with(ITFImageView.this)
.load(new File(previewPath)) // Uri of the picture
.into(ITFImageView.this);
}
} | [
"public void setPreview(Bitmap bitmap) {\n m_thumbnail.setImageBitmap(bitmap);\n crossFadeThumbnail();\n }",
"public void setPreview(CPointer<PreviewImage> preview) throws IOException\n\t{\n\t\tlong __address = ((preview == null) ? 0 : preview.getAddress());\n\t\tif ((__io__pointersiz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "STAR_ASSIGN" $ANTLR start "XOR" | public final void mXOR() throws RecognitionException {
try {
int _type = XOR;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/main/java/pl/ncdc/differentia/antlr/Java.g:87:5: ( '^' )
// src/main/java/pl/ncdc/differentia/antlr/Java.g:87:7: '^'
{
... | [
"private Node processXORStatement() {\n\t\treturn constructMultipleExpressionsWithOperator(new XOROperatorStrategy());\n\t}",
"BooleanExpression xor(Expression a, Expression b);",
"public final void mXOR_ASSIGN() throws RecognitionException {\n try {\n int _type = XOR_ASSIGN;\n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the objetivo of this actuacion. | @Override
public void setObjetivo(String objetivo) {
model.setObjetivo(objetivo);
} | [
"public abstract void setObject(EObject obj);",
"public void setObjectivoTreino(ObjectivoTreino objectivoTreino) {\n this.objectivoTreino = objectivoTreino;\n }",
"public void setacto()\n\t\t{\n\t\t\tacto=1;\n\t\tavance=0;\n\t\t}",
"public void setMotivo(String _motivo) {\n motivo = _motivo;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given a collection of onwire identifiers, this returns a set of the real identifiers (e.g., client IDs or durable queue IDs) | public Set getRealIDs(Collection integerIDs) {
if (integerIDs.size() == 0) {
return Collections.emptySet();
}
Set result = new HashSet(integerIDs.size());
Map<Long, Object> wids = wireIDs;
for (Object id : integerIDs) {
Object realID = wids.get(id);
if (realID != nu... | [
"Set<String> getIdentifiers();",
"Set<String> getIds();",
"@VisibleForTesting\n public Set getWireClientIds() {\n return clientMap == null ? Collections.emptySet()\n : Collections.unmodifiableSet(clientMap.wireIDs.keySet());\n }",
"@VisibleForTesting\n public Set getRealClientIds() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decrements the workers Unblocked for given blockId. | @Nonnull
public Long decrUnblocked(@Nonnull final String blockId) {
return current.get(blockId).unblocked().decrementAndGet();
} | [
"@Nonnull\n public Long incrUnblocked(@Nonnull final String blockId) {\n return current.get(blockId).unblocked().incrementAndGet();\n }",
"void onRemoveBlockByWorker(long blockId);",
"public long getUnblocked(final String blockId) {\n return current.get(blockId).unblocked().g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get next revision version. | private Integer getNextRevisionVersion(Integer curVersion) {
if (curVersion == null) {
return IntDef.INT_ONE;
}
return curVersion + IntDef.INT_ONE;
} | [
"public int getNextVersion() {\n return emlVersion + 1;\n }",
"public Version getNext(){\n\t\treturn next;\n\t}",
"public int nextVersion() {\n int version = 1;\n File symLink = new File(parent + \"/\" + symbolic);\n if (!symLink.exists()) {\n String absPath = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public void setKey(int newKey) Set node's key Complexity O(1) | public void setKey(int newKey) {
this.key = newKey;
} | [
"public void increaseKey(BinomialNode nodeToIncrease, int newKey) {\n if (newKey > nodeToIncrease.getKey()) {\n nodeToIncrease.setKey(newKey);\n BinomialNode iteratingNode = nodeToIncrease;\n\n while (iteratingNode.getParent() != null\n && iteratingNode.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Lower Heating Value feature. | protected void addLowerHeatingValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IfcFuelProperties_LowerHeatingValue_feature"),
getString("_U... | [
"protected void addLowerHeatingValueAsStringPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_IfcFuelProperties_LowerHeatin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get available watchdog by id | Watchdog getAvailableById(int watchdogId); | [
"Watchdog getByAvailable(int available);",
"List<Watchdog> getWatchdogByStatus(int status);",
"IDebuggerDescriptor findDebugger(String id);",
"public HWatch onWatch(String id)\r\n {\r\n if (!cache.initialized()) \r\n throw new IllegalStateException(Cache.NOT_INITIALIZED);\r\n\r\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column user_discuss.discuss_content | public String getDiscuss_content() {
return discuss_content;
} | [
"public Integer getDiscussContentId() {\n return discussContentId;\n }",
"public void setDiscuss_content(String discuss_content) {\n\t\tthis.discuss_content = discuss_content;\n\t}",
"public String getDiscussionContent() {\n\t\treturn discussionContent;\n\t}",
"public void setDiscussContentId(Intege... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test get new line number for clock. | @Test
// CHECKSTYLE:OFF
public void testGetNewLineNumber_clock() throws IOException {
// CHECKSTYLE:ON
File inputFile = new File("testdata/lines/clock-commit.diff");
LineCounter counter = new LineCounter(DiffFileParser.parse(inputFile));
//Test line right before first ad... | [
"@Test\n // CHECKSTYLE:OFF\n public void testGetNewLineNumber_ds2490() throws IOException {\n // CHECKSTYLE:ON\n File inputFile = new File(\"testdata/lines/ds2490-commit.diff\");\n LineCounter counter = new LineCounter(DiffFileParser.parse(inputFile));\n \n //Test line right... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates an ingredient arraylist given a string of all ingredients for a recipe | public void setIngArrayList(String allIngredients){
String[] split = allIngredients.split("\n");
ArrayList<Ingredient> temp = new ArrayList<>();
for(int i = 0; i < split.length; i++){
String[] split2 = split[i].split("\t");
Ingredient ingredient = new Ingredient();
if(split2.length==2 && !split2[1].equa... | [
"public void put_ingredients(String s){\n String lines[] = s.split(System.getProperty(\"line.separator\"));\n for(int i = 0; i < lines.length; i++){\n ingredients.add(lines[i]);\n }\n }",
"public List<Ingredient> toIngredient(List<String> ingredientsList) {\n\t\tList<Ingredient>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether this is the ancestor of sf. For a feature set this is true if sf is a descendant of this or equal. For SeqFeature(non FeatureSet) its true for equality. This replaces FeatureSetI.findFeature(sf) This needs to be renamed, there already is a contains from RangeI that means something totally different, having 2 di... | public boolean isAncestorOf(SeqFeatureI sf); | [
"public boolean isAncestor(RMShape aShape) { return aShape==_parent || (_parent!=null && _parent.isAncestor(aShape)); }",
"protected boolean containsAncestorFor(Component component)\n\t{\n\t\tComponent cursor = component.getParent();\n\t\twhile (cursor != null)\n\t\t{\n\t\t\tif (markupIdToComponent.containsValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor to make a status Message object consider the parameters are swaped from default Message constructor, not a good approach but have to go with it. | public ChatMessage(boolean status, String message) {
super();
this.message = message;
this.isMine = false;
this.isStatusMessage = status;
} | [
"public StatusMessage(){\n\t}",
"private StatusMessage() {\n\n\t}",
"public PSStatusMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }",
"public ServerMessage(String message, String status) {\n this.message = message;\n this.status = status;\n }",
"public void setMessag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the restaurant with the given rowId | protected boolean deleteRestaurant(long rowId) {
return _database.delete(RESTAURANT_TABLE, COLUMN_ID + "=" + rowId, null) > 0;
} | [
"public boolean deleteHotel(long rowId) {\r\n\r\n return mDb.delete(DATABASE_TABLE, KEY_ROWID + \"=\" + rowId, null) > 0;\r\n }",
"@Override\n public Restaurant deleteRestaurant(Restaurant restaurant) {\n \t// Connecting to database\n \tConnection con = jdbcConnectionPool.takeOut();\n\n \t//... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads EXTH header and records. | public static Header read(DataInputStream is, Charset encoding) throws IOException {
Header header = new Header();
header.identifier = StreamHelper.readString(is, 4, StandardCharsets.US_ASCII); // EXTH
if (!"EXTH".equals(header.identifier)) {
throw new... | [
"private void readHeader(ByteBuffer dataBuffer) throws DatabaseException {\r\n\r\n\t\tdataBuffer.mark();\r\n\r\n\t\t/* Read the log entry header. */\r\n\t\tcurrentEntryTypeNum = dataBuffer.get();\r\n\r\n\t\t/*\r\n\t\t * Always validate the entry type, since this check is cheap. Throw a\r\n\t\t * DbChecksumException... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Now move the channel taken on the "clipboard" right after the checked channel in the list | public void moveChannelAfter() {
int curSeqno;
int newSeqno;
channelsManager.collectCheckedChannels();
curSeqno = channelRepository.findSeqno(channelsManager
.getTakenChannel());
newSeqno = channelRepository.findSeqno(channelsManager
.getCheckedChannels().get(0));
if (newSeqno < curSeqno) {
++ne... | [
"public void intendCopyChannelAfter() {\n\t\tList<Group> groups;\n\n\t\tchannelsManager.collectCheckedChannels();\n\t\tchannelsManager.setEditedChannel(new Channel(channelsManager\n\t\t\t\t.getTakenChannel()));\n\t\tchannelsManager.getEditedChannel().setId(null);\n\t\tchannelsManager.setEditedChannelSeqno(channelRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the machineID property. | public void setMachineID(int value) {
this.machineID = value;
} | [
"public void setMachineID(int machineID) {\r\n this.machineID = machineID;\r\n }",
"public void setMachineId(int machineId) {\n this.machineId = machineId;\n }",
"public void setMachineId(int machineId) {\n this.machineId = machineId;\n }",
"public void setMachineId(Integer machineId) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes Log Manager from logging.properties | public static void initializeLogManager() throws IOException {
LogManager.getLogManager().readConfiguration(new FileInputStream("./src/Resource/logging.properties"));
} | [
"void initializeLogging(String loggingProperties);",
"public static void initCalvinLogMgr() {\n\t\tlogMgr = new CalvinLogMgr(); \n\t}",
"private void init() {\r\n this.log = this.getLog(LOGGER_MAIN);\r\n\r\n if (!(this.log instanceof org.apache.commons.logging.impl.Log4JLogger)) {\r\n throw new Illeg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the beds filtering by facility. | List<Bed> findAllByFacility(Long id); | [
"public ResultSet getAllBeds() {\n sqlQuery = \"SELECT * FROM BEDS;\";\n try{\n preparedStmt = connection.prepareStatement(sqlQuery);\n resultSet = preparedStmt.executeQuery();\n }catch(SQLException e){}\n return resultSet;\n \n }",
"List<Bluray> getAll... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XAdditiveExpression__Group_1_0__0" $ANTLR start "rule__XAdditiveExpression__Group_1_0__0__Impl" ../org.xtext.mongobeans.ui/srcgen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6290:1: rule__XAdditiveExpression__Group_1_0__0__Impl : ( ( rule__XAdditiveExpression__Group_1_0_0... | public final void rule__XAdditiveExpression__Group_1_0__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6294:1: ( ( ( rule__XAdditive... | [
"public final void rule__XAdditiveExpression__Group_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:6283:1: ( rule__XAdditi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
we show all the animals in the database | public List<Animal> listAnimals() {
List<Animal> theAnimals = new ArrayList<Animal>();
int contador = 0;
try {
String sql = "SELECT * FROM animals ";
PreparedStatement prep = JDBCManager.c.prepareStatement(sql);
ResultSet rs = prep.executeQuery();
while (rs.next()) {
int id = rs.getInt("id... | [
"public List<Animals> findAllAnimalss();",
"public void displayAllAnimals() {\n for(Animal i : allAnimals) {\n displayAnimalDetails(i);\n }\n }",
"public List<Animal> retrieveAll();",
"public List<PetAnimal> getAllPetAnimal();",
"private void listAllAnimals() {\r\n\t\tSystem.out.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an expanded string with s duplicated count times | public static String expandString(int count, String s){
String ss = "";
for(int i=0; i<count; i++)
ss += s;
return ss;
} | [
"String concatNtimes(String a,int n);",
"static long repeatedString(String s, long n) {\n int strLen = s.length();\n long quotient = n/strLen;\n long remainder = n%strLen;\n\n long result = 0;\n long occurence = (long)countCharOccurences(s, strLen, 'a');\n // Improvement ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form PlayerPanel | public PlayerPanel() {
initComponents();
panel.initializeButtons(
new javax.swing.JButton[]{addPlayerButton, editPlayerButton, deletePlayerButton},
new javax.swing.JButton[]{cancelPlayerButton, savePlayerButton}
);
} | [
"public newPlayerUI() {\n initComponents();\n }",
"public void createNewPlayer()\r\n\t{\r\n\t\tCreateNewPlayer newPlayer = new CreateNewPlayer(stage);\r\n\t\tnewPlayer.show(game);\r\n\t}",
"public JPanel PlayerPanel(Player player){\r\n\r\n JPanel playerPanel = new JPanel();\r\n playerPan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
regular data factory for names and descriptions of available calendars | @DataProvider
public static Object[][] data_of_calendars() {
return new Chronology[][]{
/* J2ObjC removed: Only "gregorian" and "julian" calendars are supported.
{HijrahChronology.INSTANCE}, */
{IsoChronology.INSTANCE}
/* J2ObjC removed: Only "... | [
"private List<IEntry> buildCalendarView(){\n\t\tList<IEntry> items = new ArrayList<IEntry>();\n\t\tfor(Calendar calendar : _arrayList){\n\t\t\titems.add(new HeaderEntry(calendar.getDate()));\n\t\t\t_uris.add(\"\");\n\t\t\tfor(CalendarEntry entrie : calendar.getEntries()){\n\t\t\t\tfor(EpisodeSynopse synopse : entri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a char to this SimpleMessageObject. | public void addChar(String name, char value) {
CHARS.add(new SimpleMessageObjectCharItem(name, value));
} | [
"public Message addChar(char c)\n\t{\n\t\tincreaseBuffer(2);\n\t\tbuffer.putChar(c);\n\t\treturn(this);\n\t}",
"public void addChar(char ch){\n\t\tvalue.append(ch);\n\t}",
"public void addCharacter(Character chr) {\n chars.add(chr);\n }",
"public void addChar(char keyChar) {\n this.setValue(t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load Format And Resolutions | private FormatAndResolutions loadFormatResolutions() {
FormatAndResolutions formatResolutionJson = new FormatAndResolutions();
formatResolutionJson.setIMAGE_FORMAT("");
formatResolutionJson.setSTILL_CAPTURE("Disable");
formatResolutionJson.setSUPPORTED_IN_FS("Disable");
formatResolutionJson.setSUPPORTED_IN_HS... | [
"private PSDisplayFormat loadDisplayFormat(String name)\n {\n List<IPSCatalogSummary> results = findDisplayFormats(name, null);\n for (IPSCatalogSummary summary : results)\n {\n if (summary.getName().equalsIgnoreCase(name))\n {\n return loadDisplayFormat(summary.getGUID()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for rfidTagNum instance. Preconditions: ItemInfo object must be instantiated. | public String getRfidTagNum() {
return rfidTagNum;
} | [
"public int getTagNum() {\n return Integer.parseInt(getTag());\n }",
"public final int\n getTagNumber() { return tagNumber_; }",
"public String getRfidTagValue(){\n\t\treturn rfidTagValue;\n\t}",
"public Integer getTagId() {\n return tagId;\n }",
"public Integer getItemNo() {\n\t\treturn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__QualifiedName__Group_1__1__Impl" $ANTLR start "rule__ConstantDefinition__Group__0" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4640:1: rule__ConstantDefinition__Group__0 : rule__ConstantDefinition__Group__0__Impl... | public final void rule__ConstantDefinition__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4644:1: (... | [
"public final void ruleConstantDefinition() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:804:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "DeliveryDate" element | boolean isSetDeliveryDate(); | [
"boolean hasInvoiceDate();",
"public boolean isSetDistDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DISTDATE$8) != 0;\n }\n }",
"boolean isSetArrivedondate();",
"boolean isNilOrderDate();",
"public boolean i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return BeanConverter based on format request parameter. | protected BeanConverter getConverterForFormat(String format) {
return ATOM_FORMAT.equals(format) ? atomConverter : XML_FORMAT.equals(format) ? xmlConverter :
jsonConverter;
} | [
"public BeanConverter getConverterForRequest(@Nullable String contentType, String format) {\n if (StringUtils.isNotBlank(contentType)) {\n return getConverterForContentType(contentType);\n } else {\n return getConverterForFormat(format);\n }\n }",
"@Bean\n public ConversionBean converter(){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies the listeners that the locale selection has changed. | private void fireUpdateLocale(Locale pLocale) {
for (ILocaleListener listener : mListeners) {
listener.selectLocale(pLocale);
}
} | [
"protected void localeChanged() {\r\n updateFormatters();\r\n firstDisplayedDayChanged();\r\n }",
"public static void localeChanged() {\r\n\t\tI18n.setLocale(PropertiesManager.getLocale( ));\r\n\t\tPluginManager.setLocale(I18n.getLocale( ));\r\n\t\tfireLocaleChangedEvent(new LocaleChangedEvent(Ap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check age when select to team | @Test
void testCheckAge(){
ArrayList<AnimalStarWars> list = game.initListAnimals();
ArrayList<AnimalStarWars> listSelected = game.selectTeam(list);
listSelected.forEach(e ->{
assertTrue(e.getAge() >=18, "age of player should be older than 18");
});
} | [
"public boolean checkAge() {\n Date date = new Date();\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy.MM.dd\");\n String currentDate = df.format(date);\n String driverDate = localPerspectiveDriver.getBirthday().toString();\n String[] currentDateArray = currentDate.split(\"\\\\.\");\n String[]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as attribute value for INTERFACE_SOURCE_CODE using the alias name InterfaceSourceCode. | public void setInterfaceSourceCode(String value) {
setAttributeInternal(INTERFACESOURCECODE, value);
} | [
"public String getInterfaceSourceCode() {\n return (String) getAttributeInternal(INTERFACESOURCECODE);\n }",
"public void setSource(ItemSpecificSourceCodeType source) {\n\t this.source = source;\n\t}",
"public void setCode(String code);",
"public void setIsinCode(java.lang.CharSequence value) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes the input string and returns a list of size size with only the input string in it. | public static List<String> createStringList(String input, int size) {
ArrayList<String> out = new ArrayList<String>();
for (int i=0; i<size; i++) {
out.add(input);
}
return out;
} | [
"int getSize(String literal);",
"public static String[] splitIntoLengths(String str, int size) {\r\n\t\tif (size <= 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"Length must be greater than zero.\");\r\n\t\t}\r\n\r\n\t\tif (str != null) {\r\n\t\t\tint len = str.length();\r\n\t\t\tint times = len / size;\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the authenticator for this packet. | public Authenticator getAuthenticator() {
return authenticator;
} | [
"public Authenticator authenticator() {\n return authenticator;\n }",
"public AuthenticatorHandler getAuthenticatorHandler() {\r\n return authenticatorHandler;\r\n }",
"public IUserAuthenticator getAuthenticator() {\n return auth;\n }",
"OSecurityAuthenticator getPrimaryAuthenticator()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clean input value to rely on USascii character as much as possible. | protected String cleanInputValue(String value) {
return StringUtils.hasText(value) ? Normalizer.normalize(value, Normalizer.Form.NFKD).replaceAll("\\p{M}", "")
: value;
} | [
"public static String stripNonASCII(String input) {\r\n\r\n if (Utils.isEmpty(input)) {\r\n return \"\";\r\n }\r\n\r\n StringBuilder buffer = new StringBuilder(input.length());\r\n\r\n char[] chars = input.toCharArray();\r\n for (int i = 0; i < chars.length; i++) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test out all the bean's properties | protected void doTestProperties(Object bean, String[] propertyNames) throws ReflectionException, Exception, InstantiationException, IllegalAccessException {
for (int j=0; j<propertyNames.length; j++) {
String name = propertyNames[j];
Class type = getBeanReflector().getType(bean, name);
// if the property... | [
"@Test\r\n public void testGetAllProperties() throws Exception {\r\n System.out.println(\"getAllProperties\");\r\n Map result = instance.getAllProperties();\r\n assertNotNull(result);\r\n }",
"private void properties() throws Exception {\n \n ComponentBean base = configBean.getC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /reportparameters : get all the reportParameters. | @GetMapping("/report-parameters")
@Timed
public ResponseEntity<List<ReportParameters>> getAllReportParameters(
@ApiParam Pageable pageable) {
log.debug("REST request to get a page of ReportParameters");
Page<ReportParameters> page = reportParametersRepository
.findAll(pageable);
HttpHeaders headers = Pag... | [
"@GetMapping(\"/report-parameters/{id}\")\n\t@Timed\n\tpublic ResponseEntity<ReportParameters> getReportParameters(\n\t\t\t@PathVariable Long id) {\n\t\tlog.debug(\"REST request to get ReportParameters : {}\", id);\n\t\tReportParameters reportParameters = reportParametersRepository\n\t\t\t\t.findOne(id);\n\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Look for and discard field delimiter. | protected void readFieldDelim(java.lang.String s) throws java.io.IOException {
readExpected(s);
} | [
"public String getFieldDelimiter()\n {\n return this.fieldDelimiter;\n }",
"public String getFieldSeparatorRegex()\n\t{\n\t\treturn fieldSeparatorRegex;\n\t}",
"public void setRecordDelimiter(String delim)\n {\n this.recordDelimiter = delim;\n }",
"public abstract char getCustomDelimiter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the Membership BO | @Test
public void TestMembership() throws Exception {
Membership membership1 = BusinessObjectDAO.getInstance().create("Membership", "membership7");
membership1.setCcnumber("123456789");
Calendar c2 = Calendar.getInstance();
membership1.setCustomerid("cust1");
membership1.save();... | [
"@Test\n public void testGetMembershipByUID_Found() {\n Membership membership = repo.getMembershipByUID(1L);\n assertNotNull(\"Ensure we found the membership.\", membership);\n }",
"@Test\n public void testGetMemberships_Active_Found() {\n List<Membership> memberships = repo.getMemberships(Status.ACTI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column T_JS_XZXK.XQ | public void setXq(String xq) {
this.xq = xq;
} | [
"public void setJx(String jx) {\n this.jx = jx;\n }",
"public void setJP_BankDataCustomerCode1 (String JP_BankDataCustomerCode1);",
"public void setQQ(java.lang.String QQ) {\n this.QQ = QQ;\n }",
"public void setSfyXzxk(Integer sfyXzxk) {\r\n this.sfyXzxk = sfyXzxk;\r\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create new communication thread and perform startup initialization | public static void initCommunicationClientThread(){
new CommunicationClientThread();
} | [
"public void create() {\n\t\t// TODO Auto-generated method stub\n\t\tCommunicationThreads ServerThread = new CommunicationThreads(2341);\n\n\t\tServerThread.start();\n\n\t}",
"void init() {\n try {\n // Start the send and receive threads and exit\n //scheduler.scheduleThread(new Thread(new UDPTranspo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to replicate PHP nl2br | public static String nl2br(String text) {return text.replaceAll("\n","<br />");} | [
"public static String nlToBr(@Nullable String input) {\n if (input == null) {\n return \"\";\n }\n\n try {\n List<String> lines = CharStreams.readLines(new StringReader(input));\n return Joiner.on(\"<br/>\").join(Iterables.transform(lines, ESCAPE_XML));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a device query Delete a device query. | @DELETE("v3/device-queries/{query_id}/")
Call<Void> deviceQueryDestroy(@retrofit2.http.Path(value = "query_id", encoded = true) String queryId); | [
"DeleteQuery<T, K> delete();",
"public CompletableFuture<DeleteByQueryResponse> deleteByQuery(DeleteByQueryRequest request) throws IOException {\n\t\treturn this.transport.performRequestAsync(request, DeleteByQueryRequest.ENDPOINT, this.requestOptions);\n\t}",
"@DELETE\n @Path(\"/query/{queryName}\")\n public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BlockStatement__Group__3__Impl" $ANTLR start "rule__NewProcessStatement__Group__0" InternalDsl.g:28703:1: rule__NewProcessStatement__Group__0 : rule__NewProcessStatement__Group__0__Impl rule__NewProcessStatement__Group__1 ; | public final void rule__NewProcessStatement__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:28707:1: ( rule__NewProcessStatement__Group__0__Impl rule__NewProcessStatement__Group__1 )
// InternalDsl.g:28708:2: rule__Ne... | [
"public final void ruleNewProcessStatement() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:3942:2: ( ( ( rule__NewProcessStatement__Group__0 ) ) )\n // InternalDsl.g:3943:2: ( ( rule__NewProcessStatement__Group__0 ) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
event handler called when createJButton is pressed | public void actionPerformed( ActionEvent event )
{
createJButtonActionPerformed( event );
} | [
"private void btnCreateActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void initCreateDeckBtn() {\n createBtn = new Button((editWidth - 310) / 2, 400, \"CREATE NEW DECK\", MasterGUI.green, titleField.getWidth(), titleField.getHeight());\n createBtn.setFont(MasterGUI.poppinsFont);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if given case id is a tumor case id. | @Override
public boolean isTumorCaseID(String caseID) {
for (Pattern pattern : patterns) {
if (pattern.matcher(caseID).matches()) {
return true;
}
}
// outta here
return false;
} | [
"boolean validateId(T id);",
"public static boolean isGroupType(int id) {\n return isID(id) && !isGroupID(id) && id != NULL_ID;\n }",
"private boolean checkID(int id) {\n for (ServerThread serverThread:serverThreadList) {\n if (serverThread.getClientID() == id) return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a db_mall.t_customer_action_logs table reference | public TCustomerActionLogs() {
this(DSL.name("t_customer_action_logs"), null);
} | [
"LogAction createLogAction();",
"public TCustomerActionLogs(Name alias) {\n this(alias, T_CUSTOMER_ACTION_LOGS);\n }",
"public TCustomerActionLogs(String alias) {\n this(DSL.name(alias), T_CUSTOMER_ACTION_LOGS);\n }",
"private TicketLog createLog() throws SQLException {\n\t\t\t\t\treturn n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests the system recognizes a legal operation and returns the expected result | @Test
public void testGoodCommand1() {
String command = "add 1 5";
try {
Assert.assertEquals("Failed the expected result is 6", (Double)operator.parseCommandAndGetResult(command),(Double)6.0);
} catch (Exception e) {
fail("Failed to execute addition operation");
}
} | [
"@Test(expected = ImpossibleAction.class)\n public void testGetOperation() throws Exception {\n TreeElement digit = new Digit(valueInt);\n digit.getOperation();\n }",
"@Test\n public void testOperation() {\n System.out.println(\"operation\");\n EsoLangParser instance = null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a genome segment by ordinal index. | public static GenomeSegment instance(int index) {
return segmentList.get(index);
} | [
"public String getSegment(int index) {\n return segments[index];\n }",
"public Segment getSegment(int index) {\n\t\treturn mSegmentList.get(index);\n\t}",
"public Segment getSegment(int index) {\n return null;\n }",
"AssignmentPathSegment getSegment(int index);",
"public String get(int index) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new instance of a block's tile entity class. Called on placing the block. | public TileEntity createNewTileEntity(World par1World)
{
return new TileEntityDropper();
} | [
"public TileEntity getBlockEntity()\n {\n return new TileEntityMobSpawner();\n }",
"@Override\n\tpublic TileEntity createNewTileEntity(World world) {\n \treturn new TileEntityStove();\n\t}",
"public RenderableBlock createNewInstance(){\n return BlockUtilities.cloneBlock(Block.getBlock(sup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Ganzzahlenliteral Dezimalliteral Ziffern von 0 9 | public static void main(String[] args) {
int numberA = 42;
System.out.println(numberA); // Ausgabe: 42
// Oktalliteral - Prefix 0; Ziffern von 0 - 7
numberA = 071;
System.out.println(numberA); // Ausgabe: 57 (Rechnung: 7 * 8^1 + 1 * 8^0)
// Hexaliteral - Prefix 0x; Ziff... | [
"java.lang.String getS9();",
"StringScrabble toStringSc();",
"String getRune_lit();",
"public RomanNumberLiteral forLiteral();",
"String getLiteral();",
"@Test\r\n\tpublic void testInvalid04() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid04\");\r\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to calculate extra discounts for 5/3 sets | public double checkForExtraDiscounts(Map<Integer, Integer> subsetCounts) {
double discount = 0.00;
// count of how many sets of 5 and 3 there are
int fiveCount = 0;
int threeCount = 0;
for (Map.Entry<Integer, Integer> entry : subsetCounts.entrySet()) {
if (entry.get... | [
"public BigDecimal getDiscount() {\r\n\t\tArrayList<Item> smallPizza = new ArrayList<Item>();\r\n\t\tArrayList<Item> mediumPizza = new ArrayList<Item>();\r\n\t\tArrayList<Item> largePizza = new ArrayList<Item>();\r\n\t\tArrayList<Item> sides = new ArrayList<Item>();\r\n\t\tArrayList<Item> drinks = new ArrayList<Ite... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleXListLiteral" $ANTLR start "entryRuleXClosure" ../com.euclideanspace.pbase/srcgen/com/euclideanspace/pbase/parser/antlr/internal/InternalTutorial.g:3516:1: entryRuleXClosure returns [EObject current=null] : iv_ruleXClosure= ruleXClosure EOF ; | public final EObject entryRuleXClosure() throws RecognitionException {
EObject current = null;
EObject iv_ruleXClosure = null;
HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_SL_COMMENT", "RULE_WS");
try {
// ../com.e... | [
"public final EObject entryRuleXClosure() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXClosure = null;\n\n\n try {\n // ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:2402:2: (iv_ruleXClosure= ruleXClosure E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when the Stop Service Button has been clicked. It stops the AlarmManager. In MainActivty we get the result. | public void onClickStopStartedService(View view){
//Set the Intent
Intent intent = new Intent(this, CheckBalanceIntentService.class);
intent.setAction(ACTION_CHECK);
PendingIntent pintent = PendingIntent.getService(this, 1234, intent, PendingIntent.FLAG_UPDATE_CURRENT);
//Cancle ... | [
"@Override\n protected void onStop() {\n TodoAlarmBroadcastReceiver todoAlarm = new TodoAlarmBroadcastReceiver();\n todoAlarm.setupAlarm(this);\n\n super.onStop();\n }",
"void stopService();",
"private void stopService() {\n\t\tIntent service = new Intent(getApplicationContext(),\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
deletes an existing developer | @RequestMapping(method = RequestMethod.DELETE, value = "/developers/{id}")
public String deleteDeveloper(@PathVariable String id) {
developerService.deleteDeveloper(id);
return ("Developer is deleted successfully");
} | [
"void delete(int developerId)\r\n\t\t\tthrows SQLException;",
"public void deleteDepartmentByDeptNo(int dept_no);",
"public void delete(CompleteInfo compInfo);",
"public void deleteUser(User userToDelete) throws Exception;",
"@Test\r\n public void testDelete() throws Exception {\r\n bank.removePer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create messages that will be passed to and from the specified factor. This method should return an Object array with two elements, the first being the newly created input message and the second being the newly created output message. | public Object [] createMessages(ISolverFactor factor); | [
"public @Nullable Object [] createMessages(ISolverFactor factor);",
"public List<Integer> createMessage() {\r\n\t\tfor (int i = 0; i < messageNumber; i++) {\r\n\t\t\tint num = (int) (Math.random() * (10000000 - 10000 + 1) + 10000);\r\n\t\t\tmessage.add(num);\r\n\t\t}\r\n\t\treturn message;\r\n\t}",
"FeedbackMes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
(Highcharts, Highstock, Highmaps) The button that appears after a selection zoom, allowing the user to reset zoom. | @JSProperty("resetZoomButton")
@Nullable
ChartResetZoomButtonOptions getResetZoomButton(); | [
"@JSProperty(\"resetZoomButton\")\n void setResetZoomButton(ChartResetZoomButtonOptions value);",
"@Override\n\tpublic void onResetZoomButtonPressed() {\n\t\tc1 = new ComplexNumber(-1.7, -1.1);\n\t\tc2 = new ComplexNumber(0.5, 1.1);\n\t\trenderImage();\n\t}",
"public void changeZoom();",
"private JButton get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the in stream. | public void setInStream(InStrategy s){
if(s==null) throw new MVError("Cannot set inStream to null");
else inStream = s;
} | [
"public void setInStream(InputStream is) throws IOException {\n\n }",
"void setInputStream(InputStream in);",
"protected void setLocStream(ObjectInputStream in) {\n locStream = in;\n }",
"synchronized void setOutputStream(OutputStream out) {\r\n\t\t\tif (!closed) {\r\n\t\t\t\tthis.out = out;\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method creates a swarm around a probe | private ArrayList<SpaceProbe> createSwarm(SpaceProbe probe, double swarmspeed) {
ArrayList<SpaceProbe> probesList = new ArrayList<SpaceProbe>();
for (int x = -1; x <= 1; x++) {
for (int y = -1; y <= 1; y++) {
for (int z = -1; z <= 1; z++) {
probesList.add... | [
"Swarm createSwarm();",
"public void updateSwarm();",
"private void newInstance() {\n RunInstancesRequest runInstancesRequest =\n new RunInstancesRequest()\n .withImageId(this.ami)\n .withInstanceType(InstanceType.T2Micro)\n .withMinCount(1)\n .withMaxCount(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether at least X elements in the given collection adhere to the associated condition. X is determined by the getCount() method call. | protected boolean checkCollection(Collection collection) {
int counter = 0;
for (Iterator iter = collection.iterator(); iter.hasNext();) {
if (getElementCondition().check(iter.next())) {
counter++;
}
}
return counter >= getCount();
} | [
"public AtLeastCollectionCondition(Condition elementCondition, int count) {\n super(elementCondition);\n Assert.isTrue(count >= 0, \"Count cannot be negative\");\n this.count = count;\n }",
"boolean verifyLimit(Collection result, int limit) {\n return limit > 0 && result.size() == limit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
linearizes and returns tail | private Node linearize2(Node node) {
if (node.children.size() == 0) {
return node;
}
Node ltail = linearize2(node.children.get(node.children.size() - 1));
while (node.children.size() > 1) {
Node lr = node.children.remove(node.children.size() - 1);
Node sl = node.children.get(node.children.size() - 1);... | [
"public abstract ImcESEQ linear();",
"public final native LinearScale linear()/*-{\n\t\treturn this.linear();\n\t}-*/;",
"long getStartOfLastLinearBin();",
"int fill(long tailLength);",
"private static float linearInterpolate(float start, float end, int steps, int step) {\n float p = (float) step / s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the user role to a customer role | private void setRole() throws SQLException {
super.roleId = DatabaseHelperAdapter.getRoleIdByName("CUSTOMER");
} | [
"public void setCustRole(Byte custRole) {\n this.custRole = custRole;\n }",
"public void setRole(Role role);",
"public void setUserRole(UserRole userRole) {\n this.userRole = userRole;\n }",
"void setRole(String role);",
"public void setUserRole(Integer userRole) {\n this.userRole = use... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated method Setter of the CinemaRoom.seatsPlan attribute. | public void setSeatsPlan(final Media value)
{
setSeatsPlan( getSession().getSessionContext(), value );
} | [
"void setSeats(String seats) {\r\n this.seats = seats;\r\n }",
"public void setSeats(Short seats) {\n this.seats = seats;\n }",
"public void setSeats(int seats)\r\n {\r\n if(seats > 0)\r\n this.seats = seats;\r\n else\r\n throw new IllegalArgumentExcept... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/(int fno,String fname,int masterno,String mastername,int itemCode,String itemName) | public LoadRestItem(int fno,String fname,int masterno,String mastername,int itemCode,String itemName,double dUnitPrice,double dTaxPrice,
int dtaxClass,double mUnitPrice,double mTaxPrice,int mTaxClass,int currencyId,int subMenu){
this.familyNno = fno;
this.familyName = fname;
this.masterNo = mast... | [
"public ItemMaster getItem(String itemNo);",
"ItemFusion(String filename){\n BufferedReader reader;\n try{\n reader = new BufferedReader (new FileReader(filename));\n String line = reader.readLine();\n int StoreNr = 1;\n while (line != null){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of normalize method, of class Vec4f. 1) normalize(float[] dst, int dstIndex, float[] a, int aIndex) 2) normalize(float[] a, int aIndex 3) normalize(float[] dst, float[] a) 4) normalize(float[] a) | @Test
public void normalize() {
float[] dest = new float[10];
float[] a = new float[] {1.001f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f};
float len = (float) Math.sqrt(86.0);
float[] expect = new float[] {3.0f/len, 4.0f/len, 5.0f/len, 6.0f/len};
// 1)
Vec4f.normalize(dest, ... | [
"@Test\n void normalize() {\n Vector2f v2 = v.normalize();\n assertEquals (1.0, v2.length());\n assertEquals (3.0f / 5.0f, v2.getX());\n assertEquals (4.0f / 5.0f, v2.getY());\n }",
"public void normalize() {\r\n\t\tthis.set(Vector4.normalize(this));\r\n\t}",
"public void Norma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The boolean contains() returns true if the String v is in the RedBlackTree and false otherwise. It counts each comparison it makes in the variable compares. | public boolean contains(String v) {
compares = 0;
RedBlackNode target = root;
while (target != nil) {
compares++;
if(target.getData().equals(v)) {
return true;
}
else if (target.getData().compareTo(v) < 0) {
target = target.getRc();
}
else if (target.getData().compareTo(v) > 0) {
... | [
"@Test\n public void containsWorksOnStringsTest() throws Exception {\n\n assertThat(getNode(\"'bob' contains 'o'\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"'bob' contains 'b'\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"'bob' contains 'bo'\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get k good parses for the sentence. It is expected that the parses returned approximate the k best parses, but without any guarantee that the exact list of k best parses has been produced. If a class really provides k best parses functionality, it is reasonable to also return this output as the k good parses. | public List<ScoredObject<Tree>> getKGoodParses(int k); | [
"public interface KBestViterbiParser extends ViterbiParser {\r\n\r\n /** Get the exact k best parses for the sentence.\r\n *\r\n * @param k The number of best parses to return\r\n * @return The exact k best parses for the sentence, with\r\n * each accompanied by its score (typically a\r\n * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .Date start = 2; | Metadata.DateOrBuilder getStartOrBuilder(); | [
"Metadata.Date getStart();",
"public void setStart(Date date)\r\n\t{\r\n\t\tthis.start = date;\r\n\t}",
"public void setStart( Calendar start );",
"public Date getDateStartFunction();",
"void setStartDate(Date startDate);",
"String getDtstart();",
"public void setStartDate(java.util.Date value);",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the preference option for whether or not to index all source files or just those of the build components | public static void setIndexAllOption(boolean option) {
ProjectUIPlugin.setIndexAllOption(option);
} | [
"public static boolean getIndexAllOption() {\r\n\t\treturn ProjectUIPlugin.getIndexAllOption();\r\n\t}",
"public PathBuilder forReleaseIndexFile()\n {\n this.releaseIndexFile = true;\n return this;\n }",
"public static void setChangedFilesInProjectOption(int option) {\r\n\t\tProjectUIPlugin.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of guesses the player has remaining. | public int guessesLeft(){
return this.remainingGuesses;
} | [
"public int guessesLeft() {\n return guessesAvailable;\n }",
"public int guessesLeft() {\r\n return guessRemaining;\r\n }",
"public int getRemainingGuesses() {\n\t\treturn MAX_GUESSES - guessCounter;\n\t}",
"public int getGuessesLeft() {\r\n return (guessesAllowed - numWrongGuesses);\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Doesn't work perfectly, for it does not take sound into consideration. Example: "A university" is correct, because the 'u' in "university" is pronounced as a 'j'. This method thinks it is "an university". | public static String determineAnOrA(final String word) {
final char[] vowels = {'a', 'e', 'i', 'o', 'u', 'y'};
for (final char vowel : vowels)
if (word.charAt(0) == vowel)
return "an";
return "a";
} | [
"private boolean checkStudentName(String name){ \n\t\tboolean output = true;\n\t\twhile ((name.length() != 0) & (output)){\n\t\t\tchar c = name.charAt(0);\n\t\t\tif (((c >= 'a') & (c <= 'z')) || ((c >= 'A') & (c <= 'Z')) || (c == ' '))\n\t\t\t\toutput = true;\n\t\t\telse output = false;\n\t\t\tname = name.substring... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the weekStart value for this QuerySubCallScreenNoResultCallScreenNoInfo. | public void setWeekStart(java.lang.String weekStart) {
this.weekStart = weekStart;
} | [
"public void setWeekStartDay(java.lang.Integer weekStartDay) {\n this.weekStartDay = weekStartDay;\n }",
"public void setWeekStartDay(Day weekStartDay)\r\n {\r\n m_weekStartDay = weekStartDay;\r\n }",
"public void setWeek(int week) {\n mWeek = week;\n }",
"public void setWeek(Inte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks to see if a bucket is full by comparing it with an empty bucket | public boolean isBucketFull(byte[] hashIndex, int bucketOffset) {
boolean isFull = true;
byte[] bucketVal = new byte[BUCKET_VAL_SIZE];
byte[] emptyBucket = new byte[BUCKET_VAL_SIZE];
System.arraycopy(hashIndex, bucketOffset, bucketVal, 0, BUCKET_VAL_SIZE);
if (Arrays.equals(bucketVal, emptyBucket)) {
isFu... | [
"public boolean isFull(){\n return (this.capacity <= this.count());\n }",
"public boolean isFull() {\n return size == queue.length; \n }",
"public boolean isFull() {\n\t\treturn numEntries == bag.length;\n\t}",
"public synchronized boolean isFull(){\n\t\treturn size() == size;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the level of represented by the Enum SLevel | public SLevel getLevel(){
return this.level;
} | [
"public String getSlevel() {\n return slevel;\n }",
"public SecurityLevel getLevel(){\n\t\treturn slvl;\n\t}",
"java.lang.String getLevelNo();",
"long getLevel();",
"public String getLevel() {\n return getAttribute(ATTRIBUTE_LEVEL);\n }",
"SSIT.proto.Unetmgr.LevelInfo getLevelInfo();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the specified text listener to receive text events. | void addTextListener(TextListener l); | [
"public void attachTextListener(TextListener listener);",
"public synchronized void addTextListener(TextListener l) {\n if (l == null) {\n return;\n }\n textListener = AWTEventMulticaster.add(textListener, l);\n newEventsOnly = true;\n }",
"public void addAccessibleText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the position_directory persistence. | public Position_directoryPersistence getPosition_directoryPersistence() {
return position_directoryPersistence;
} | [
"alluxio.proto.journal.File.PersistDirectoryEntry getPersistDirectory();",
"public void setPosition_directoryPersistence(\n Position_directoryPersistence position_directoryPersistence) {\n this.position_directoryPersistence = position_directoryPersistence;\n }",
"public File getStoreDir();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to pad a binary to number to a specific length. Eg: padZeros("1001", 6) = "001001". | private String padZeros(String binary, int size) {
String outString = binary;
for (int i = 0; i < size - binary.length(); i++) {
outString = "0" + outString;
}
return outString;
} | [
"static public String padNumber(int number, int length)\n {\n return padString(\"\" + number, length, '0');\n }",
"private static String padWithZeros(int i, int len) {\r\n\t\tString s = Integer.toString(i);\r\n\t\tif (s.length() > len) {\r\n\t\t\treturn s.substring(0, len);\r\n\t\t}\r\n\t\telse if (s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
And that set bit is the last set bit of n | public static int getNoWithOneBitSet(int n) {
return n & ~(n - 1);
} | [
"static int countSetBits(int n)\r\n {\r\n int count = 0;\r\n while (n > 0) {\r\n count += n & 1;\r\n n >>= 1;\r\n }\r\n return count;\r\n }",
"static int countSetBits(int n)\n\t{\n\t\tint count = 0;\n\t\twhile (n!=0)\n\t\t{\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The most basic interface for the component providing the user with Suggestions from an ongoing Conversation | public interface SuggestionEngine {
} | [
"public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}",
"public interface SuggestionProcessor {\n /**\n * @param suggestion The suggestion to process.\n * @return W... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to give a tile a new row and col (moving the tile in the grid) | public void moveTile(int newRowIndex, int newColIndex){
rIndex = newRowIndex;
cIndex = newColIndex;
} | [
"static public Boolean slideTile(int row, int col, FloorTile newTile) {\r\n FloorTile oldTile1 = newTile;\r\n FloorTile oldTile2;\r\n boolean isNotFixed = true;\r\n if(row == 0 || row == board.length-1){//determine that the columns will be changed\r\n for (int i = 0; i < board... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks that a buffered doc op is wellformed. | private static void checkWellformedness(DocOp value) {
if (!DocOpValidator.isWellFormed(null, value)) {
// Check again, collecting violations this time.
ViolationCollector v = new ViolationCollector();
DocOpValidator.isWellFormed(v, value);
Preconditions.illegalState("Attempt to build ill-fo... | [
"public void checkFull()\n\t {\n\t \tif(elements == buf_size){\n\t\t\tSystem.out.println(\"Buffer full\");\n\t\t}\n\t }",
"private final boolean hasBufferedInputBytes() {\n return reading && (buffer.hasRemaining() || ungotc != -1);\n }",
"public boolean isDocControlled();",
"private final boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the bookmarks entries where groupId = &63; and folderId = &63; and status = &63;. | public static List<BookmarksEntry> findByG_F_S(long groupId, long folderId,
int status) {
return getPersistence().findByG_F_S(groupId, folderId, status);
} | [
"public java.util.List<BookmarksEntry> findByG_F_S(long groupId,\n\t\tlong folderId, int status);",
"public java.util.List<BookmarksEntry> findByG_F_NotS(long groupId,\n\t\tlong folderId, int status);",
"public java.util.List<BookmarksEntry> findByG_S(long groupId, int status);",
"public java.util.List<Bookma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Function: lessThan, less than operator for temperature regardless of scale Parameters: otherTemperature, a Temperature object Preconditions: otherTemperature is a valid Temperature object Returns: true if less than, false if not less than | public final boolean lessThan(final Temperature otherTemperature) {
switch (myScale) {
case 'C':
return myDegrees < otherTemperature.toCelsius().getDegrees();
case 'F':
return myDegrees < otherTemperature.toFahrenheit().getDegrees();
case 'K':
return myDegrees < otherTemperature.toKelvin()... | [
"public boolean lessThan(TemperatureClass otherTemp){\n\t\treturn(this.getTempInC() < otherTemp.getTempInC() ||\n\t\t\t\tthis.getTempInF() < otherTemp.getTempInF());}",
"public boolean greaterThan(TemperatureClass otherTemp){\n\t\treturn(this.getTempInC() > otherTemp.getTempInC() ||\n\t\t\t\tthis.getTempInF() > o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return id and names from city database using like operator. Caller to suffix % while passing parameter. example. findAutoSelectCityNames("In%"); | @Query("select new com.vpa.core.models.LabelValueBean(c.id,c.name) from City c where c.enable = 1 and c.name like :alphabets")
List<LabelValueBean> findAutoSelectCityNames(@Param("alphabets") String alphabets); | [
"List<City> findByNameIgnoringCase(String cityName);",
"public List<Mkab> getMkabsLikeCity(String string);",
"@Query(value = \"select * from account_details where name ILIKE concat('%',?1,'%')\"+\n \" or country ILIKE concat('%',?1,'%') or address ILIKE concat('%',?1,'%')\"+\n \" or state ILIKE co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |