query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
This method is essentially a constructor. It initializes the quiz screen Also, it obtains the day's current questions from the database and randomizes their order and creates sets up the first question | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_quiz);
questions = new Question[QUESTION_LIMIT];
gotQuestionRight = new boolean[QUESTION_LIMIT];
usersAnswer = new String[QUESTION_LIMIT];
... | [
"private void initQuestion() {\n // Hide Pictures birds and sound\n findViewById(R.id.imageView).setVisibility(View.INVISIBLE);\n findViewById(R.id.playButton).setVisibility(View.INVISIBLE);\n TextView answerresp = findViewById(R.id.answerTextView);\n answerresp.setText(\"\");\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test addScore and getScores methods | @Test
public void challengerTest2() {
Challenger challenger = new Challenger("name", "password", null); // intialize challenger object
ArrayList<Integer> expected = new ArrayList<>(); // intialize array of integers
// add scores to challenger
challenger.addScore(1);
c... | [
"@Test\n void addScore() {\n Model.getInstance().clearData();\n Model.getInstance().setUsernames(new ArrayList<>(List.of(\"testUsername1\",\"testUsername2\")));\n Model.getInstance().addScore(1500,0);\n assertEquals(1500, Model.getInstance().getScore(0));\n Model.getInstance().... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of file views. SPECIFIED IN: javax.swing.table.TableModel | public int getChildCount()
{
return getViewCount();
} | [
"public int getCount() {\r\n return files.length;\r\n }",
"public int getColumnCount() {\n\treturn treeTableModel.getColumnCount();\n }",
"public int getRowCount() {\n if (modelView == null)\n return 0;\n\n return modelView.size();\n }",
"public int getViewRowCount() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of indexOf method, of class FixedArrayList. | @Test
public void testIndexOf() {
assertTrue( baseList.indexOf( "String" ) == 1 );
assertTrue( baseList.indexOf( "Other" ) == 4 );
assertTrue( baseList.indexOf( "non-value" ) == -1 );
assertTrue( baseList.indexOf( null ) > -1 );
assertFalse( emptyList.indexOf( null ) > -1 );... | [
"protected int base_indexOf(Object elem)\r\n {\r\n return list.indexOf(elem);\r\n }",
"@Override\n\tpublic <T> int indexOf(T element) {\n\t\treturn 0;\n\t}",
"@Test\r\n\tpublic void testIndexOf() {\r\n\t\tlinkedList.add(\"1\");\r\n\t\tlinkedList.add(\"2\");\r\n\t\tlinkedList.add(\"3\");\r\n\t\tlinkedLi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the event set descriptors for this bean. | @Override
public java.beans.EventSetDescriptor[] getEventSetDescriptors() {
try {
java.beans.EventSetDescriptor aDescriptorList[] = {
commandEventSetDescriptor()
};
return aDescriptorList;
} catch (java.lang.Throwable exception) {
handleException(exception);
};
return null;
} | [
"public Set<D> getDescriptors() {\n return descriptors;\n }",
"public DebugEvent[] getEventSet() {\n return fEventSet;\n }",
"@Override\n\tpublic IPropertyDescriptor[] getPropertyDescriptors() {\n\t\treturn descriptors;\n\t}",
"public static HashSet<Event> getEvents() {\n return eve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the contact person of this vendor. | @Override
public void setContactPerson(java.lang.String contactPerson) {
_vendor.setContactPerson(contactPerson);
} | [
"public void setContact(localhost.MeetingBrokerServices.Contact contact) {\n this.contact = contact;\n }",
"public void setContact(com.idega.block.process.webservice.server.Contact contact) {\n this.contact = contact;\n }",
"public void setServiceContact(ServiceContact serviceContact);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the latitude property. | public void setLatitude(double value) {
this.latitude = value;
} | [
"public void setLatitude(double latitude) {\r\n this.latitude = latitude;\r\n }",
"private void setLatitude(float latitude) {\n this.latitude = latitude;\n }",
"public void setLatitude(double latitude) {\n\t\tmLat = latitude;\n\t}",
"public void setLatitude(final org.chartacaeli.model.Lati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_locations, menu);
return true;
} | [
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of a long property, or the default if the property has not been defined. | @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:59:48.768 -0500", hash_original_method = "4BF2AEC507B97708CFEE1BE095F3CD54", hash_generated_method = "518122D4AC009D946AD402F1A71E5C56")
public long getLong(String prop... | [
"public long getLongProperty(String name, long defaultValue) {\n String value = getProperty(name);\n if (value == null) return defaultValue;\n return Long.valueOf(value);\n }",
"public long getLong(String key, long defaultValue) {\n String value = getProperty(key);\n if (value != null) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by kamran on 10/27/15. | public interface Tab {
View getView();
boolean isSelected();
void setSelected(boolean selected);
CharSequence getTitle();
void setTitle(CharSequence title);
void setBackgroundColor(int color);
void setTitleColor(int color);
void setSelectionColor(int color);
} | [
"@Override\n public void extornar() {\n \n }",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n }",
"protected void method_5557() {}",
"@Override\n \tpublic void init() {\n \n \t}",
"protected void mo479... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check path resolution when secondary mode is not default and there is matching exclusion path. | public void testSecondaryNotDefaultMatchingExclusion() throws Exception {
mode = PRIMARY;
pathModes(F.t(PATTERN_NOT_MATCHES, PROXY), F.t(PATTERN_MATCHES, PROXY));
startUp();
assert secondary(PATH);
assert secondary(PATH);
} | [
"protected boolean isNeedCheckPath() {\n return false;\n }",
"boolean hasGlobalOptionsPath();",
"boolean hasPathTemplateMatch();",
"private boolean detectSubOptimalSettings() {\n if(ww.when.dayBetween(new AelfDate()) > 20) {\n return false;\n }\n\n // Always consider ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decrypts the argument string. | default String decrypt(String encryptedText) {
//Decrypt
byte[] decryptedText = this.decryptToByteArray(encryptedText);
//Convert the encrypted byte array to a string and return
return UTF8.getString(decryptedText);
} | [
"String decryptGenericString(String input);",
"String decrypt(String toDecode, String aad) throws EncryptionException;",
"String decrypt(String input, Encryption encryption, SecretKey key) throws CryptographyException, IOException;",
"public String Decrypt(String data) \n\t{\n\t\treturn aes(data, 'D').trim();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test la constante Moins de la classe Operation | @Test
public void testMoins() throws DivParZeroException {
o= Operation.MOINS;
boolean test=(o.eval(2,3)==1.0);
assertEquals(test,true);
} | [
"@Test public void operationBasicTest(){\n assertEquals(calculator.add(4,6),10);\n assertEquals(calculator.subtract(4,6),-2);\n assertEquals(calculator.multiplication(4,6),24);\n assertEquals(calculator.division(4,2),2);\n assertNotEquals(calculator.multiplication(2,2),6);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form ViewMedicineStock | public ViewMedicineStock() {
initComponents();
} | [
"public long createStock (ObjectStock stock) {\n long id;\n ContentValues values = new ContentValues();\n values.put(InventoryContract.StockEntry.KEY_QUANTITY, stock.getQuantity());\n values.put(InventoryContract.StockEntry.KEY_CONTROLLED, stock.isControlled());\n values.put(Inve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given that the insightType is aggregatedTable, Asserts that the actual cellValue matches with the expected one | public void aggregatedTable_assert_cellValue_isCorrect(String typeOrValue, int rowNumber, String cellValue) {
switch (typeOrValue.trim().toLowerCase()) {
case "type":
aggregatedTable_cellValue_link = By
.xpath("//tbody/tr[" + rowNumber + "]//a[contains(@class,'table__body-cell--aggregated')]");
break;
... | [
"@Test public void testGetAggregateColumnValues() {\n\t\ttry {\n\t\t\tdb.initConnection();\n\t\t\t\n\t\t\tassertEquals(testTableData.getAggregateColumnValue(\"playtennis\", testSchema.getColumn(inColumn), QUERY_TYPE.MIN).toString(), \"high\");\n\t\t\tassertEquals(testTableData.getAggregateColumnValue(\"playtennis\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table lt_AuthItem | int updateByPrimaryKeyWithBLOBs(AuthItemWithBLOBs record); | [
"NjUserZhimaAuth selectByPrimaryKey(String id);",
"@MyBatis\npublic interface AdminInfoMapperDao {\npublic AdminInfo findByAdminCodeAndPwd(AdminInfo adminInfo);\n}",
"SystemUserinfoMenuMapping selectByPrimaryKey(Long mappingId);",
"public interface UserMapper extends MyMapper<User> {\n\n @Select(\"SELECT u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Refines' containment reference. If the meaning of the 'Refines' containment reference isn't clear, there really should be more of a description here... | PathName2CS getRefines(); | [
"@Override\r\n\tpublic Rectangulo boundingBox() {\r\n\t\treturn this;\r\n\t}",
"public float getNeedleValue() {\n return mNeedleValue;\n }",
"public double getSweRefNorth() {\n\t\treturn 0;\r\n\t}",
"public UBounds getFullBoundsForContainment()\n {\n if (!previewFacet.isPreviewFor().isShowin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bytes blockHash = 2; | public Builder setBlockHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
blockHash_ = value;
onChanged();
return this;
} | [
"private static int initHash()\n/* */ {\n/* 1027 */ return -2128831035;\n/* */ }",
"com.google.protobuf.ByteString getRefBlockHash();",
"ByteArray avm_getTransactionHash();",
"public Block() {\r\n this.previousHash = \"1\";\r\n this.nonce = 0;\r\n this.timestamp = new Date().g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new wrapper for specified layers | public void addSurveyWrapper(final GSSurveyWrapper survey, final Integer... layers) {
this.dataFiles.putIfAbsent(survey, Arrays.asList(layers));
} | [
"void addLayer(AbstractLayer layer);",
"void addLayer(TiledMapTileLayer layer);",
"URI addLayer(String layerName);",
"public void addLayer(Layer layer) {\r\n\t\tlayers.add(layer);\r\n\t}",
"public void addLayer(int x){\n }",
"public void addLayer(Layer layer)\n \t{\n if (layersAllocationLocked)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and initializes components and spinners model. | private void createComponents(UserPreferences preferences,
final Home3DAttributesController controller) {
// Ground color and texture buttons bound to ground controller properties
this.groundColorRadioButton = new JRadioButton(SwingTools.getLocalizedLabelText(preferences,
... | [
"private void createUIComponents() {\n final SpinnerDateModel model = new SpinnerDateModel();\n mJSpinnerHour = new JSpinner(model);\n }",
"private void initSpinners(){\n childCountSpinner.setValueFactory(\n new SpinnerValueFactory.IntegerSpinnerValueFactory(1,13,5));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
path sensitive for extras | public PathSensitiveAnalyzer(AppModel appModel, Body b) {
this.b = b;
this.appModel = appModel;
this.sm = b.getMethod();
this.class_name = sm.getDeclaringClass().getName();
} | [
"private PathUtils() {}",
"private String preparePath() {\n String pathByComponent = tryAdaptTo(AemComponent.class)\n .map(AemComponent::path)\n .orElse(null);\n @SuppressWarnings(\"deprecation\") // \"name\" processing is for compatibility; will be removed in a version after 2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | [
"@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}",
"protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse respo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onTextChanged(CharSequence arg0, int arg1, int arg2,
int arg3) {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return StringUtils.normalizeSpace(toText(tokens).replace("\n", " ")); return StringUtils.normalizeSpace(toText(tokens)); | public static String normalizeText(List<LayoutToken> tokens) {
return toText(tokens);
} | [
"static Function<String, String> collapseWhitespace() {\n return (input) -> input.trim().replaceAll(\"\\\\s\\\\s+\", \" \");\n }",
"private String preprocess(String s)\n\t{\n\t\ts = s.replaceAll(\"\\t\", \" \");\n\t\t\n\t\treturn s;\n\t}",
"public void whiteSpaceTokenize(String text){\n WhitespaceTok... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleBooleanValue" $ANTLR start "ruleBooleanValue" InternalFPML.g:3895:1: ruleBooleanValue returns [EObject current=null] : ( () ( (lv_value_1_0= RULE_BOOLEAN ) ) ) ; | public final EObject ruleBooleanValue() throws RecognitionException {
EObject current = null;
Token lv_value_1_0=null;
enterRule();
try {
// InternalFPML.g:3901:2: ( ( () ( (lv_value_1_0= RULE_BOOLEAN ) ) ) )
// InternalFPML.g:3902:2: ( () ( (lv_value_1_0= RU... | [
"public final EObject entryRuleBooleanValue() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanValue = null;\n\n\n try {\n // InternalAedit.g:3616:53: (iv_ruleBooleanValue= ruleBooleanValue EOF )\n // InternalAedit.g:3617:2: iv_ruleBooleanV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines the source of the messages to be processed. | public void setChannel(ChannelActivity channel) {
this.channel = channel;
} | [
"public com.ghj.protocol.Msg.SysMsg.Module getSource() {\n com.ghj.protocol.Msg.SysMsg.Module result = com.ghj.protocol.Msg.SysMsg.Module.valueOf(source_);\n return result == null ? com.ghj.protocol.Msg.SysMsg.Module.UNRECOGNIZED : result;\n }",
"public String getnSource() {\n return nSo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Eliminate a candidate from an election | public Candidate eliminate(){
//Temp variables to store the least popular attributes
Candidate leastPopular = candidates.get(0);
int leastPopularVotes = candidates.get(0).getVotes();
int leastPopularIndex = 0;
//Loop through the candidates and find the least popular
for(i... | [
"@Override\n public void delete(Candidate candidate) {\n Database.getCandidateSet().remove(candidate);\n }",
"private void clearCandidate() {\n \n candidate_ = getDefaultInstance().getCandidate();\n }",
"Cluster removeElectionListener(EventListener<ElectionEvent> listener);",
"void e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Operation of incrementing/decrementing the counter. | public boolean incDecNPassAllowedToEnterCounter(boolean inc) {
synchronized (lockNPassAllowedToEnterCounter) {
if(inc) {
nPassAllowedToEnter++;
} else {
nPassAllowedToEnter--;
}
return nPassAllowedToEnter == SimulPar.N_PASS_PER_FLIG... | [
"public void increment() {}",
"private synchronized void increment() {\n\t\tcounter++;\n\t\t//atomicInteger.getAndIncrement();\n\t}",
"public static void incrementCounter() {\r\n\t\tcounter += 1;\r\n\t}",
"public void incr() {\r\n\t\tthis.value++;\r\n\t}",
"public synchronized void increment() {\n\t\tthis.c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
single value enum cannot be search by valueOf(String) | @Test(expected=IllegalArgumentException.class)
public void testValueofWithSingleValueEnum(){
SingleValueEnum.valueOf("red");
} | [
"String asEnumConstant();",
"@Test\n public void testValueOf() {\n System.out.println(\"valueOf\");\n String name = \"PSE\";\n PaymentTypeEnum result = PaymentTypeEnum.valueOf(name);\n assertNotNull(name);\n }",
"public void testInvalidEnum() {\n\t\tString example = \"fRONT_LEF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Go to edit profile view | @FXML
private void editProfileView() {
mainApplication.goToEditProfile();
} | [
"public void ClickEditProfile(View view){\n Dashboard.redirectActivity(this, EditProfile.class);\n }",
"@RequestMapping(value = \"editProfile\", method = RequestMethod.GET)\n public ModelAndView showEditProfilePage() {\n Authentication auth = SecurityContextHolder.getContext().getAuthenticatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets whether the message is a blank string, or a "ping" | public boolean isMessagePing(WebSocketFrame frame) {
return frame.getTextPayload().isEmpty();
} | [
"@Override\r\n\tpublic void handleTextMessage(WebSocketSession session, TextMessage message) {\n\t\t\r\n\t\tString datas = message.getPayload();\r\n\t\tif(\"ping\".equals(datas)){\r\n\t\t\t//心跳PING消息\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public boolean hasPing() {\n return payloadCase_ == 3;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string c2s_npcId = 4; | public Builder setC2SNpcId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
c2SNpcId_ = value;
onChanged();
return this;
} | [
"private String createGameID(String string) {\n\treturn null;\r\n}",
"public String getHC_AltID2();",
"void mo47714a(int i, String str, AbstractC7496c cVar);",
"int getNpcNumber();",
"public abstract String mo23549d0(C7150c cVar, C7173i iVar);",
"public String getIDstring()\n/* */ {\n/* 154 */ r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when fullscreen content is dismissed. | @Override
public void onAdDismissedFullScreenContent() {
Log.d("TAG", "The ad was dismissed.");
} | [
"@Override\n public void onAdDismissedFullScreenContent() {\n }",
"@Override\n public void onExitFullscreen(MediaView mediaView) {\n }",
"@Override\n public void onAdDismissedFullScreenContent() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The function save Save table data to the specified file. | public void save(File filename) throws IOException {
ObjectOutputStream objectOutputStream = null;
// create output stream with writer wrappers
try {
objectOutputStream = new ObjectOutputStream(new FileOutputStream(
filename));
objectOutputStream.write... | [
"public void save() {\r\n\t\tsave(Table.DIR);\r\n\t}",
"protected void save()\n {\n save(file);\n }",
"private void saveOnFile() {\n\t\tFile file = new File(\"save.dat\");\n\t\t// System.out.println(\"ELENCO UTENTI:\");\n\t\t// System.out.println(UserArchive.getIstance().all());\n\t\tDatabase dat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the reference of every document available (not only the indexed ones) for a specific site. This method gets the documents currently available in a site, not only the indexed ones. This method is most commonly used to reindex a site. | public Queue<String> getSiteDocumentsReferences(String siteId) {
// TODO: Replace by a lazy queuing system
Queue<String> references = new LinkedList<String>();
for (EntityContentProducer contentProducer : contentProducerFactory.getContentProducers()) {
Iterators.addAll(references, c... | [
"public void fetchSites() {\n Log.d(TAG, \"fetchSites: called\");\n FirebaseFirestore firestore = FirebaseFirestore.getInstance();\n FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()\n .setTimestampsInSnapshotsEnabled(true)\n .build();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This needs to be done because tests aren't isolated in Java | @After
public void unmockStripeResponseGetter() {
APIResource.setStripeResponseGetter(new LiveStripeResponseGetter());
} | [
"private void doTest() {\r\n\r\n\t}",
"private void testing() {\n\t}",
"@Test\n\tpublic void testFindHotNewses() {\n\t}",
"private void testingPurposes() {\n\t}",
"private static void FactoryWalkerTest() {\n\t}",
"public void testSchedbotFF() {\n\t}",
"@Test\r\n\tpublic void test() throws Exception {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .hadoop.yarn.LogAggregationContextProto log_aggregation_context = 14; | public org.apache.hadoop.yarn.proto.YarnProtos.LogAggregationContextProtoOrBuilder getLogAggregationContextOrBuilder() {
if (logAggregationContextBuilder_ != null) {
return logAggregationContextBuilder_.getMessageOrBuilder();
} else {
return logAggregationContext_;
}
} | [
"public ClusterLogAnalyticsApplicationLogs() {\n }",
"@Override\n\tpublic String getLogId() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void configure(JobConf conf) {\n\t\tTaskAttemptID atmpId = TaskAttemptID.forName(conf.get(\"mapred.task.id\"));\r\n\t\tLOG = new HDFSLogWritter(LogAddr + \"task\" + HD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert Centigrade to Fahrenheit | public static double toFahrenheit(double temperature) {
return 1.8*temperature+32.0;
} | [
"private static void convertToFahrenheit(double value) {\n // (0°C × 9/5) + 32 = 32°F\n System.out.println( (value * 9/5)+ 32);\n }",
"public static double fahrenheitToCelsius(double f) {\n\t\treturn ((f - 32) * 5 / 9);\n\t}",
"public static double fahrenheitToCelsius(double f) \n\t{\n\t double c =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
store default locale of the environment | @BeforeClass
public static void setUpClass() {
vmLocale = Locale.getDefault();
// set default locale to English just for the test of this class
Locale.setDefault(Locale.ENGLISH);
Map<String, String> formats = new HashMap<>(32);
formats.put("\\d{8}", "yyyyMMdd");
forma... | [
"static public String getDefaultLocale() {\n \treturn getProjectParam(\"default_locale\");\n }",
"@SuppressWarnings(\"deprecation\")\n public static final void setDefaultLocaleToIndonesia() {\n try {\n Locale locale = new Locale(\"in\");\n Locale.setDefault(locale);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test to see if start date is after end date | @Test(expected = IllegalArgumentException.class)
public static void testRequestBuild3() throws Exception
{
Driver driver = new Driver(1);
Date date = new Date();
Date date2 = date;
date2.setYear(1014);
request = new Request(date, date2, driver);
} | [
"private boolean dateIsBetween(DateTime rangeStartEx, DateTime rangeEndEx,\n DateTime date) {\n return date.isLaterThan(rangeStartEx) && date.isEarlierThan(rangeEndEx);\n }",
"public static boolean isStartDateBeforeEndDate(ZonedDateTime start, ZonedDateTime end) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Functionality to fetch Booking details of the resources for a date range and time interval : Method overloading | public Map<Object, List<Object>> getAvailabilityDayByResourceHtmlTable(Calendar startDate, Calendar endDate, Integer interval); | [
"@GET\n\t@Path(\"/retrievearticlesofperiod/{from}/{to}\")\n\tpublic Response retrieveArticlesOfGivenPeriod(@PathParam(\"from\") String fromDate,@PathParam(\"to\") String toDate);",
"@Repository\npublic interface RestaurantTableBookingRepository extends JpaRepository<RestaurantTableBooking, Long> {\n\n @Query(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Establishes equality to a provided object. In case the object is another BufferedStatisticKey, it is considered equal if summary statistic and a State of the two objects are respectively equal. | @Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final BufferedStatisticKey other = (BufferedStatisticKey) obj;
if (!Objects.equals(this.calcState, other.calcState)... | [
"public boolean equals(Object object)\r\n/* 209: */ {\r\n/* 210:396 */ if (object == this) {\r\n/* 211:397 */ return true;\r\n/* 212: */ }\r\n/* 213:399 */ if (!(object instanceof AggregatingSummaryStatistics)) {\r\n/* 214:400 */ return false;\r\n/* 215: */ }\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle failed event by retrying to process it or dropping it depending on if it is possible to retry processing. | protected BufferedEventSink handleError(SinkError ev) {
errorCount.incrementAndGet();
if (isOpen() && !factory.getPooledLogger().isDQfull()) {
SinkLogEvent event = ev.getSinkEvent();
factory.getPooledLogger().putDelayed(event);
rqCount.incrementAndGet();
} else {
dropCount.incrementAndGet();
}
ret... | [
"@Override\n public void failed(final ProcessEvent processEvent) {\n final Task pyramidTask = processBusiness.getTask(uuidTask);\n pyramidTask.setState(TaskState.FAILED.name());\n processBusiness.updateTask(pyramidTask);\n }",
"@Override\n\tpublic void failed(Exception arg0) {\n\t\tlatc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scanner scan = new Scanner(System.in); String a = scan.next(); String b = scan.next(); scan.close(); ret = isAnagram(a, b); | public static void main(String[] args) {
System.out.println(isAnagram("anagram", "margana"));//;) ? "Anagrams" : "Not Anagrams");
} | [
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String a = scan.next();\n String b = scan.next();\n scan.close();\n boolean ret = isAnagram(a, b);\n System.out.println( (ret) ? \"Anagrams\" : \"Not Anagrams\" );\n }",
"public static v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method used when the computer is guessing the user's selected number. THIS IS CURRENTLY NOT IMPLEMENTED. | private void computerGuessing() {
System.out.println("Sorry, this feature isn't currently available.");
/*
System.out.println("Okay, tell me when you've thought of a number! (Just hit the Enter key!)");
input.nextLine();
//Add the ability to add a boundry.
System.out.prin... | [
"private static int guess(int num){\n int pick = 5;\n if(pick < num) return -1;\n else if(pick > num) return 1;\n else return 0;\n }",
"public void takingUserInput(){\n guess = 1;\n System.out.println(\"\\t \\t Lets get started \\t \\t\");\n System.out.println(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Override this method to change the nature of global locks. | protected LockPool getGlobalLockPool()
{
return myLocks;
} | [
"public void lock() {\n //super.lock();\n }",
"private void lock(){\n\t\tlock.writeLock().lock();\n\t\tlock.readLock().lock();\n\t}",
"@Override\n protected void lock() {\n if (_lock != null)\n _lock.lock();\n }",
"LockMode lockMode();",
"public void lock() { \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get string inputs from EditText fields. | @Override
public void onClick(View v) {
String num1 = etNum1.getText().toString();
String num2 = etNum2.getText().toString();
try {
// Convert String to Integer for operations
int x = Integer.parseInt(num1);
... | [
"private String getStringFromEditText(EditText editText){\r\n return \"\"+editText.getText().toString();\r\n }",
"private void convertEditTextVarsIntoStringsAndYesThisIsAMethodWeCreated() {\n emailAdd = personsEmail.getText().toString();\n beginning = intro.getText().toString();\n n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | private final void m40708a(Function1<? super Throwable, C13145v> function1, Object obj) {
StringBuilder sb = new StringBuilder();
sb.append("It's prohibited to register multiple handlers, tried to register ");
sb.append(function1);
sb.append(", already has ");
sb.append(obj);
... | [
"public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }",
"interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }",
"public interface ans {\n /* renamed from: a */\n void mo1174a();\n}",
"public interface C24712af {\n /* renamed from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
internal constructor used to create NIOSocket objects for incoming client connections | NIOClientTCPSocket(SocketChannel channel) throws IOException {
_socketType = SocketType.Incoming;
_channel = channel;
_address = new InetSocketAddress(channel.socket().getInetAddress(), channel.socket().getPort());
} | [
"public NIOSocket(Executor tsp) throws IOException\n\t{\n\t\tthis(null, null, tsp);\n\t}",
"public SocketMgr() { }",
"public SocketClient() {\n socketClientThread = new SocketClientThread(\"socketClientThread\", this);\n new Thread(socketClientThread).start();\n }",
"ServerReader(Socket socke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the database is created for the first time. This is where the creation of tables and the initial population of the tables should happen. | @Override
public void onCreate(SQLiteDatabase db) {
//String SQL_CREATE_WAITLIST_TABLE;
db.execSQL(SQL_CREATE_ENTRIES);
} | [
"public void setupDatabase(){\n\t\t\n\t\t\n\t\t\n\t}",
"public static void initializeDB(){\n\t\tConnection conn = getConnection();\n\t\tcreateDB(conn);\n\t\tuseDB(conn);\n\t\tcreateTables(conn);\n\t}",
"@Override\n public void init() {\n createTable();\n }",
"public static void InitializeDatabase... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public TemplatePFE getTemplatePFE() {
return super.getTemplatePFE();
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a WorkbookChartFont with a new object | @Nonnull
public java.util.concurrent.CompletableFuture<WorkbookChartFont> putAsync(@Nonnull final WorkbookChartFont newWorkbookChartFont) {
return sendAsync(HttpMethod.PUT, newWorkbookChartFont);
} | [
"public void createFont() {\n font = Fonts.loadFont(Fonts.OPEN_SANS, fontsize, color, bordercolor);\n BitmapFont.TextBounds bounds = font.getBounds(text);\n fontWidth = bounds.width;\n fontHeight = bounds.height;\n if (usefontsize) {\n size.x = fontWidth + size.x + (fon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bool enableLimit = 3; | public boolean hasEnableLimit() {
return ((bitField0_ & 0x00000004) == 0x00000004);
} | [
"public boolean useMaxForLimit() {\n \t\treturn true;\n \t}",
"public boolean supportsLimit() {\n \t\treturn false;\n \t}",
"public boolean supportsLimit() {\n \t\treturn true;\n \t}",
"@Override\n public boolean supportsVariableLimit() {\n \t\treturn false;\n \t}",
"public TestLimitCondition() {\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Package for the model. It contains accessors for the meta objects to represent each class, each feature of each class, each operation of each class, each enum, and each data type | public interface ThingMLPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "thingML";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "xthingml";
... | [
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tmodelSortEClass = createEClass(MODEL_SORT);\n\t\tcreateEAttribute(modelSortEClass, MODEL_SORT__CLASS_NAME);\n\t\tcreateEAttribute(modelSortEClass, MODEL_SORT__PACKAGE_NAME);\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy Vector Into This Vector | public Vector4d set(Vector4d v) {
return set(v.x, v.y, v.z, v.w);
} | [
"void vectorCopy( BitVector pResult ){\n for (int i = 0; i < fLongWordLength; i++)\n ((BitVector)pResult).fVectorWord[i] = \n ((BitVector)this).fVectorWord[i]; \n }",
"public void vectorCopy(BitVector pResult);",
"public Vector(Vector other) {\r\n this(other.array.length);\r\n this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compara dois valores long. | public static boolean equal(final long value1, final long value2) {
return value1 == value2;
} | [
"private static boolean longLongCompareMagnitude(long paramLong1, long paramLong2, long paramLong3, long paramLong4) {\n/* 5201 */ if (paramLong1 != paramLong3) {\n/* 5202 */ return (paramLong1 < paramLong3);\n/* */ }\n/* 5204 */ return (paramLong2 + Long.MIN_VALUE < paramLong4 + Long.MIN_VAL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test if daysPassed is really being incremented in the isRentDue() method | public void testIsRentDueDaysPassed(){
monitor.setWorldTime(time_1);
assertEquals(1, monitor.isRentDueDaysPassed());
assertFalse(monitor.isRentDueDaysPassed() == -1);
monitor.setWorldTime(time_2);
assertEquals(1, monitor.isRentDueDaysPassed());
assertNotSame(1, monitor.isRentDueDaysPassed());
} | [
"public boolean checkPaymentDue(){\n LocalDate now = LocalDate.now();\n //get length of time between last payment and now\n Period period = Period.between(now, super.getLastPayment());\n int diff = period.getDays();\n return (diff >= 30);\n }",
"boolean hasSlaDueDate();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void initPropagation() {
violations = 0;
for (int i = 1; i <= XR.getNbRoutes(); i++) {
update(i);
violations += getViolations(getSumWeights(XR.getTerminatingPointOfRoute(i)), i);
}
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert it into string | public IndexedFile ()
{
} | [
"public String toStr();",
"public String intoString();",
"public abstract String toGenericString();",
"public String convert(Node node) {\n StringBuilder sb = new StringBuilder();\n convert(node, sb, 0);\n return sb.toString();\n }",
"public String convertToString(){\n StringB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This parameter indicates that a stipplefill repeated graphic will be used and specifies the fill graphic to use. | public org.geotools.styling.Graphic getGraphicFill() {
return graphicFill;
} | [
"Graphic getGraphicFill();",
"public void setFill(boolean fill){\n this.fill=fill;\n }",
"public void noFill() {\n this.fillcolor = null;\n }",
"public void setFill(FillStyle fill) {\n mFill = fill;\n }",
"void setBlipFill(CTBlipFillProperties blipFill);",
"public void changeTi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the fixed length of the stored "string". Should be a constanttime operation. | public int length() {
/* FIX ME */
return size;
} | [
"public static int $length() {\n return Sys.$length();\n }",
"private static int StringLength() \n\t{\n\t\treturn 0;\n\t}",
"public int length(){\n return string.length;\n }",
"public int length()\n\t{\n\t return m_sString.length(); \n\t}",
"public int rightLength();",
"long getLengthGt()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calcule l'aire du Rectangle | public double aire(){
return this.len*this.lon;
} | [
"@Override\r\n\tpublic float calculateArea() {\r\n\t\t\r\n\t\tfloat rectangleArea = 2*this.height*this.width; \r\n\t\treturn rectangleArea;\r\n\t}",
"private void computeRectangle() {\n\t\t// Actual rectangle depends on line width\n\t\tint lineWidth = actualStyle_.getLineWidth() - 1;\n\n\t\tif (x_ != null) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new SingleTermListinstance. | public SingleTermList() {
super();
} | [
"public static ListFactory<Term> newListFactory(){\n\t\tif (factory == \"array\") {\n\t\t\treturn new ArrayListFactory<Term>();\n\t\t}\n\t\telse {\n\t\t\t// Return a factory for linked list\n\t\t\treturn new SinglyLinkedListFactory<Term>();\n\t\t}\n\t}",
"public TestTermList() {\n }",
"public Term create(lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all user sessions info for given node stored in cache | @Cacheable(value = USER_SESSIONS_INFO_CACHE, key = "#node")
public Map<String, SessionInfo> getSessionsInfoForNode(String node) {
return new ConcurrentHashMap<>();
} | [
"public Collection<User> loggedOnUsers() {\n\t\treturn getCacheService().getCache().values();\n\t}",
"public List<Session> getSessionByUserId(long userId) {\n\t\tList<Session> sessionList = new ArrayList<Session>();\n\t\tSet<Entry<String,Session>> sessionEntrySet = sessions.entrySet();\n\t\tIterator<Entry<String,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1019 .kitty_protos.C2S_GiveUpOfflineCoin c2sGiveUpOfflineCoin = 1020; | public Builder mergeC2SGiveUpOfflineCoin(kitty_protos.C2SGiveUpOfflineCoin.C2S_GiveUpOfflineCoin value) {
copyOnWrite();
instance.mergeC2SGiveUpOfflineCoin(value);
return this;
} | [
"private void handleHashMessageAddFakeMoney(String message, int power) {\n/* 14004 */ if (power >= 3 && Servers.localServer.testServer) {\n/* */ \n/* 14006 */ StringTokenizer tokens = new StringTokenizer(message);\n/* 14007 */ tokens.nextToken();\n/* 14008 */ long amount = 0L;\n/* ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests bad template arg to applyTemplate. | public void testApplyTemplate2BadData() {
try {
generator.applyTemplate(generator.getTemplate("test_files/failure/valid-simple-comment.txt"),
new FileReader("test_files/failure/invalid-empty-data.xml"));
fail("Did not fail.");
} catch (TemplateDataFormatExcep... | [
"public void testApplyTemplateWrongType() {\n XsltTemplate test = new XsltTemplate();\n TestTemplateData ttd = new TestTemplateData();\n\n try {\n test.setTemplate(\"# yeah yeah yeah\");\n } catch (Exception e) {\n fail(\"Non dev exception\");\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a range of todo items matching the UUID and company. | @Override
public List<TodoItem> getTodoItemsByUuidAndCompanyId(
String uuid, long companyId, int start, int end,
OrderByComparator<TodoItem> orderByComparator) {
return todoItemPersistence.findByUuid_C(
uuid, companyId, start, end, orderByComparator);
} | [
"List<TodoItem> getAllTodoItem();",
"@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)\n\tpublic List<Project> getProjectsByUuidAndCompanyId(\n\t\tString uuid, long companyId, int start, int end,\n\t\tOrderByComparator<Project> orderByComparator);",
"ObservableList<CompanyItem> getCompanyItemL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column miss_control_group.groupCreateDate | public void setGroupcreatedate(String groupcreatedate) {
this.groupcreatedate = groupcreatedate == null ? null : groupcreatedate.trim();
} | [
"public void setGroupDate(String groupDate) {\n this.groupDate = groupDate;\n }",
"public void setCreateDate(long createDate) { this.createDate = createDate; }",
"public void setCreateDate(String createDate)\n {\n super.setAttributeValue(Constants.ATTRIBUTE_CREATEDATE, createDate);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make a tree and insert some values | public static boolean insertTest3(){
BinaryTree b = new BinaryTree();
b.insert(KVP.keys[0],KVP.values[0]);
b.insert(KVP.keys[1],KVP.values[1]);
b.insert(KVP.keys[2],KVP.values[2]);
b.insert(KVP.keys[3],KVP.values[3]);
b.insert(KVP.keys[4],KVP.values[4]);
//in thi... | [
"private static void insertBalancedTree(){\r\n\r\n // Root\r\n tree.insert(3);\r\n\r\n // First level\r\n tree.insert(1);\r\n tree.insert(5);\r\n\r\n // Second level\r\n tree.insert(0);\r\n tree.insert(2);\r\n tree.insert(4);\r\n tree.insert(6);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ResultSet is initially before the first data set | private void writeResultSet(ResultSet resultSet) throws SQLException {
while (resultSet.next()) {
String empId = resultSet.getString("emp_id");
String empName = resultSet.getString("emp_name");
String sex = resultSet.getString("sex");
String salary = resultSet.get... | [
"private void initResultSet(ResultSet sql_set) throws SQLException {\n\t\tif( sql_set.getType() == ResultSet.TYPE_FORWARD_ONLY ) {\n\t\t\tfor( int i = 1; i < mCurRow; i++ ) {\n\t\t\t\tsql_set.next();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsql_set.absolute(mCurRow);\n\t\t}\n\n\t\tmResult = new SoftReference<ResultSet>( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an enumeration of the Connections hashtable keys. | public static Enumeration getConnectionsKeys()
{
return htConnections.keys();
} | [
"public synchronized Enumeration<K> keys()\n/* */ {\n/* 257 */ return getEnumeration(0);\n/* */ }",
"public Enumeration<String> getKeys() {\n \treturn this.getAllKeys(map.keySet());\n }",
"public Enumeration<String> getKeys() {\r\n\t\treturn this.outputTable.keys();\r\n\t}",
"public E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copies or reuses the given instance of this value type ensuring that it is immutable. | public Object immutableCopy(Object original) {
Preconditions.checkState(getType().isInstance(original));
switch (this) {
case NUMBER:
case STRING:
case FORMATTED_STRING:
case URL:
case BOOLEAN:
case CONTENT_RATING:
case FAVORITE_STATE:
cas... | [
"@Override\r\n\t\t\tpublic void makeImmutable()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"protected final _BeanImpl doSnapshot() {\r\n if (immutable) {\r\n return this;\r\n }\r\n final _BeanImpl result = newInstance();\r\n result.copyFrom(this, true);\r\n result.makeIm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use popups for the following. Ask the user how many dimes they have | void skill1() {
String dimes = JOptionPane.showInputDialog("How many dimes do you have?");
int d = Integer.parseInt(dimes);
// Tell them how many cents they have (hint: multiply by 10)
JOptionPane.showMessageDialog(null, "You have " + d * 10 + " cents.");
// Ask the user how tall they are (inches)
String height = JO... | [
"void askHowManySigns() {\n System.out.println(\"HOW MANY ADVERTISING SIGNS (15 CENTS\");\n System.out.println(\"EACH) DO YOU WANT TO MAKE?\");\n }",
"void askHowManyCups() {\n System.out.println(\"HOW MANY GLASSES OF LEMONADE DO YOU\");\n System.out.println(\"WISH TO MAKE?\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | public PayDialogButton createFromParcel(Parcel parcel) {
return new PayDialogButton(parcel);
} | [
"public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }",
"interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }",
"public interface ans {\n /* renamed from: a */\n void mo1174a();\n}",
"public interface C24712af {\n /* renamed from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function allows us to obtain the file name | private String getFileName(Part part) {
for (String content : part.getHeader("content-disposition").split(";")) {
if (content.trim().startsWith("filename")) {
return content.substring(content.indexOf('=') + 1).trim().replace("\"", "");
}
}
return nul... | [
"public String getFileName() {\n // LogUtils.d(TAG, \"getFileName, name = \" + mName);\n\n return mName;\n }",
"private static String getFileName()\n {\n try {\n return Util.getStringUserInput(Constants.ASK_FILENAME);\n }\n catch (Exception e)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method evaluates the rule under weight condition | @Override
public boolean evaluate() {
percentChange = ((getBaseWeight() - metric.getValue()) / (getBaseWeight() * 1.0f)) * 100;
System.out.println("Underweight Rule: percentChange: " + percentChange);
if (percentChange > 10) {
return true;
}
return false;
} | [
"@Override protected Function<Boolean, Boolean> weight() {\n return Function.identity();\n }",
"protected double evaluate(){\t\t\n\t\tdouble wSum = 0;\n\t\tdouble bSum = 0;\n\t\t\n\t\tV graphCentroid = getCentroid();\n\t\t\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\twSum += getWithin(i);\n\t\t\tbSum += N(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
StringTemplatebased engine compilers factory. | public interface StCompilerFactory {
ProtoCompiler create(String template);
} | [
"public Compiler() {\n\t\tthis(new String());\n\t}",
"public interface TemplateEngine {\n\n /**\n * Gets the current list of templates.\n *\n * @return the current list of template\n */\n Collection<Template> getTemplates();\n\n /**\n * The name of the template engine.\n * @return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializing the pane here so it can be accessed in any method | @Override
public void start(Stage s) throws Exception {
//Adding a title to the game
s.setTitle("Spooky Minesweeper");
//Styling the scene
styleBoard();
initBoard();
//
// //Initialing the GridPane
// root = new GridPane();
//Creating a scene
... | [
"private void setupPane() {\n\t\t\n\t}",
"public ComposedPane() {\n initComponents();\n }",
"@Override\n protected void initializeFinalPane() {\n AnchorPane anchorPane = new AnchorPane();\n anchorPane.getChildren().addAll(mainLabel, gridPane, buttonLayout);\n pane = anchorPane;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The readNum method reads in a valid double that is greater than or equal to the value that is the minimum parameter. | public static double readNum( double min, String prompt )
{
double number;
while( true )
{
while (!sc.hasNextDouble())
{
System.out.println(prompt);
sc.next();
}
number = sc.nextDouble();
if ( min <= number )
{
return number;
}
else
... | [
"public static double readDouble(){\r\n\t\tdo{\r\n\t\t\ttry{\r\n\t\t\t\tin = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\t\treturn Double.parseDouble(in.readLine());\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\tSystem.out.println(\"Accepted values: \" + Double.MIN_VALUE + \" to \" + Double.MAX_VALUE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the authority part of this URL. | public String getAuthority() {
return authority;
} | [
"public String getAuthority() {\r\n\t\treturn authority;\r\n\t}",
"@Nullable\n private String getAuthority() {\n String baseUrl = applicationProperties.getString(APKeys.JIRA_BASEURL);\n\n try {\n return new URL(baseUrl).getAuthority();\n } catch (MalformedURLException ex) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
hash of the transaction, in the form of hex string string hash = 3; | public Builder setHashBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hash_ = value;
onChanged();
return this;
} | [
"private String calulateHash() {\n\t\tsequence++; //increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn HashFunctionUtility.applySha256( HashFunctionUtility.getStringFromKey(sender) + HashFunctionUtility.getStringFromKey(reciepient) + Float.toString(value) + sequence);\n}",
"B... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes it so that everyone can use this Scanner | public static void main(String[] args) {
int response;
String[] items = { "End Program", "Counting", "Sorting" }; // Menu
// code
String menu = makemenu(items);
do {
System.out.println(menu);
resp... | [
"@SuppressWarnings(\"unused\")\r\n\tprivate void scan() {\r\n\r\n\t}",
"private void scan() {\n\ttok = scanner.scan();\n }",
"void setScanner(Scanner in) {\n scanner = in;\n }",
"private InputFromConsole() {\r\n\t\tscanner = new Scanner(System.in);\r\n\t}",
"public Scanner() {\n }",
"private voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field timestamp is set (has been assigned a value) and false otherwise | public boolean isSetTimestamp() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);
} | [
"public boolean isSetTimestamp() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMESTAMP_ISSET_ID);\r\n }",
"public boolean hasTimestamp() {\n\t\t\treturn fieldSetFlags()[0];\n\t\t}",
"public boolean isSetPersistedTime() {\n return EncodingUtils.testBit(__isset_bitfield, __... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void windowActivated(WindowEvent e) {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | private BinaryTreeNode constructCore(int[] preorder, int preorderS, int preorderE, int[] inorder, int inorderS, int inorderE) {
int rootValue = preorder[preorderS];
BinaryTreeNode root = new BinaryTreeNode(rootValue);
root.m_pLeft = root.m_pRight = null;
//如果是叶子结点
if(preorderS == preorderE){
if(inorde... | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 37: / 38: | public int a(Random paramRandom)
/* 39: */ {
/* 40:52 */ return 0;
/* 41: */ } | [
"public void keyBack() { }",
"protected boolean isNavigationKey(int paramInt) {\n/* 1092 */ return (paramInt == 38 || paramInt == 40 || paramInt == 224 || paramInt == 225);\n/* */ }",
"@Override\n \tpublic void keyPressed() {\n \n \t}",
"private boolean arrowKeys(KeyEvent e) {\r\n return (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set source of this connection. | public void setSource(Radio radio) {
source = radio;
} | [
"public void setSource(Object source){\n Source = source;\n }",
"public void setSource(S source) {\n validateSource(source);\n this.source = source;\n }",
"public void setSource(Source s)\n {\n m_source = s;\n }",
"void setSource(final DataSource theSource) {\n\t\tmSource = the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Logs messages and errors. All we do is store them until 'later'. | public synchronized void log(int level, String message, Throwable t)
{
if (!transferring)
{
Object[] data = new Object[3];
data[0] = new Integer(level);
data[1] = message;
data[2] = t;
pendingMessages.addElement(data);
}
... | [
"public void log()\r\n\t{\r\n\t\tfor(ILogger logger : loggers)\r\n\t\t{\r\n\t\t\tlogger.chainLog(messages.toArray(new String[messages.size()]));\r\n\t\t}\r\n\t}",
"synchronized void log() {\n if (LoggingService.log.level.equals(Level.INFO)) {\n System.out.println(LoggingService.log.level + \" \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a Representation to this CellPerception. | public void addRep(Representation rep) {
reps.add(rep);
} | [
"AdditionalRepresentations getAdditionalRepresentations();",
"@Override\n public PacketRep getRepresentation() {\n return new PacketRep(getX(), getY(), getColor());\n }",
"public void add(Figure figure) {\n if (this.posicion != 32) {\n this.figures[this.posicion] = figure;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets containing collections and/or connections depending on the edge type you pass in | Map<EntityRef, Set<String>> getContainers( final int limit, final String edgeType, final String fromEntityType ) {
final GraphManager gm = managerCache.getGraphManager( applicationScope );
Observable<Edge> edges =
gm.getEdgeTypesToTarget( new SimpleSearchEdgeType( cpHeadEntity.getId(), edg... | [
"public Collection<OwnEdge> getAllEdges();",
"public Collection<Edge<V,E>> edges();",
"public Set<Edge<E>> getRelationBetweenObjects();",
"public String getEdgeCollection() {\n\t\treturn getStringProperty(_EDGES);\n\t}",
"public <T extends Edge> Collection<T> getEdgeSet() {\n\t\treturn null;\n\t}",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo propio para lista de editores | public List<String> listaEditores(); | [
"@Override\r\n\tpublic void editarDados() {\n\t\tsuper.editarDadosDeFuncionario();\r\n\t\tsetCrm();\r\n\t}",
"@Override\r\n\tpublic void edit(Etudiant t) {\n\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void editar(ItensPedido itensPedido) {\n\t\t\r\n\t}",
"public void editToDoList(){\n }",
"public String e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: br.com.soc.test.ws.servico | public ObjectFactory() {
} | [
"public static Factory factory() {\n return ext_xsd::new;\n }",
"public ObjectFactory() {\n super(new com.perpetual.rp.util.jaxb.ObjectFactory.GrammarInfoImpl());\n }",
"public static IAbapObjectsFactory init() {\n\t\ttry {\n\t\t\tIAbapObjectsFactory theAbapObjectsFactory = (IAbapObjectsFact... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an array of unnormalized color/alpha components, this method performs colortopixel translation, and sets the translated pixel data back to the Raster within a specific region. It is very important that the components array along with access information are obtained by calling the getComponents() method, or errors... | public void setComponents(UnpackedImageData uid) {
if ( uid == null ) {
throw new IllegalArgumentException(JaiI18N.getString("Generic0"));
}
if (!uid.convertToDest) {
return;
}
WritableRaster raster = (WritableRaster)uid.raster;
Rectangle rect =... | [
"private void arrayToDispImage() {//try modifying this\r\n WritableRaster writableRaster = colorImage.getRaster();\r\n\r\n for (int col = 0; col < colorWidth; col++) {\r\n for (int row = 0; row < colorHeight; row++) {\r\n for (int channel = 0; channel < channels; channel++) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new TodoTask with empty description. | public TodoTask() {
super("");
} | [
"public TodoTask(String description) throws DukeInvalidArgumentException {\n super(description);\n this.taskType = TaskType.TODO;\n TaskUtil.validateTaskDescription(description);\n }",
"public Todo(String description) throws InvalidFormatException {\n super(description, \"T\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
a listen on all network interfaces, not just localhost d use USB device (error if multiple devices connected) e use TCP/IP device (error if multiple TCP/IP devices available) s SERIAL use device with given serial (overrides $ANDROID_SERIAL) t ID use device with given transport id H name of adb server host [default=loca... | public static void setDebug(boolean debug) {
Adb.debug = debug;
} | [
"public static void startConnect(Context context, int id)\n {\n BTClient.context = context;\n // String distServerName = \"HTC D816w\";\n //String distServerName = \"ALCATEL\";\n Set<BluetoothDevice> set = mBluetoothAdapter.getBondedDevices();\n Iterator<BluetoothDevice> iterat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value specified by key as a String. | public String get(String key, Object... args) {
final String s = s(key);
return (s.length() == 0) ? key : MessageFormat.format(s, args);
} | [
"public String getString(Object key) {\n\t\treturn getString(key, null);\n\t}",
"public String getString(final String key) {\n Object foo = get(key);\n if (foo == null) {\n return null;\n }\n return foo.toString();\n }",
"public @NotNull String getString(@NotNull String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests_SRS_AMQPSIOTHUBCONNECTION_12_021: [The function shall call AmqpsSessionManager.authenticate.] | @Test
public void authenticateSuccess() throws IOException, InterruptedException
{
// arrange
baseExpectations();
final AmqpsIotHubConnection connection = new AmqpsIotHubConnection(mockConfig, 1);
new NonStrictExpectations()
{
{
Deencapsulatio... | [
"public void testSRPLoginWithExternalA() throws Exception\n {\n log.debug(\"+++ testSRPLoginWithExternalA\");\n byte[] abytes = \"abcdefgh\".getBytes();\n login(\"srp-test-ex\", username, password, abytes);\n logout();\n }",
"@Test\n public void testAuthentication() throws Exception {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This variation uses the same path as StandardPresentationFinderTest which was hanging in the unzip command | public void testExtractZipWithLongDestinationPath() {
File src = new File(packageDir, "standardpresentationfindertestfs.zip");
if (!src.exists())
fail("File did not exist: " + src);
File dstDir = new File(TEST_ROOT + "/xl-test/StandardPresentationFinderTest.tmp/");
// The pat... | [
"@Test\n\tvoid unzip() throws FileNotFoundException {\n\t\tdb_download db_download_test = new db_download();\n\t\t\n\t\tFile zipFile = new File(\"C:/Users/hadas/Desktop/פרויקט/finalProject/Fastlane/test.zip\");\n\t\tZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFile));\n\t\tString zipPath = \"C:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 27 /Coverage entropy=1.627420238246176 | @Test(timeout = 4000)
public void test027() throws Throwable {
XPathLexer xPathLexer0 = new XPathLexer("com.werken.sxpath.XathLexer");
xPathLexer0.and();
xPathLexer0.mod();
Token token0 = xPathLexer0.doubleColon();
xPathLexer0.and();
XPathLexer xPathLexer1 = new XPathLexer("6fK23... | [
"@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Javadoc for this public method is generated via the doc templates in the doc_src directory. | public OperationStatus getFirst( DatabaseEntry key, DatabaseEntry data, LockMode lockMode) throws DatabaseException {
return getFirst(key,new DatabaseEntry(),data,lockMode);
} | [
"@Override\n public String printDocumentation() {\n return (documentation);\n }",
"protected SourceDocInfo() {/* intentionally empty block */}",
"@Override\n\tpublic ClassDoc getClassDoc() {\r\n\t\treturn classDoc;\r\n\t}",
"public CompDocumentation() {\n }",
"String getDocumentationLink();",
"pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |