query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
.POGOProtos.Rpc.GameplayWeatherProto.WeatherCondition weather_boosted_condition = 5; | POGOProtos.Rpc.GameplayWeatherProto.WeatherCondition getWeatherBoostedCondition(); | [
"int getWeatherBoostedConditionValue();",
"com.cst14.im.protobuf.ProtoClass.NearbyCondition getNearbyCondition();",
"public WeatherCondition getCondition() {\n return condition;\n }",
"com.cst14.im.protobuf.ProtoClass.NearbyConditionOrBuilder getNearbyConditionOrBuilder();",
"io.grpc.user.task.Pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Inertia'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseInertia(Inertia object) {
return null;
} | [
"public float getInertia () {\n\t\treturn jniGetInertia(addr);\n\t}",
"public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }",
"public Inertia getInertiaBlock() {\n return inertia;\n }",
"public Matrix getInertia() {\r\n return inertia;\r\n }",
"public abstract flo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AttDef__Group__5__Impl" $ANTLR start "rule__AttDef__Group__6" InternalDsl.g:12584:1: rule__AttDef__Group__6 : rule__AttDef__Group__6__Impl rule__AttDef__Group__7 ; | public final void rule__AttDef__Group__6() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:12588:1: ( rule__AttDef__Group__6__Impl rule__AttDef__Group__7 )
// InternalDsl.g:12589:2: rule__AttDef__Group__6__Impl rule__AttDef__Grou... | [
"public final void rule__AttDef__Group__5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:12561:1: ( rule__AttDef__Group__5__Impl rule__AttDef__Group__6 )\n // InternalDsl.g:12562:2: rule__AttDef__Group__5__Impl rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a File object representing a file found on the file system according to arbitrary rules. The relativePath argument must specify a relative path inside the absolute directory determined by the system. If relativePath is null the file will be searched directly under the directory determined by the system. The fil... | public static File getConfigFile(String relativePath, String fileName) {
File file = null;
ClassLoader classLoader = EcoscopeUtils.class.getClassLoader();
String fullpath = EcoscopeUtils.getConfigFilePath(relativePath, fileName);
if (fullpath != null) {
file = new File(full... | [
"public static String getConfigFilePath(String relativePath, String fileName) {\n String home = System.getProperty(\"user.home\");\n String os = System.getProperty(\"os.name\");\n String fullpath = null;\n\n if (relativePath == null) {\n relativePath = \"\";\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a list of monthly net income record | public List<MonthlyRecord> getMonthlyNetIncome(int year) throws SQLException {
LocalDate from = LocalDate.ofYearDay(year, 1);
LocalDate to = LocalDate.ofYearDay(year, from.lengthOfYear());
try (PreparedStatement statement = conn.prepareStatement(
"SELECT data.Month, data.Income - data.Expense as NetIncome... | [
"public List<MonthlyRecord> getMonthlyIncome(int year) throws SQLException {\n\t\treturn getMonthly(year, \"Income\");\n\t}",
"List<Expense> listExpenseByMonth();",
"public List<DailyRecord> getDailyNetIncome(int year, Month month) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Asserts that NullPointerException is thrown if a bin format is constructed and bytes parameter is null | public void testDmtDataExceptions003() {
try {
log("#testDmtDataExceptions003");
new DmtData((byte[])null);
failException("", NullPointerException.class);
} catch (NullPointerException e) {
pass("Asserts that NullPointerException is thrown if a bin ... | [
"public void testAppendBytesNullPointerException() throws Exception {\r\n assertNotNull(\"setup fails\", filePersistence);\r\n try {\r\n filePersistence.appendBytes(null, new byte[0]);\r\n fail(\"if fileCreationId is null, throw NullPointerException\");\r\n } catch (NullPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to count the number of mines adjacent to this square and display it on the square as an image. It first runs a loop from 1 to 1 which checks a 3x3 square around this square for bombs. If there's a bomb we increment the counter. It then sets the image to be the number of mines and if there are 0 mine... | private int minesNearby()
{
for (int i = -1; i <= 1; i++)
{
for (int j = -1; j <= 1; j++)
{
if (board.getSquareAt(getXLocation() + i, getYLocation() + j) != null)
{
BombSquare nearbySquare = (BombSquare) board.getSquareAt(getXLocation() + i, getYLocation... | [
"public void calculateAroundBomb(){\n for(int i=0;i<row;i++) {\n for (int j = 0; j < col; j++) {\n int count = 0;\n if ( !board[i][j].IsBomb() ) {\n for (int x = i - 1; x <= i + 1; x++) {\n for (int y = j - 1; y <= j + 1; y++)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TypeSetKeywords: 'type' 'set' ; | protected String getTypeSetKeywordsToken(EObject semanticObject, RuleCall ruleCall, INode node) {
if (node != null)
return getTokenText(node);
return "typeset";
} | [
"KeywordsetType getKeywordset();",
"KeywordsType createKeywordsType();",
"Set<String> getKeywords();",
"@Test\n\tpublic void testKeywordSet01() {\n\t\tDatasetType result = new DatasetType()\n\t\t\t.withKeywordSet(new KeywordSet().withKeyword(\n\t\t\t\t\tnew Keyword().withContent(\"keywordOne-1\"),\n\t\t\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return IdGenerator.generate63(useFor, dbNum, tableNum); | public static String newId(long useFor, long dbNum, long tableNum) throws Exception{
return IdGenerator.generate61ForId(useFor, dbNum, tableNum);
} | [
"long nextId();",
"private static synchronized int generateEntityID() {\n int id = freeID;\n freeID++;\n return id;\n }",
"private int generateId() {\n int id = 0;\n return id;\n }",
"abstract void autoGenerateId();",
"private Long generateNewLongId() {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This default constructor exists almost exclusively to allow us to build the queryPlant, it might not be wise to allow empty plants into the database | public plant()
{
this.plantGroup = new ArrayList<>();
this.leafType = new ArrayList<>();
this.leafArrangement = new ArrayList<>();
this.growthForm = new ArrayList<>();
this.flowerColor = new ArrayList<>();
this.flowerSymetry = ... | [
"public Plant(Cell loc) {\n super(loc);\n\n }",
"public PrfQuery() {\n\t\tthis(0);\n\t}",
"public Query() {\r\n }",
"public LocationDataQuery() {\n\t\t\n\t}",
"public QueryPlusRunner()\n {\n this(null);\n }",
"private PBPlantInfo() {}",
"public PseudoQuery() {\r\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find the ProxySpec that matches the given ID. | public ProxySpec getProxySpec(String id) {
if (id == null || id.isEmpty()) return null;
return findProxySpec(spec -> spec.getId().equals(id), true);
} | [
"public Proxy getProxy(String id) {\n\t\treturn findProxy(proxy -> proxy.getId().equals(id), true);\n\t}",
"@Programmatic\n public ObjectSpecification lookupBySpecId(ObjectSpecId objectSpecId) {\n if(!cache.isInitialized()) {\n throw new IllegalStateException(\"Internal cache not yet initiali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The entirety of getIntentPatterns definition. | interface PatternsGetIntentPatternsDefinition extends
PatternsGetIntentPatternsDefinitionStages.WithAppId,
PatternsGetIntentPatternsDefinitionStages.WithVersionId,
PatternsGetIntentPatternsDefinitionStages.WithIntentId,
PatternsGetIntentPatternsDefinitionStages.WithExecute {
} | [
"PatternsGetIntentPatternsDefinitionStages.WithAppId getIntentPatterns();",
"PatternsGetPatternsDefinitionStages.WithAppId getPatterns();",
"@Deprecated\n Observable<List<PatternRuleInfo>> getIntentPatternsAsync(UUID appId, String versionId, UUID intentId, GetIntentPatternsOptionalParameter getIntentPatterns... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the current configured textletterspacing for the symbol Text tracking amount. | public Float getTextLetterSpacing() {
return textLetterSpacing;
} | [
"public float getCharSpacing() { return RMUtils.floatValue(getAttribute(TEXT_CHAR_SPACING)); }",
"public String getLetterSpacing();",
"public float getCharSpacing()\n {\n return (float) getStyle().getCharSpacing();\n }",
"final float getCharacterSpacing() {\n\treturn charSpacing;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load to currency exchange scene when dashboard button pressed | @FXML
public void dashBoardButtonPushed() { loadNextScene("/sample/Scene/currencyExchangeScene.fxml"); } | [
"@FXML\n private void toSellPage(ActionEvent event) throws Exception{\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n \n Parent sellPageParent = FXMLLoader.load(getClass().getResource(\"SellPage.fxml\"));\n Scene sellPageScene = new Scene(sellPageParent);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'alternateEmails' field has been set. | public boolean hasAlternateEmails() {
return fieldSetFlags()[9];
} | [
"public void setAlternateEmail(String alternateEmail) \r\n {\r\n\t\tthis.alternateEmail = alternateEmail;\r\n\t}",
"public void setAlternateEmail(String alternateEmail) {\n this.alternateEmail = alternateEmail;\n }",
"public boolean hasEmails() {\n return fieldSetFlags()[3];\n }",
"public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the column which represents the output value (first column = 1) | public void setOutputColumnCount(int column){
if(column > 0){
this.outputColumnCount = column;
}
} | [
"public void setCol(int value) {\n this.col = value;\n }",
"public String getColumnone() {\n return columnone;\n }",
"public void SetCol(int c)\n {\n NumberofCols=c;\n }",
"public String getColumn1() {\n return column1;\n }",
"public void setCol(int column) {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds and returns a new value for service (Service Details) Definition: | public Service addService() {
Service newType = new Service();
getService().add(newType);
return newType;
} | [
"void addService(ServiceInfo serviceInfo);",
"public abstract T addService(ServerServiceDefinition service);",
"public void addService(Service service);",
"com.icare.eai.schema.om.evSORequest.ListOfServiceElementsComplexType addNewListOfServiceElements();",
"public String addServices(String typeService, dou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether the channel is subscribed or not | public boolean isSubscribed() {
return isSubscribed;
} | [
"@Override\n \tpublic boolean isSubscribed() throws CloudException, InternalException {\n \t\treturn true;\n \t}",
"public boolean isSubscribedData()\n {\n if (dataSubscriptionHandle == null) return false;\n return dataSubscriptionHandle.isMonitoring();\n }",
"public boolean isSetChannel() {\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
zamiast getInfo dajemy toString i kasujemy getInfo w klasie Test return year + "/" + month + "/" + day; | public String toString() {
return String.format("%d/%d/%d", year, month, day);
} | [
"public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}",
"public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }",
"public String toString(){\r\n\t\treturn (month+\", \"+year+\" // \"+location.toString());\r\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function reflects the ECMA standard. Most places use peekStatement instead. | private ParseTree parseStatementStandard() {
switch (peekType()) {
case OPEN_CURLY:
return parseBlock();
case CONST:
case VAR:
return parseVariableStatement();
case SEMI_COLON:
return parseEmptyStatement();
case IF:
return parseIfStatement();
case ... | [
"private boolean peekStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n case VAR:\n case CONST:\n case SEMI_COLON:\n case IF:\n case DO:\n case WHILE:\n case FOR:\n case CONTINUE:\n case BREAK:\n case RETURN:\n case WITH:\n case SWI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if the Months is configured. | public boolean isSetMonths() {
return (this.months != null ? this.months.isSetValue() : false);
} | [
"public boolean isSetMonth() {\r\n return EncodingUtils.testBit(__isset_bitfield, __MONTH_ISSET_ID);\r\n }",
"public boolean hasMonth() {\n return fieldSetFlags()[2];\n }",
"public boolean isSetTimeInMonths() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TIMEINMONTHS_IS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ALMACENAMIENTO EN DISPOSITIVO salvarBitMapEnDirectorioInternoApp Guarda un Bitmap en un fichero, en el directorio de imagenes de la aplicacion (Internal Storage) Devuelve un File que referencia directamente al fichero creado | public static File salvarBitMapEnUnidadInternaApp(Context context, Bitmap bitmap, String nombredelficheroDestino) {
ContextWrapper wrapper = new ContextWrapper(context);
File carpeta = wrapper.getDir("Images", MODE_PRIVATE);
File fileDestino = new File(carpeta, nombredelficheroDestino);
... | [
"public static File salvarBitmapEnUnidadExterna(String DIRECTORIOEXTERNO, Bitmap bitmap, String carpetadestino, String nombreficherodestino) {\n boolean res = true;\n File fileDestino = null;\n try {\n File carpetaDestino = JYOCUtilsv4.obtenerDirectorioEnUnidadExterna(DIRECTORIOEXTER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ensure that 1 or more providers were detected/loaded into the Pi4J context | @Test
public void testProvidersNotEmpty() {
assertFalse(pi4j.providers().all().isEmpty());
// print out the detected Pi4J io libraries found on the class path
pi4j.providers().describe().print(System.out);
} | [
"private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "Material" element | void xsetMaterial(org.apache.xmlbeans.XmlNonNegativeInteger material); | [
"public void setMaterial(String mat){\r\n material = mat;\r\n }",
"public void setMaterial(Material material) {\n mMaterial = material;\n }",
"public void setMaterial(Material material) {\n this.material = material;\n }",
"public void setMaterial(java.lang.String material) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads the plugin in the specified file File must be valid according to the current enabled Plugin interfaces | @Nullable
public Plugin loadPlugin(@NotNull File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException; | [
"private void loadPlugin(File file) {\n JarFile jarFile;\n\n try {\n jarFile = new JarFile(file);\n } catch (IOException e) {\n Logger.instance.logf(Level.WARNING, Messages.PLUGIN_JARFILE_CREATE, e);\n return;\n }\n\n JarEntry pJson = jarFile.getJa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setAsked method, of class SXUser. | @Test
public void testSetAsked() {
System.out.println("setAsked");
List<Question> asked = null;
SXUser instance = new SXUser();
instance.setRealName("Real Name");
instance.setUserName("username");
instance.setAsked(asked);
List<Question> result = insta... | [
"@Test\r\n public void testSetAnswered() {\r\n System.out.println(\"setAnswered\");\r\n List<Answer> answered = null;\r\n SXUser instance = new SXUser();\r\n instance.setRealName(\"Real Name\");\r\n instance.setUserName(\"username\");\r\n instance.setAnswered(answered);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
default constructor assuming ascending is true | public PriceComparator()
{
ascending=true;
} | [
"public PriceComparator(boolean asc)\n\t{\n\t\tascending=asc;\n\t}",
"public void ascending(){\n ascending = true;\n }",
"public SortedGreedyDoublePartitioner()\r\n\t{\r\n\t\tsuper();\r\n\t\tascending = true;\r\n\t}",
"public Sort() {}",
"public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDomin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs packet processer, which will use the supplied data holder. | protected PacketProcesser(DataHolder dh) {
this.dh = dh;
} | [
"public abstract DatagramPacket buildPacket();",
"public Packet createPacket() {\n\t\treturn new Packet((ByteBuffer) buffer.flip());\n\t}",
"public abstract void process(PacketHandler handler);",
"private static DatagramPacket createPacket(byte[] data, SocketAddress remote) {\r\n\t\tDatagramPacket packet = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
======================================================================= Interface between infGraph and the goal processing machinery Log a derivation record against the given triple. | @Override
public void logDerivation(Triple t, Derivation derivation) {
derivations.put(t, derivation);
} | [
"public void process(Graph g, TridentTuple tuple, TridentCollector collector);",
"@Override\n public void addDeduction(Triple t) {\n getCurrentDeductionsGraph().add(t);\n if (useTGCCaching) {\n transitiveEngine.add(t);\n }\n }",
"@Override\n public void silentAdd(Triple ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a given amount of nodes impassable randomly | public void setRandomBlocks(int amount) {
Random r = new Random();
if (amount >= Math.pow(grid.length, 2)) {
throw new IllegalArgumentException("Exception: Amount >= Total Grid Nodes");
}
while (amount > 0) {
int x = r.nextInt(grid.length - 1);
int y = r.nextInt(grid.length - 1);
... | [
"public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the zoom. Call this method inside ajax request when the map itself is not added to the target. | public void setZoom(final int level, final AjaxRequestTarget target) {
setZoom(level);
target.appendJavaScript(getJSsetZoom(_zoom));
} | [
"public void setZoomLevel(double zoomLevel);",
"public void setZoom(double zoom) {\n this.zoom = zoom;\n }",
"public void changeZoom();",
"public void setZoom(final int zoomLevel) {\n final String cmdString = String.format(Locale.US, \"myMap.setZoom(%d);\", zoomLevel);\n execScript(cmdString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the receiver's selection, minimum value, maximum value, thumb, increment and page increment all at once. Note: This is similar to setting the values individually using the appropriate methods, but may be implemented in a more efficient fashion on some platforms. | public void setValues( final int selection,
final int minimum,
final int maximum,
final int thumb,
final int increment,
final int pageIncrement )
{
checkWidget();
if( selection >=... | [
"public void setSelection( final int value ) {\n checkWidget();\n if( value < minimum ) {\n selection = minimum;\n } else if ( value > maximum - thumb ) {\n selection = maximum - thumb;\n } else {\n selection = value;\n }\n }",
"public void setMaximum( final int value ) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field profileForm is set (has been assigned a value) and false otherwise | public boolean isSetProfileForm() {
return this.profileForm != null;
} | [
"public boolean isSetProfile() {\n return this.profile != null;\n }",
"public boolean isSetProfile() {\n return this.profile != null;\n }",
"public boolean isSetProfileId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROFILEID_ISSET_ID);\n }",
"public b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the places.txt file and launch a JVM on each local place specified in this file | public static final void launchLocalJVM(IProject project) {
Cursor cursor = new Cursor(null, SWT.CURSOR_WAIT);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
.setCursor(cursor);
String projectPath = project.getLocation().toOSString();
String projectName = project.getName();
String awfull... | [
"private static Vector parsePlaces(IProject aProject, boolean localParse, boolean isRun)\n\tthrows FileNotFoundException, IOException {\n\t\tString projectPath = aProject.getLocation().toOSString();\n\t\tString placesFile = projectPath + File.separator + \"places.txt\";\n\t\tVector places = new Vector();\n\t\t\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getGenero method, of class Usuario. | @Test
public void testGetGenero() {
System.out.println("getGenero");
Usuario instance = new Usuario();
String expResult = null;
String result = instance.getGenero();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default ... | [
"@Test\r\n public void testSetGenero() {\r\n System.out.println(\"setGenero\");\r\n String genero = \"\";\r\n Usuario instance = new Usuario();\r\n instance.setGenero(genero);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Test\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that generated scrypt hash in hexadecimal notation is correct. | @Test
public void testTeacherHexHashGenerating() {
String expectedValue = "0b870ff044775ef0360655c40d5b284b7e3ae2b72207a6894794d787eb019e60";
assertEquals(expectedValue, eckIdServiceUtil.getScryptUtil().generateHexHash(VALID_TEACHER_PGN));
} | [
"@Test\n public void testStudentHexHashGenerating() {\n String expectedValue = \"9735dfd2235eaeb5f0300886bcc99c82ffc1d6420c4e0bde8de7218def2135fa\";\n assertEquals(expectedValue, eckIdServiceUtil.getScryptUtil().generateHexHash(VALID_STUDENT_PGN));\n }",
"@Test\n public void testHashPassSHA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Ask user to enter annual salary, if the salary is more than or equal to 80000 output will be "I accept the offer" between 60000 and 80000 output will be "I negotiate to increase" otherwise output will be "I do not accept the offer" | public static void main(String[] args) {
Scanner scan= new Scanner(System.in);
System.out.println("Enter your annual salary");
int salary= scan.nextInt();
if (salary>=80000){
System.out.println("I accept the offer");
} else if (salary>60000 ){
System.out... | [
"public void salary() {\n System.out.print(\"Wage: \");\n double wage = in.nextDouble();\n System.out.print(\"Hours: \");\n double hours = in.nextDouble();\n final double REG_HOURS = 40;\n final double OVERTIME_MULTIPLIER = 0.5;\n\n double salary = wage * hours;\n if (hours >... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To add Room Facilities | public void addRoomFacilities() {
FacesContext context = FacesContext.getCurrentInstance();
ResourceBundle text = ResourceBundle.getBundle("employees", context.getViewRoot().getLocale());
try {
if (getSelectedRoom() == null) {
String message = text.getString("ui.Bean.... | [
"public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assert that given user has no records | @And ( "^The other user (.+) still has no records.$" )
public void assertUserNoRecords ( final String user ) {
selectPatient( user );
noCurrentPregnanciesText();
noPreviousPregnanciesText();
} | [
"@Test(expectedExceptions = DataAccessException.class)\r\n public void testCreateNullUser() {\r\n ActivityRecord record = new ActivityRecord();\r\n record.setActivity(sportActivity);\r\n record.setDistance(5);\r\n record.setTime(Long.MIN_VALUE);\r\n record.setUser(null);\r\n\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for a particle object that takes a coordinate value and a life value, the latter being used to determine how long the particle stays on the level for. | public Particle(int x, int y, int life) {
this.x = x;
this.y = y;
this.xDouble = x;
this.yDouble = y;
this.zDouble = 0.0;
this.life = life + (random.nextInt(life) - life / 2);
this.sprite = particle_normal;
// Sets the distance delta for the particle to t... | [
"public Particle(Vector position) {\n\t\tsuper(position);\n\t\tthis.position = position;\n\t}",
"public Particle(double xstart, double ystart, double velx, double vely, Compound c) {\r\n\t\tpos = new Vector(xstart, ystart);\r\n\t\tvel = new Vector(velx, vely);\r\n\t\tcompound = c;\r\n\t\tactivated = false;\r\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct the dictionary from a given corpus. | public void constructDictionary() throws IOException {
File file = new File(this.corpusFolderPath);
// Recursively process all the text files in the corpus
processCorpus(file);
// If using temporal input, determine the maximumFrequency
if(this.useTimestampInput) {
this.maximumFrequency = Collections.m... | [
"protected abstract Corpus createCorpus();",
"public void constructDictionary() throws IOException {\n\n\t\tFile file = new File(this.corpusFolderPath);\n\n\t\t// Recursively process all the text files in the corpus\n\t\tprocessCorpus(file);\n\n\t\t// Fill out the values of ID in the final dictionary\n\t\t// sort... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end rule__BuiltInNode__Group_2__1__Impl $ANTLR start rule__BuiltInNode__Group_2_1__0 ../fr.irisa.cairn.model.mathematica.xtext.ui/srcgen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:810:1: rule__BuiltInNode__Group_2_1__0 : rule__BuiltInNode__Group_2_1__0__Impl rule__BuiltInNode__Gro... | public final void rule__BuiltInNode__Group_2_1__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:814:1: ( rule__BuiltInNo... | [
"public final void rule__BuiltInNode__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:753:1: ( rule_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the nodes table | private JTable getNodesTable() {
return (JTable)_mainWindowReference.getView( "NodesTable" );
} | [
"public Table getNodeTable() {\n return tableNodes;\n }",
"private NodesTableModel getNodesTableModel() {\n\t\treturn (NodesTableModel)getNodesTable().getModel();\n\t}",
"public AttributeTable getNodeTable();",
"public SetupTableModel getTableModelNodes() {\n\t\tif (tableModelNode == null) {\n\t\t\tVec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate a random target that is not in my players range. | private ID getRandomTarget() {
Random rnd = new Random();
ID id = null;
do {
//get random id in [ 0 2^160-1 ]
id = ID.valueOf(new BigInteger(160, rnd));
} while (myPlayer.containsID(id)); //check if random id is in our own area.
return id;
} | [
"public Player getRandomTarget() {\n\t\tPlayer target = null;\n\t\tint rand = Battleground.getRandomNumber(1, 5);\n\t\tswitch (rand) {\n\t\tcase 1:\n\t\t\tif (Battleground.captainAmerica.stillAlive()) {\n\t\t\t\ttarget = Battleground.captainAmerica;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tcase 2:\n\t\t\tif (Battleground.hawk... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Validate the VDB Name for a new VDB. Checks for valid characters and checks against current list for duplicates. | private boolean validateVDBName() {
boolean statusOK = true;
String statusStr = "OK";
// Validate the entered VDB name
String newVDBName = newVDBNameTextBox.getText();
if(newVDBName==null || newVDBName.trim().length()==0) {
statusStr = messages.statusEnterNameForVDB();
statusOK = false;
}
// C... | [
"@EventHandler(\"btn-new-vdb\")\n public void onNewVdbClick(ClickEvent event) {\n NewVdbDialog dialog = newVdbDialog.get();\n dialog.setCurrentVdbNames(this.allVdbNames);\n \n // Value change is fired with vdbName and value on submit\n dialog.addValueChangeHandler(new ValueChan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64encoded string representation of the provenance bytes is... | java.lang.String getProvenanceBytes(); | [
"public java.lang.String getProvenance() {\n java.lang.Object ref = provenance_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n provenance_ = s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the long hw1_1000000LOCInterface1Method0(String,short,short) method test. | @Test
public void testHw1_1000000LOCInterface1Method0_4()
throws Exception {
hw1_1000000LOC20 fixture = new hw1_1000000LOC20();
fixture.f2 = '';
fixture.f3 = new byte[] {};
fixture.f0 = 1L;
fixture.f0 = 1L;
fixture.f1 = new char[] {};
String var0 = "";
short var1 = (short) 1;
short var2 = (short) ... | [
"@Test\n\tpublic void testHw1_1000LOCInterface1Method0_1()\n\t\tthrows Exception {\n\t\thw1_1000LOC19 fixture = new hw1_1000LOC19();\n\t\tfixture.f0 = new short[] {};\n\t\tint var0 = 1;\n\t\tfloat var1 = 1.0f;\n\t\tshort var2 = (short) 1;\n\t\tdouble var3 = 1.0;\n\t\tlong var4 = 1L;\n\t\tlong var5 = 1L;\n\t\tfloat ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form jFramePrincipal | public jFramePrincipal() {
initComponents();
} | [
"public jframePrincipal() \n {\n initComponents();\n }",
"public JFramePrincipal() {\n initComponents();\n }",
"public JFramePrincipal() {\n initComponents();\n controladorPrincipal = new ControladorPrincipal(this);\n }",
"public JfrmPrincipal() {\n initComponent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts provided KiloHertz value to Hertz. | public static double kiloHertzToHertz(final double kiloHertz) {
return kiloHertz * HERTZS_PER_KILOHERTZ;
} | [
"public static double hertzToKiloHertz(final double hertz) {\n return hertz / HERTZS_PER_KILOHERTZ;\n }",
"protected static float toHertz(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_HZ:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_KHZ:\n \t\t\treturn (value ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Need to return parent operation authorizable. E.g. /operation/processor/xxxx > /operation/processgroup/yyyy > /operation/processgroup/root | @Override
public Authorizable getParentAuthorizable() {
if (baseAuthorizable.getParentAuthorizable() == null) {
return null;
} else {
return new OperationAuthorizable(baseAuthorizable.getParentAuthorizable());
}
} | [
"public abstract OperatorImpl getParent();",
"java.lang.String getOperation();",
"String getAuthenticationModelParentName();",
"java.lang.String getOperationId();",
"String getParentGroupId();",
"protected abstract int getParentContainerId();",
"String getOperationId();",
"public CLIRequest getParent(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apresenta o menu caso seja Voluntario | private String showMenuVoluntario(){
String opcao = "";
System.out.println("Bem Vindo : " + this.nome + " Disponivel? "+this.estado+" Ocupado? "+this.ocupado+"\n");
System.out.println("1 -> Ver o historico de encomendas aceites.");
if(!this.ocupado) System.out.println("2 -> Mudar Es... | [
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"private void showParkMenu() {\r\n ArrayList<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "additionalField2" element | org.apache.xmlbeans.XmlString xgetAdditionalField2(); | [
"org.apache.xmlbeans.XmlString xgetAdditionalField1();",
"org.apache.xmlbeans.XmlString xgetAdditionalField3();",
"java.lang.String getAdditionalField2();",
"void xsetAdditionalField2(org.apache.xmlbeans.XmlString additionalField2);",
"java.lang.String getAdditionalField1();",
"public String getExtfield2(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The main method: 1) Read the wikipedia file 2) Filter the names 3) Parse the content of the file into useful data structures | public void filter_and_parse(String filename) {
List<String> lines = read_wikipedia_file(filename);
lines = filter_wikipedia_file(lines);
num_entities = lines.size();
parse_wikipedia_file(lines);
} | [
"public static void main(String args[]) throws IOException {\n // Uncommment the following line for your convenience. Comment it out\n // again before submitting!\n // args = new String[] { \"c:/fabian/data/wikipedia/wikipedia_pos.txt\", \"c:/fabian/data/my-output.txt\" };\n // args = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setSortNode method, of class TreeTableColumnBuilder. | @Test
public void testSetSortNode() {
writeBanner(getMethodName());
} | [
"DeviceTreeDataComparator(Tree tree, TreeColumn sortColumn)\n {\n if (tree.getColumn(0) == sortColumn) sortMode = SORTMODE_NAME;\n else if (tree.getColumn(1) == sortColumn) sortMode = SORTMODE_SIZE;\n else sortMode = SORTMODE_NAME;\n }",
"@Test\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'REVENUE_DEFAULT_IND' field. | public void setREVENUEDEFAULTIND(java.lang.CharSequence value) {
this.REVENUE_DEFAULT_IND = value;
} | [
"public org.LNDCDC_NCS_TCS.ORDER_TYPES.apache.nifi.LNDCDC_NCS_TCS_ORDER_TYPES.Builder setREVENUEDEFAULTIND(java.lang.CharSequence value) {\n validate(fields()[7], value);\n this.REVENUE_DEFAULT_IND = value;\n fieldSetFlags()[7] = true;\n return this;\n }",
"public java.lang.CharSequence get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column DEVELOP.T_CUST_PREFERENTIAL.FCREATETIME | public Date getFcreatetime() {
return fcreatetime;
} | [
"public Long getCreatetime() {\r\n return createtime;\r\n }",
"public Long getCreatetime() {\n return createtime;\n }",
"@Generated(value = \"org.mybatis.generator.api.MyBatisGenerator\", date = \"2020-04-12T12:59:05.835+09:00\", comments = \"Source field: USER.createdTime\")\r\n public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Publi' containment reference. If the meaning of the 'Publi' containment reference isn't clear, there really should be more of a description here... | Publication getPubli(); | [
"Publication getPubliRef();",
"public Pub getPub() {\n return pub;\n }",
"Object getContainedValue();",
"public Integer getPubid()\n {\n return this.pubid;\n }",
"public java.lang.Integer getPubid () {\r\n\t\treturn pubid;\r\n\t}",
"public Boolean getContainment() {\r\n\t\treturn co... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles uriArg in whatever way it finds fit. | public void handleUri(String uriArg); | [
"public boolean modifyURIArgContent(URLArg urlArg);",
"public T caseUri(Uri object)\n {\n return null;\n }",
"public T caseUri(Uri object) {\n\t\treturn null;\n\t}",
"void setURI(java.lang.String uri);",
"protected void addURI(URI uri) {\n finder.addURI(uri);\n }",
"public void setUri(URI u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column public.Quest14.classtype | public String getClasstype() {
return classtype;
} | [
"public Class getTypeClass() {\r\n\t\treturn (typeClass);\r\n\t}",
"public Class getTypeColumn(String nameColumn);",
"public void setClasstype(String classtype) {\n this.classtype = classtype == null ? null : classtype.trim();\n }",
"public String getClassType() {\n return classType;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize with iBatis XML config file. | private void initializeIBatis() {
Reader resourceAsReader = null;
try {
resourceAsReader = Resources.getResourceAsReader("sourceCoverageMap/xml/dbo/ibatisconfig.xml");
sessionFactory = new SqlSessionFactoryBuilder().build(resourceAsReader, "mstein");
resourceAsReader.close();
} catch ... | [
"public XmlLinpConfiguration(File xmlConfig){\r\n initialize(xmlConfig);\r\n\t}",
"public XmlLinpConfiguration(InputStream xmlConfig){\r\n\t initialize(xmlConfig);\r\n\t}",
"public void configure() {\n\t\tconfigure(\"conf/jais.xml\");\n\t}",
"public void init() {\n readConfiguration();\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add DONE objects to close the running writers | protected void addDoneObjects() {
IntStream.range(0, prefs.getNumThreads()).forEach(i -> queue.offer(DONE));
} | [
"private void writingComplete() {\n if (closeAfterWriting) {\n endConnection();\n TTTEditor.getInstance().removeFileConnector(this);\n closeAfterWriting = false;\n }\n }",
"public void close() {\n commit();\n stopped = true;\n awakenWriteThrea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the map display mode. | public MapDisplayMode getMapDisplayMode() {
return this.mapDisplayMode;
} | [
"public int getMapMode() {\r\n return MapMode;\r\n }",
"public String getDisplayMode() {\n\t\treturn displayMode;\n\t}",
"public int getDisplayMode() {\n return this.displayMode;\n }",
"public byte getDisplay_mode() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the setter method. this will set the masterNodes Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. Default value when not specified in API or module is interpreted by Avi Controller as null. | public void setMasterNodes(List<String> masterNodes) {
this.masterNodes = masterNodes;
} | [
"@Override\n public void setMaster(NIONode master) {\n }",
"public Builder withMasterNode() {\n return addCleanApiParameter(\"master_node\");\n }",
"public void setMaster(IveObject master);",
"public void setMasterMotorSafety(boolean enabled);",
"public org.apache.spark.SparkConf se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "rAph" element | public org.apache.xmlbeans.XmlDouble xgetRAph()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlDouble target = null;
target = (org.apache.xmlbeans.XmlDouble)get_store().find_element_user(RAPH$6, 0);
return target;
}
} | [
"org.apache.xmlbeans.XmlString xgetAlgoritmo();",
"org.apache.xmlbeans.XmlString xgetProductEan();",
"public double getRAph()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the brojIndeksa property. | public int getBrojIndeksa() {
return brojIndeksa;
} | [
"public int getBrojPoruka() {\n return brojPoruka;\n }",
"public int getZahtevBrojOdbijenih() {\n return zahtevBrojOdbijenih;\n }",
"public int getZahtevBrojUsvojenih() {\n return zahtevBrojUsvojenih;\n }",
"public int getZahtevBrojOdbacenih() {\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The list of tag groupbys at the time of evaluation. Since alert queries are not parsed until evaluation, this can be used to determine which tags were actually queried. It also enables distinguishing series which differ by a groupby. Otherwise, all nonfiring variants of the same query would be identical since their fir... | ImmutableList<String> getGroupBys(); | [
"public String getFilterTagGroups() {\n return filterTagGroups;\n }",
"@Override\n public String getSPARQLGroupBy()\n {\n return \"\";\n }",
"public String getGROUP_BY() {\r\n return GROUP_BY;\r\n }",
"public static String[] getGroupedBarStat1() {\n return new String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a tag object representing the specified EPC (no CRC) | public TagData(String epc)
{
this(epc, null);
} | [
"public TagData(String epc, String crc)\n {\n int len, start;\n\n len = epc.length();\n\n if ((len % 2) != 0)\n {\n throw new IllegalArgumentException(\"Hex string is not an integer number of bytes\");\n }\n\n start = 0;\n if (epc.regionMatches(true, 0, \"0x\", 0, 2))\n {\n start ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the quality of service | public int qualityOfService()
{
return qualityOfService;
} | [
"java.lang.String getQuality();",
"int getQuality();",
"float getQuality();",
"public Integer getQuality() {\n return quality;\n }",
"public String getQuality()\n\t{\n\t\treturn quality.getText();\n\t}",
"public int getQuality() {\n return this.quality;\n }",
"float getQualityValue(Med... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the number of locations in the graph | public int getNumLocations() {
return locations.size();
} | [
"int getGraphOutputNodeInfoCount();",
"int getGraphInputNodeInfoCount();",
"public int getPositionsCount();",
"int getGeoArrayCount();",
"private static int countVertices() {\n int count = 0;\n\n for (int index = 0; index < 26; index++) {\n if (graph[index] != null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
concrete factory to create a munny object defaults to standard settings. | @Override
public MunnyInterface createMunnyInstance(UserInterface user) {
return new MunnyModel(new Date(), 52, 7, user);
} | [
"@Override\n public Animal createAnimal() {\n return new Monkey();\n }",
"Mimo createMimo();",
"protected MoneyFactory() {\n\t}",
"Thing createThing();",
"public ShadowFactory() {\n\n }",
"public WorldFactory() {\n\n\t}",
"public T create();",
"@Override\r\n\tpublic CMObject newInstanc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fetch all the budget records from the tables create instance of each budget store it to the budgets variable | public void loadBudgetList(){
budgets = db.getBudgetsAlt();
if(!budgets.isEmpty()){
System.out.println("Data is loaded from DB successfully");
}
} | [
"private void getBudget()\n {\n \tm_WhsBudget = 0;\n\n try {\n m_CurAction = \"getting budget\";\n m_Budgets.setDate(1, m_Yesterday);\n m_Budgets.setInt(2, m_WhsId);\n m_Budgets.execute();\n m_WhsBudget = m_Budgets.getInt(3);\n }\n catch ( Exception e ) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Autogenerated Javadoc The Interface DataPicker. | public interface DataPicker {
/**
* Gets the.
*
* @return the string
*/
public String get();
/**
* Inits the.
*
* @param fetchAgent the fetch agent
*/
void init(PickAgent fetchAgent);
} | [
"public CustomPickerDataSource () {\n\n CustomView earlyMorningView = new CustomView(\"Early Morning\", UIImage.create(\"12-6AM.png\"));\n CustomView lateMorningView = new CustomView(\"Late Morning\", UIImage.create(\"6-12AM.png\"));\n CustomView afternoonView = new CustomView(\"Afternoon\", UI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draws a 50% transparent film over the window. | protected final void drawFilm(final Graphics theGraphics, final Color theColor) {
final Graphics2D g2d = (Graphics2D) theGraphics;
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, FILM_OPACITY));
g2d.setColor(theColor);
g2d.fillRect(0, 0, (int) getSize().getWidth(), (... | [
"@Override\r\n\tpublic void paintImmediately(int x, int y, int w, int h) {\n\t}",
"public void draw(){\n for(int j=0;j<h;j++){\n for(int i=0;i<w;i++){\n stroke(noise((float)i*noiseResolution,(float)j*noiseResolution,frameCount*timeResolution)*255);\n point(i,j);\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DBServer__Group_12__1__Impl" $ANTLR start "rule__Collection__Group__0" InternalMyDsl.g:12803:1: rule__Collection__Group__0 : rule__Collection__Group__0__Impl rule__Collection__Group__1 ; | public final void rule__Collection__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:12807:1: ( rule__Collection__Group__0__Impl rule__Collection__Group__1 )
// InternalMyDsl.g:12808:2: rule__Collection__Group__0__Imp... | [
"public final void rule__DBServer__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:12024:1: ( rule__DBServer__Group__0__Impl rule__DBServer__Group__1 )\n // InternalMyDsl.g:12025:2: rule__DBServer__Group__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the sides in an array | public Line2D.Double[] getSides() {
return prism.getSides();
} | [
"public double[] readSides() {\r\n double[] sides = {getSide(\"first\"), getSide(\"second\"), getSide(\"third\")};\r\n return sides;\r\n }",
"public static int[] getSides(String[] sSides) {\n\n int[] sides = new int[2];\n try {\n sides[0] = Integer.parseInt(sSides[0]);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method sets a space on the board based on the position and turn that is passed in | public void setBoardSpace(int i, int j, Box turn){
if(turn == Box.X){
board[i][j] = Box.X;
}
if(turn == Box.O){
board[i][j] = Box.O;
}
} | [
"void setBoard(int x, int y, int val);",
"public void takeTurn(int row, int col)\n {\n if(turn % 2 == 0) // if you go first you will be an X \n {\n board[row +1][col +1] = \"X\";\n \n }\n if(turn % 2 == 1) // if you go second you will be a O \n {\n b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when the DataSyncActivity is first created. It creates the activity according to its layout defined in /res/layout/activity_data_sync.xml. It instantiates some classscope variables (bind by ButterKnife) and associates the activity with a viewmodel instance. | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Inflate the LocationActivity layout into NavigationDrawerActivity's FrameLayout placeholder.
getLayoutInflater().inflate(R.layout.activity_data_sync, frameLayout);
// Call ButterKni... | [
"private void initViewModel() {\n dataSyncViewModel = new ViewModelProvider(this).get(DataSyncViewModel.class);\n }",
"private void initiateActivity() {\r\n\t\tif (application == null) {\r\n\t\t\tthis.application = SmartApplication.REF_SMART_APPLICATION;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tif (applicatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates intent to map for question 4 | public void intentForQuestion4 (View view){
Intent question4 = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("https://www.google.pl/maps/place/Cape+Canaveral+Air+Force+Station/@28.4880013,-80.5730528,1691m/data=!3m1!1e3!4m5!3m4!1s0x88e0a4e74e6a8abb:0x2a16683cb4a44f!8m2!3d28.4886723!4d... | [
"IntentMap createIntentMap();",
"private Intent createIntent() {\n Intent intent = new Intent(this, GameOverActivity.class);\n intent.putExtra(POINTS, presenter.getPoints() + points);\n intent.putExtra(PASS_USER, user);\n intent.putExtra(CORRECT, correct);\n intent.putExtra(INCO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We don't need to extensively test DynamicMessage's handling of extensions because, frankly, it doesn't do anything special with them. It treats them just like any other fields. | public void testDynamicMessageExtensionAccessors () throws Exception {
Message.Builder builder = DynamicMessage.newBuilder (TestAllExtensions.getDescriptor ());
extensionsReflectionTester.setAllFieldsViaReflection (builder);
Message message = builder.build ();
extensionsReflectionTester.... | [
"@Test\n public void testUnknownExtensions() throws Exception {\n\n TestEmptyMessageWithExtensions message =\n TestEmptyMessageWithExtensions.parseFrom(allFieldsData);\n\n assertThat(unknownFields.asMap()).hasSize(message.getUnknownFields().asMap().size());\n assertThat(allFieldsData).isEqualTo(mes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ForStmt__Group__1" $ANTLR start "rule__ForStmt__Group__1__Impl" InternalMGPL.g:2806:1: rule__ForStmt__Group__1__Impl : ( '(' ) ; | public final void rule__ForStmt__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMGPL.g:2810:1: ( ( '(' ) )
// InternalMGPL.g:2811:1: ( '(' )
{
// InternalMGPL.g:2811:1: ( '(' )
// I... | [
"public final void rule__ForStmt__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:2771:1: ( rule__ForStmt__Group__0__Impl rule__ForStmt__Group__1 )\n // InternalMGPL.g:2772:2: rule__ForStmt__Group__0__Impl ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves all components from an another container into this container. The components are removed from source. | public void moveComponentsFrom(ComponentContainer source); | [
"public void removeAllComponents();",
"private void replaceContainer(Container from, Container to) {\n to.setSize(from.getSize());\n to.setLocation(from.getLocation());\n to.setVisible(true);\n from.setVisible(false);\n }",
"@Override\n\t\tpublic void perform(Component source) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field670' field | public java.lang.CharSequence getField670() {
return field670;
} | [
"public java.lang.CharSequence getField670() {\n return field670;\n }",
"public java.lang.CharSequence getField668() {\n return field668;\n }",
"public java.lang.CharSequence getField668() {\n return field668;\n }",
"public java.lang.CharSequence getField697() {\n return field697;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Field Path'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseFieldPath(FieldPath object)
{
return null;
} | [
"public T casePathCmd(PathCmd object)\n {\n return null;\n }",
"public T casePath(Path object) {\n\t\treturn null;\n\t}",
"public static Object getFieldValueWithPath(Object object, String path) {\n\n int lastDot = path.lastIndexOf('.');\n\n if (lastDot > -1) {\n\n String parentPath... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
negative test edit appt [must have a service] | @Test
public void testEditAppointmentNegative(){
//CREATING TIMESLOT
Calendar c = Calendar.getInstance();
c.set(2021, Calendar.MAY, 1, 9, 0, 0);
Date appointmentDate = new Date(c.getTimeInMillis());
LocalTime startTime = LocalTime.parse("09:00");
c.set(2021, Calendar... | [
"AddOnService edit(AddOnService addOnService);",
"public void testService() {\n\n\t\ttry {\n\t\t\tString nextAction = \"next action\";\n\t\t\trequest.setAttribute(\"NEXT_ACTION\", nextAction);\n\t\t\tString nextPublisher = \"next publisher\";\n\t\t\trequest.setAttribute(\"NEXT_PUBLISHER\", nextPublisher);\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checking the Camera and Read_Contacts permissions | public boolean checkPermission() {
int cameraPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA);
int readContactPermissionResult = ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.READ_CONTACTS);
return cameraPe... | [
"private void checkContactsReadPermission() {\n\n // current activity\n if (ContextCompat.checkSelfPermission(getActivity(),\n Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {\n\n // permission can be requested here\n ActivityCompat.reques... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the _updateWidgets method from OtItemEditor in order to setup the widgets to show the current values of the item. | protected void _updateWidgets()
{
// Show the title
String title = _spItem.getTitleAttr() ;
if( title != null )
_obsTitle.setText( title ) ;
else
_obsTitle.setText( "" ) ;
String state = _avTab.get( "state" ) ;
if( state == null )
_obsState.setText( "Not in Active Database" ) ;
else
_obsStat... | [
"private void updateMEWidgets()\n\t{\n\t\tint repoIndex = 0;\n\t\t// List all items\n\t\tfor( int index = 0; index < this.widgetCount; ++index )\n\t\t{\n\t\t\tIAEItemStack stack = this.repo.getReferenceItem( repoIndex++ );\n\n\t\t\t// Did we get a stack? \n\t\t\tif( stack != null )\n\t\t\t{\n\t\t\t\t// Set the item... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setBases method, of class CBases. | @Test
public void testSetBases_Bases_datos() {
System.out.println("setBases");
Bases_datos base = null;
CBases instance = new CBases();
instance.setBases(base);
// TODO review the generated test code and remove the default call to fail.
// fail("The test case is... | [
"@Test\r\n public void testSetBaseset() {\r\n System.out.println(\"setBaseset\");\r\n String baseset = \"\";\r\n CBases instance = new CBases();\r\n instance.setBaseset(baseset);\r\n // TODO review the generated test code and remove the default call to fail.\r\n // fail(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the e s f entity states where className = &63; and esfStateId = &63;. | public java.util.List<it.ethica.esf.model.ESFEntityState> findByESFEntityStateC_S(
java.lang.String className, long esfStateId)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public java.util.List<it.ethica.esf.model.ESFEntityState> findByESFEntityStateCN(\n\t\tjava.lang.String className)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public it.ethica.esf.model.ESFEntityState fetchByESFEntityStateC_PK_S(\n\t\tjava.lang.String className, long classPK, long esfStat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all order items in the database with specified seller id | @GetMapping(value="/sellerId={id}", produces=MediaType.APPLICATION_JSON_VALUE)
public List<OrderItem> getOrderItemsBySellerId(@PathVariable("id") int id) {
List<OrderItem> orderItems = orderItemService.findOrderItemsBySellerId(id);
for (OrderItem orderItem : orderItems) {
orderItem.getItem().setSeller(null);
... | [
"@RequestMapping(\"/OrdersBySeller/{id}\")\n\tpublic List<Order> getOrdersBySeller(@PathVariable(\"id\") String id) {\n\t\t//get all order's details of a specific seller\n\t\tList<OrderDetail> alldetails = (List<OrderDetail>)orderDetailRepository.findBySeller(id);\n\t\t// Retrieve ids of orders f\n\t\tList<String> ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates whether or not the models of this type have been loaded. When this is true load().isDone() will also be true. NOTE there may still be an empty list returned, but it means there are no devices of that type associated with this place. | public boolean isLoaded() {
ClientFuture<?> load = loadRef.get();
return load != null && load.isDone();
} | [
"public boolean isModelLoaded() {\n\t\treturn this.isModelLoaded;\n\t}",
"public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}",
"public boolean isAllLoaded() {\n return allLoaded;\n }",
"public boolean isLoaded() {\n return this.isLoaded;\n }",
"public boolean isLoade... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The default value for excludeunlistedclasses was modified in JPA 2.0 from false to true. Set the default based upon the persistence version to preserve behavior of preJPA 2.0 applications. | private void setExcludeUnlistedClasses(String value) {
if (!_excludeUnlistedSet) {
BigDecimal version = getPersistenceVersion();
boolean excludeUnlisted;
if (version.compareTo(VERSION_1_0) > 0) {
excludeUnlisted = !("false".equalsIgnoreCase... | [
"List<T> withExcludeClassInterceptor(List<T> par);",
"public void setNewExcludedExtensions(List<String> excludedExtenions) {\n\t\tthis.filter = new Filter(excludedExtenions);\n\t}",
"final public void setExcludePackages(ArrayList<String> excludeList) {\r\n String myPackageFormat = getPackageFormat() + \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new BinarySearchTree and sets root to null | public BinarySearchTree(){
root=null;
} | [
"public BinarySearchTree(){\n this.root =null;\n this.size = 0;\n }",
"public BST() {\n this.root = null;\n }",
"public BST(){\n\t\tthis.root = null;\n\t}",
"public BST()\r\n\t{\r\n\t\troot = null;\r\n\t}",
"public BinaryTree() {\r\n\t\troot = null;\r\n\t\tcount = 0;\r\n\t}",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given a sentence with 3 words get the second word Steps: second word is between first space and last space getting location of space remind me of indexOf getting string inside another string by beginning and ending index remind me of substring 01234567890 | public static void main(String[] args) {
String sentence = "I Love Java" ;
String secondWord ;
int firstSpaceIndex = sentence.indexOf(" ");
System.out.println("firstSpaceIndex = " + firstSpaceIndex);
int lastSpaceIndex = sentence.lastIndexOf(" ");
System.out.println("las... | [
"public static void main(String[] args) {\n String word = \"Sezenrana\" ;\n\n int halfIndex = word.length()/2 ;\n // int halfIndexPlus1 = n.length()/2+1;\n // int halfIndexMini1 = n.length()/2-1;\n\n if(word.length()%2==1 && word.length()>5){\n System.out.println(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When visiting each node, display that node's (character) value first and then is key (related to the frequency) The special case for \t and \n apply here too. | @Override
public void visit(Integer key, Character value) {
StringBuffer toPrint = new StringBuffer();
if ((int) value == 9) {
toPrint.append("\\t");
} else if ((int) value == 10) {
toPrint.append("\\n");
} else {
toPrint.append(value);
}
toPrint.append(":" + key);
System.out.prin... | [
"public void printFrequencyTable(){\n System.out.println(\"\\n@@@@@@@@@@ Frequency Table @@@@@@@@@@@\");\n System.out.println(\"Symbol: Frequency: Encoding:\");\n for(int i = frequency.size(); i > frequency.size(); i++){\n System.out.print(\"\");\n }\n Set set ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
seta o valor de fornecedor_produto | public void setFornecedor_produto(int pFornecedor_produto){
this.fornecedor_produto = pFornecedor_produto;
} | [
"public void setProduto(com.gvt.www.metaData.configuradoronline.DadosProduto produto) {\r\n this.produto = produto;\r\n }",
"private void alterarProduto() {\n modelFornecedor = controllerFornecedor.getFornecedorController(uJComboBoxFornecedor.getSelectedItem().toString());\n modelProdutos.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes an existing ProcessSpecification object at the specified index. | public ProcessSpecification removeProcessSpecification(int index)
{
return (ProcessSpecification)_objProcessSpecification.remove(index);
} | [
"public boolean removeProcessSpecification(ProcessSpecification obj)\n {\n return _objProcessSpecification.remove(obj);\n }",
"public void removeProcessstep(int index) throws java.lang.IndexOutOfBoundsException {\n\t\t_Processstep =null;\n\t\ttry{\n\t\t\tgetItem().removeChild(SCHEMA_ELEMENT_NAME + \"/process... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new line object to the game, drawn from (x, y) to (x2, y2). Returns the new GameLine. | public GameLine addLine(double x, double y, double x2, double y2); | [
"public DrawableObject addLine(int x0, int y0, int x1, int y1) {\n\t\treturn addObject(new Line(x0, y0, x1, y1, currColor));\n\t}",
"public void drawLine(int x1, int y1, int x2, int y2);",
"public void drawLine(final double x1, final double y1, final double x2,\n\t\t\tfinal double y2) {\n\t\tfinal EpsPoint star... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if has "EndDateTime" element | public boolean isSetEndDateTime()
{
synchronized (monitor())
{
check_orphaned();
return get_store().count_elements(ENDDATETIME$12) != 0;
}
} | [
"public boolean isSetEnd_time() {\n return this.end_time != null;\n }",
"public boolean isSetEndDate()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ENDDATE$10) != 0;\n }\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'responding_product_id' field | public com.autodesk.ws.avro.Call.Builder clearRespondingProductId() {
responding_product_id = null;
fieldSetFlags()[0] = false;
return this;
} | [
"public com.autodesk.ws.avro.Call.Builder clearRequestingProductId() {\n requesting_product_id = null;\n fieldSetFlags()[1] = false;\n return this;\n }",
"public void setRespondingProductId(java.lang.CharSequence value) {\n this.responding_product_id = value;\n }",
"public com.autodesk.ws.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the osType value for this UpdateSnapshotRequest. | public com.profitbricks.api.ws.OsType getOsType() {
return osType;
} | [
"public String getOsType() {\n\t\treturn osType;\n\t}",
"public SnapshotUpdate setOsType(OperatingSystemTypes osType) {\n this.osType = osType;\n return this;\n }",
"com.google.ads.googleads.v14.enums.AppUrlOperatingSystemTypeEnum.AppUrlOperatingSystemType getOsType();",
"public OperatingSyst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |