query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the type value from a string array resource | private String getTypeValue(int index) {
Resources r = getResources();
String[] values = r.getStringArray(R.array.tagfilter_type_values);
return values[index];
} | [
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a confidence string that the beacon analysis is correct This is an approximation, but can be used carefully to filter out random noise. Also, only certain analysis methods provide a confidence this will then return zero. | public String getConfidenceString() {
final DecimalFormat format = new DecimalFormat("0.000");
return !Double.isNaN(confidence) ? format.format(MathUtil.coerce(0, 1, getConfidence()) * 100.0f) + "%" : "N/A";
} | [
"public String toString() {\n return Integer.toString(this.confidence);\n }",
"public double getConfidence() {\n return !Double.isNaN(confidence) ? MathUtil.coerce(0, 1, confidence) : 0.0;\n }",
"float getConfidence();",
"public double confidence() {\n return this.confidence... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to check, initialize, and increase the timestamp of vector clock. | private void incrementVectorClock() {
if (!this.vectorClock.containsKey(Driver.replica.getId())) {
this.vectorClock.put(Driver.replica.getId(), 0);
}
this.vectorClock.put(Driver.replica.getId(),
this.vectorClock.get(Driver.replica.getId()) + 1);
} | [
"VectorClock getCurrentVectorClock();",
"public VectorClock() {\n this(new ArrayList<ClockEntry>(0), System.currentTimeMillis());\n }",
"public static void initTime(){\n\t\tprevTime = System.nanoTime();\n\t}",
"public static void init() \r\n {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form PhotometryFilterBrowser | public PhotometryFilterBrowser() throws Exception {
initComponents();
Container panel = new PhotometryFilterBrowsePanel(false);
this.setContentPane(panel);
this.setSize(558, 478);
} | [
"private JPanel buildFilterPanel() {\n\tFormLayout layout = new FormLayout(\"p,3dlu,p,3dlu,p,3dlu,p,3dlu,p\", \"p\");\n\tPanelBuilder builder = new PanelBuilder(layout);\n\tCellConstraints cc = new CellConstraints();\n\t// builder.addLabel(\"Produktområde:\", cc.xy(1, 1));\n\t// builder.add(comboBoxProductAreaGroup... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor. Creates a sphere with the specified radius, number of slices and stacks. | public Sphere(Vector3d center, double radius, int numSlices, int numStacks) {
this.center = center;
this.radius = radius;
this.numSlices = numSlices;
this.numStacks = numStacks;
} | [
"public Sphere(float radius) {\n this.radius = radius;\n }",
"public Sphere(double radius) {\n this(new Vector3d(0, 0, 0), radius, 16, 8);\n }",
"public void makeSphere (float radius, int slices, int stacks)\n {\n\t float fractionSlices=(float)(2*Math.PI)/slices;\n\t float fractionStack... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes rdBtnAsc | private JRadioButton getRdBtnAsc() {
if (rdBtnAsc == null) {
rdBtnAsc = new UIRadioButton();
rdBtnAsc.setBounds(new Rectangle(228, 182, 64, 20));
rdBtnAsc.setText(StringResource.getStringResource("miufo1001305"));//升序
rdBtnAsc.addActionListener(this);
}
return rdBtnAsc;
} | [
"private void editButtonInitialization() {\n btnEditResident = new JButton[adapter.getResidents().size()];\n\n for (int i = 0; i < adapter.getResidents().size(); i++) {\n btnEditResident[i] = new JButton();\n btnEditResident[i].setBackground(lightgrey);\n btnEditReside... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this function uses the size of the first argument oldMatrx no i in matrx. naming convention used for variable name of input paramater args this naming convention is consistant throughout | public void negPopulate(Integer[][] oldMatrx, Integer[][] newMatrx, Show theShow, Scanner s) {
//Scanner s = new Scanner(System.in);
int val = oldMatrx.length;
for (int i = 0; i < val; i++) {
for (int j = 0; j < val; j++) {
newMatrx[i][j] = (oldMatrx[i][j])*(-1);
... | [
"private static native void update_0(long nativeObj, long src_mat_nativeObj, long labels_nativeObj);",
"public void lagAllInput(int lag){\r\n\t\tupdateOldInMatrix();\r\n\t\t//lag all inputs as much as the lag\r\n\t\tint newRows = rows-lag;\r\n\t\tdouble[][] tempMatrix = new double[newRows][columns];\r\n\t\tfor(In... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load a MessageResource object using the Locale and messageKey as search parameters. | public MessageResource loadMessageResourceForLocale(String messageKey, String locale) throws MessageResourceLoadException; | [
"MessageResources getMessageResources(String key);",
"public MessageResource load(Long messageResourceID, Long loggedInUserId) throws MessageResourceLoadException, AuthorisationException, InvalidUserIDException;",
"public List<MessageResource> listMessageResourceByMessageKey(String messageKey);",
"public List... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return whether |deriv| has root category (for floating parser) | public boolean isRootCat() {
return cat.equals(Rule.rootCat);
} | [
"public boolean isRoot() {\n return term.isRoot();\n }",
"private boolean containsFraction() {\n return getRawFraction() != 0;\n }",
"public boolean realOrComplexRoot() {\n double discriminant = (Math.pow(b, 2)) - (4 * a * c); // this will determine the discriminant, or the va... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for property revisionFilter, equals the commandline CVS switch "r". | public String getRevisionFilter() {
return revisionFilter;
} | [
"public void setRevisionFilter(String revisionFilter) {\n this.revisionFilter = revisionFilter;\n }",
"FilterInfo setCanaryFilter(String filter_id, int revision);",
"public static String revision() { \n\t\treturn alma.CalDataOriginMod.revision.value;\n\t}",
"public String getRevision() {\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub Write a program that asks user to input int values: areaCode and localNumber. Using concatenation put together in this format and assign to String phoneNumber variable: (222)3334444 Write a print statement that displays (use phoneNumber variable ): Calling number (222)3334444 | public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
System.out.println("Enter your area code: ");
int areaCode = scan.nextInt();
System.out.println("Enter local number: ");
int localNumber = scan.nextInt();
//(617)-8202117
String phoneNumber = "(" ... | [
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int areaCode = scan.nextInt(),\n localNumber = scan.nextInt();\n\n String phoneNumber = \"(\"+areaCode+\")\"+\"-\"+localNumber;\n System.out.println(\"Calling number \"+phoneNumber);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and returns a new Dataset object from the given Element and the parent Dataset object. | private Dataset parseDataset( Element datasetElement, Dataset parent, CoordinateSystem defaultCoordinateSystem,
ElevationModel defaultElevationModel )
throws XMLParsingException,
... | [
"protected InvDatasetImpl readDataset( InvCatalogImpl catalog, InvDatasetImpl parent, Element dsElem, URI base) {\r\n\r\n // deal with aliases\r\n String name = dsElem.getAttributeValue(\"name\");\r\n String alias = dsElem.getAttributeValue(\"alias\");\r\n if (alias != null) {\r\n InvDatasetImpl ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test check player cards and region choose balcony. | @Test
public void testCheckPlayerCardsAndRegionChooseBalcony(){
testGame.setCurrentPlayer(player2);
assertEquals(false, testAction.checkPlayerCardsAndRegionChooseBalcony());
player2.addPoliticCard(new PoliticCard(Colour.BLACK));
player2.addPoliticCard(new PoliticCard(Colour.BLUE));
player2.addPoliticCard(... | [
"@Test\n\tpublic void testCheckPlayerCardsAndRegionsBalcony(){\n\t\t\n\t\ttestGame.setCurrentPlayer(player1);\n\t\tassertEquals(false, testAction.checkPlayerCardsAndRegionsBalcony());\n\t\tplayer1.addPoliticCard(new PoliticCard(Colour.BLACK));\n\t\tplayer1.addPoliticCard(new PoliticCard(Colour.BLUE));\n\t\tplayer1.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bump the count of spawns by 1. | protected void incSpawns() {
spawns++;
} | [
"void rampUpSpawns () {\r\n if (difficultyTicker < spawnRampUpInterval) {\r\n difficultyTicker++;\r\n }\r\n else {\r\n increaseSpawnRate();\r\n difficultyTicker = 0;\r\n }\r\n }",
"public void update()\n {\n // System.out.println(spawn.size... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve un long con el valor medio del array [tiempos]. | private static long mediaTiempos(long[] tiempos) {
long tiempo = 0;
for (int i = 0; i < tiempos.length; i++) {
tiempo += tiempos[i];
}
tiempo = (long) (tiempo / tiempos.length);
return tiempo;
} | [
"public abstract long[] toLongArray();",
"public long[] getLongArray1() throws MathLinkException;",
"public static int longArray() {\r\n\t\tString sCarp = System.getProperty(\"user.dir\");//Obtenemos la carpeta actual desde donde ejecutamos el código(de la carpeta del proyecto)\r\n\t\tFile carpeta = new File(sC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Renders the text of the specified iterator, using the Graphics2D context's current Paint. The iterator must specify a font for each character. The baseline of the first character is at position (x, y) in the User Space. The rendering attributes applied include the Clip, Transform, Paint, and Composite attributes. ... | public void drawString(AttributedCharacterIterator iterator, float x, float y) {
log.log(POILogger.WARN, "Not implemented");
} | [
"public void drawString(AttributedCharacterIterator iterator, int x, int y) {\r\n }",
"public void drawString(AttributedCharacterIterator iterator, float x, float y)\r\n\t{\r\n\t\t// System.out.println(\"drawString att2\");\r\n\t}",
"public void drawString(AttributedCharacterIterator iterator,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Maker Type'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseMakerType(MakerType object)
{
return null;
} | [
"public T caseType(Type object)\n {\n return null;\n }",
"public T caseType(Type object) {\n\t\treturn null;\n\t}",
"public T caseType(Type object) {\r\n\t\treturn null;\r\n\t}",
"public T caseContentsType(ContentsType object) {\n\t\treturn null;\n\t}",
"MachineType getType();",
"public T caseMicroco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this gets the monthly pay roll of the employee if the bonus status of this employee is true then give 200 bonus to monthlypayroll | public double monthlyPayroll() throws EarningsException{
int days = currentDate.monthOfYear().getMaximumValue();
int month = currentDate.getMonthOfYear();
double daily = earnings()/7;
double monthly = daily*days;
if(monthly < 0){
throw new EarningsException("Mon... | [
"float getMonthlySalary();",
"public void calculateWageForMonth() {\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\temployeeAttendanceUsingCase();\n\t\t\ttotalSalary = totalSalary + salary;\n\t\t\t// return totalSalary;\n\t\t}\n\t}",
"double calculateAppraisal(EmployeeDetails employeeDetails) {\n return emplo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes btnEliminarLayerFamily | protected JButton getBtnEliminarLayerFamily()
{
if (btnEliminarLayerFamily == null)
{
btnEliminarLayerFamily = new JButton();
btnEliminarLayerFamily.setBounds(new Rectangle(875,491,100,25));
btnEliminarLayerFamily.setText(I18N.get("GestorCapas","general.boto... | [
"private JButton getBtnEliminarLayer()\r\n {\r\n if (btnEliminarLayer == null)\r\n {\r\n btnEliminarLayer = new JButton();\r\n btnEliminarLayer.setBounds(new java.awt.Rectangle(284,223,30,30));\r\n btnEliminarLayer.setIcon(IconLoader.icon(ICONO_FLECHA_IZQUIERDA));\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get one mCombinationCutPosition by id. | @Transactional(readOnly = true)
public Optional<MCombinationCutPositionDTO> findOne(Long id) {
log.debug("Request to get MCombinationCutPosition : {}", id);
return mCombinationCutPositionRepository.findById(id)
.map(mCombinationCutPositionMapper::toDto);
} | [
"public void delete(Long id) {\n log.debug(\"Request to delete MCombinationCutPosition : {}\", id);\n mCombinationCutPositionRepository.deleteById(id);\n }",
"int getPos(final int id);",
"@Override\r\n public Cuti findById(String id) {\r\n return this.cutiDAO.getById(id);\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this user a Guest? | boolean isGuest(); | [
"public final boolean isGuest() {\n \treturn m_guest;\n }",
"public static boolean isGuestUser(Context context) {\n return false;\n }",
"@Nullable\n public Boolean getIsGuestUser() {\n return isGuestUser;\n }",
"boolean isUser();",
"public boolean isUserLoggedIn();",
"public boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SR 15133 Create a JE environment with a single log file and a checksum exception in the second entry in the log file. When an application attempts to open this JE environment, JE truncates the log file at the point before the bad checksum, because it assumes that bad entries at the end of the log are the result of inco... | @Test
public void testPostChecksumError()
throws IOException {
EnvironmentConfig config = new EnvironmentConfig();
config.setAllowCreate(true);
config.setConfigParam(EnvironmentConfig.ENV_RUN_VERIFIER, "false");
env = new Environment(envHome, config);
env.close();
... | [
"@Test\n public void testExceptions()\n throws Throwable {\n\n int logBufferSize = ((int) EnvironmentParams.LOG_MEM_SIZE_MIN) / 3;\n int numLogBuffers = 5;\n int logBufferMemSize = logBufferSize * numLogBuffers;\n int logFileMax = 1000;\n int okCounter = 0;\n\n tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether FooterView is refreshing. | public boolean isFooterRefreshing() {
return isFooterRefreshing;
} | [
"public boolean isFooterRefreshEnabled() {\n return isFooterRefreshEnabled;\n }",
"public boolean isAutoFooterRefreshDisabled() {\n return footerRefreshDisabled;\n }",
"boolean isRefreshOn();",
"public boolean isFooter() {\n return isFooter;\n }",
"public boolean isFooterVisible() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Setting the word in the buffer and also setting up the _stemmerBufferLength | private void setupBuffer(String word)
{
stemmerIndexes.stemmerBufferLength = word.length();
stemmerBuffer = new char[stemmerIndexes.stemmerBufferLength];
for ( int i = 0 ; i < stemmerIndexes.stemmerBufferLength ; i++)
{
stemmerBuffer[i] = word.charAt(i);
}
} | [
"public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }",
"private void initTermBuffer() {\n if (termBuffer == null) {\n if (termText == null) {\n termBuffer = new char[MIN_BUFFER_SIZE];\n termLength = 0;\n } else {\n int length = termText.length();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of ScheduledEnd | public final void setScheduledEnd(java.util.Date scheduledend)
{
setScheduledEnd(getContext(), scheduledend);
} | [
"void setEnd(Instant instant);",
"public void setEnd( TimePoint end ) {\r\n\t\tthis.end = end;\r\n\t}",
"void setDateEnd(java.util.Calendar dateEnd);",
"public void setEndedAtTime(java.util.Calendar value) {\r\n\t\tBase.set(this.model, this.getResource(), ENDEDATTIME, value);\r\n\t}",
"@Test\r\n public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the predictedValue from SVM. | public double getPredictedValue() {
return this.predictedValue;
} | [
"public int getPredictedValue()\n {\n return this.predictedValue;\n }",
"float predict();",
"public String predict(double[] point){\n\t\tsvm_node[] x = new svm_node[point.length];\n\t\tfor(int j=0;j<point.length;j++){\n\t\t\tx[j] = new svm_node();\n\t\t\tx[j].index = j;\n\t\t\tx[j].value = point[j]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructor sets the starting balance to 0.0 > balance bakiye | public BankAccount() {
balance = 0.0;
} | [
"public Balance() {\r\n value = BigDecimal.ZERO;\r\n }",
"public BankAccount(double startBalance) {\n\t\tbalance = startBalance;\n\t}",
"public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }",
"public Account(double initialBalance)\r\n\t{\r\n\t\t// modify the accoun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increments this date to the next day, with considerations for when this day is the end of a month or the end of the year | public void nextDay() {
int daysMax = daysInMonth();
if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1
setDate(1, 1);
} else if (day == daysMax) { // If last day of month, set to first day of next month
setDate(month + 1, 1);
} else { /... | [
"public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}",
"public void nextDay() {\n\t\tselectedDay++;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add default constructor for wrapper types | public void addDefaultConstructor() {
Map<String, String> typeList = new HashMap<>();
typeList.put("java.lang.Boolean", "boolean");
typeList.put("java.lang.Character", "char");
typeList.put("java.lang.Byte", "byte");
typeList.put("java.lang.Short", "short");
typeList.put(... | [
"public GenericWrapper() {\n\t\tsuper(false);\n\t}",
"protected DualWrapper() {}",
"DefaultConstructor(int a){}",
"public Generic(){\n\t\tthis(null);\n\t}",
"public DSBWrapper() {\n }",
"public DefaultObjectModel (Schema schema, Class<?> wrapper)\n {\n this (schema);\n this.wrapper = wrappe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BitmapDrawableResource__FilenameAssignment_2" $ANTLR start "rule__TransitionDrawableResource__NameAssignment_0" ../hu.bme.mit.androtext.androres.ui/srcgen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:3271:1: rule__TransitionDrawableResource__NameAssignment_0 : ( ... | public final void rule__TransitionDrawableResource__NameAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/InternalAndroResDsl.g:... | [
"public final void rule__TransitionDrawableResource__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../hu.bme.mit.androtext.androres.ui/src-gen/hu/bme/mit/androtext/androres/ui/contentassist/antlr/internal/Interna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retorna la mejor dupla del entrenamiento, teniendo en cuenta los individuos vivos y los muertos | public Dupla getMejor(){
if(vivos.size() > 0 && muertos.size() > 0){
Dupla mV = buscarMejor(vivos);
Dupla mM = buscarMejor(muertos);
if(mV.getIndividuo().getPuntos() > mM.getIndividuo().getPuntos())
return mV;
return mM;
}else{
if(vivos.size() > 0) ret... | [
"public Boolean Duplicado() {\n Nodo aux = inicio;\n while (aux != null) {\n if (aux.getDispositivo().getIP().compareTo(aux.getDispositivo().getIP()) == 0) {\n return true;\n }\n aux = aux.getSiguiente();\n }\n return false;\n }",
"@Ov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method to execute the operation of adding or removing hosts to or from a matrix in the data store by providing matrix id, button flag(action category), host list | public static boolean executeMatrixARHost(String matrixId, int button_flag, JSONArray host_array){
DataStoreConfig cfg = new DataStoreConfig();
String storeURL = cfg.getProperty("storeURL");
String MATRIX = PsApi.MATRIX;
String command = "";
if(button_flag == 1){
... | [
"public static void modifyTopology(int[][] matrix) throws IOException{\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter router to be deleted\");\n\t\tint router = s.nextInt();\n\t\t\n\t\tfor(int i=0;i<matrix.length; i++) //row\n\t\t{\n\t\t\tif(i==router-1)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<mat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of actualizar method, of class MultiReparacion. | @Test
public void testActualizar() throws Exception {
System.out.println("actualizar");
String pcodigo = "qart";
String pnombre = "Arreglar bumper";
String tipo = "Enderazado";
Date pfechaAsignacion = new Date(Calendar.getInstance().getTimeInMillis());
String p... | [
"@Test\r\n public void testBorrar() throws Exception {\r\n System.out.println(\"borrar\");\r\n \r\n String pcodigo = \"pentos\";\r\n String pnombre = \"Arreglar bumper\";\r\n String tipo = \"Enderazado\";\r\n Date pfechaAsignacion = new Date(Calendar.getInstance().getTim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant only. | @Schema(example = "[\"v2:Sg1xxxQ_U3ixxxyXT_VDNI3xxxazZdg6Vxxxs4-GNYxxxVaJPOhFMRQ\",\"v2:qqpb0mmvd-ovhhBr0BUQQn0fld5jIboaaX3-De0DkqXHzbf8d75xkw\"]", description = "Array of unique call_control_ids the joining supervisor can whisper to. If none provided, the supervisor will join the conference as a monitoring participant... | [
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"If `true`, Call control will be enabled for this Participant's Call leg.\")\n\n public Boolean getAllowCallControl() {\n return allowCallControl;\n }",
"@Test\n public void whisperCallControlIdsTest() {\n // TODO: test whisperCallControlIds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construtor da classe CategoriaException | public CategoriaException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
} | [
"public CategoriaException() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public CategoriaException(String message) {\n\t\tsuper(message);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public CategoriaException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t\t//... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns number of adjacent mines for a tile at specified position in the field. | private int countAdjacentMines(int row, int column) {
int count = 0;
for (int rowOffset = -1; rowOffset <= 1; rowOffset++) {
int actRow = row + rowOffset;
if (actRow >= 0 && actRow < rowCount) {
for (int columnOffset = -1; columnOffset <= 1; columnOffset++) {
... | [
"private int countAdjacentMines(int row, int column) {\n\t\tint count = 0;\n\t\tfor (int rowOffset = -1; rowOffset <= 1; rowOffset++) {\n\t\t\tint actRow = row + rowOffset;\n\t\t\tif (actRow >= 0 && actRow < rowCount) {\n\t\t\t\tfor (int columnOffset = -1; columnOffset <= 1; columnOffset++) {\n\t\t\t\t\tint actColu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mirror a picture vertically | public void mirrorVertical(){
//Declare local variables
int width = this.getWidth();
int mirrorPoint = width/2;
Pixel leftPix = null;
Pixel rightPix = null;
//Loop through all rows, only half way
for (int y=0;y<this.getHeight();y++){
for (int x=0; x<mirrorPoint; x++){
... | [
"public static void testMirrorVertical()\n {\n Picture caterpillar = new Picture(\"caterpillar.jpg\");\n caterpillar.explore();\n caterpillar.mirrorVertical();\n caterpillar.explore();\n }",
"public static void testMirrorVertical()\r\n {\r\n Picture caterpillar = new Picture(\"caterpillar.jpg\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ExprSimple__Group_3_1_1__0__Impl" $ANTLR start "rule__ExprSimple__Group_3_1_1__1" InternalWhdsl.g:3068:1: rule__ExprSimple__Group_3_1_1__1 : rule__ExprSimple__Group_3_1_1__1__Impl rule__ExprSimple__Group_3_1_1__2 ; | public final void rule__ExprSimple__Group_3_1_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalWhdsl.g:3072:1: ( rule__ExprSimple__Group_3_1_1__1__Impl rule__ExprSimple__Group_3_1_1__2 )
// InternalWhdsl.g:3073:2: rule__ExprSimpl... | [
"public final void rule__ExprSimple__Group_3_1_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:3018:1: ( rule__ExprSimple__Group_3_1_0__2__Impl )\n // InternalWhdsl.g:3019:2: rule__ExprSimple__Group_3_1_0__2__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Base interface for tool stat providing logic | public interface IToolStatProvider {
/** Builds the stats from the given definition and materials */
StatsNBT buildStats(ToolDefinition definition, MaterialNBT materials);
/** Determines if thi stat provider contains parts */
boolean isMultipart();
/**
* Checks if the loaded tool definition data is valid... | [
"java.lang.String getStat();",
"public interface StatsManager {\n /**\n * A method that returns the value of a specific statistic.\n *\n * @param statistic The statistic to be queried.\n * @return The value of the statistic.\n */\n int getStat(Statistic statistic);\n\n /**\n * A m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Evaluates a hand according to the rules of the dumb card game. Each card is worth its displayed pip value (ace = 1, two = 2, etc.) in points with face cards worth ten points. The value of a hand is equal to the summation of the points of all the cards held in the hand. | public int evaluateHand() {
int value = 0;
for (int i = 0; i < getNumberOfCards(); i++) {
Card c = getCard(i);
int cardValue = Card.getRankIndex(c.getRank()) - Card.getRankIndex('a') + 1;
if (cardValue > 10)
cardValue = 10;
value += cardValue;
}
... | [
"private void EvalHand() {\r\n\r\n\t\t// Evaluates if the hand is a flush and/or straight then figures out\r\n\t\t// the hand's strength attributes\r\n\r\n\t\tArrayList<Card> remainingCards = new ArrayList<Card>();\r\n\r\n\t\t// Sort the cards!\r\n\t\tCollections.sort(CardsInHand, Card.CardRank);\r\n\r\n\t\t// Ace ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Split the shipping group into two shipping groups, one with items PENDING_DELIVERY and one with items that aren't PENDING_DELIVERY | private List splitShippingGroupWithAvailableItems(Order pOrder, ShippingGroup pShippingGroup,
List pModificationList)
throws InvalidParameterException, ObjectCreationException, DuplicateShippingGroupException, CommerceException
{
ShipItemRelationshipStates s... | [
"protected void processShippingGroup(Order pOrder, ShippingGroup pShippingGroup, List pModificationList) \n throws CommerceException\n {\n if(isLoggingDebug())\n logDebug(\"Inside processShippingGroup\");\n \n ShippingGroupStates sgs = getShippingGroupStates();\n ShipItemRelationshipStates sirs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TRS_SYN_SETLMT_ACC.MT579_CERTIFICATE_NO_28 | public String getMT579_CERTIFICATE_NO_28() {
return MT579_CERTIFICATE_NO_28;
} | [
"public BigDecimal getCERTIFICATE_NO() {\r\n return CERTIFICATE_NO;\r\n }",
"public String getMT579_CERTIFICATE_NO_11() {\r\n return MT579_CERTIFICATE_NO_11;\r\n }",
"public String getMT579_CERTIFICATE_NO_33() {\r\n return MT579_CERTIFICATE_NO_33;\r\n }",
"public String getMT579_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is used to read the query graph in the memory and store it in the hashmap | void readQueryGraph(boolean isProtein, File file, int queryID) throws IOException {
if(isProtein) {
FileReader fileReader = new FileReader(file.getPath());
BufferedReader br = new BufferedReader(fileReader);
String line = null;
int lineread = -1;
boole... | [
"private Map<Integer, String> getQueryMap(String queryFilePath) {\n Map<Integer, String> queryMap = new HashMap<>();// (qid, query)\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(queryFilePath));\n String line;\n\n while ((lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encrypt private key using Passwordbased encryption (PBE) as defined in PKCS5. NOTE: Currently pbeWithSHAAnd3KeyTripleDESCBC algorithmID is used to derive the key and IV. | private byte[] encryptPrivateKey(byte[] data, char[] password) throws IOException, NoSuchAlgorithmException, UnrecoverableKeyException, InvalidParameterSpecException, InvalidKeySpecException, InvalidKeyException, InvalidAlgorithmParameterException {
AlgorithmParameters algParams = getAlgorithmParameters("PBEWit... | [
"private void decrypt()\r\n\r\n {\r\n\r\n PBEKeySpec pbeKeySpec;\r\n\r\n PBEParameterSpec pbeParameterSpec;\r\n\r\n SecretKeyFactory secretKeyFactory;\r\n\r\n // same salt as in Method encrypt\r\n\r\n byte[] salt = { ( byte )0xc7, ( byte )0x73, ( byte )0x21, ( byte )0x8c,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks if the user is a parent, by adding the isParentListener to de database. This Listener will send the user to the right UI. | public void checkIfParent() {
// check if user is a parent or not and update UI accordingly
DatabaseReference mRef = FirebaseDatabase.getInstance().getReference("users/" + uid);
mRef.addListenerForSingleValueEvent(isParentListener);
} | [
"public boolean isParent();",
"public boolean hasParent();",
"public boolean isIsParent() {\r\n return isParent;\r\n }",
"public void setParentUser(Integer parentUser) {\n this.parentUser = parentUser;\n }",
"boolean hasParent();",
"public boolean isParentConnected() {\n return pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates the drafts table | public void draftsTable()
{
ArrayList columnNames = new ArrayList();
ArrayList data = new ArrayList();
DefaultTableModel model = new DefaultTableModel(new String[]{"mailID", "To", "Subject", "timeSent"}, 0);
try
{
String query = "select mailID, recipient, mailSubject, date_format(timeS... | [
"private Draft createDraft() {\r\n\t\t// Creates the Draft\r\n\t\tDraft result = new Draft(this.teams, Integer.parseInt(this.draftParams[2].toString()), Boolean.parseBoolean(this.draftParams[1].toString()));\r\n\t\t\r\n\t\t// Returns the Draft\r\n\t\treturn result;\r\n\t}",
"tbls createtbls();",
"private void c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the board's distance to the final state. | public int get_distance_to_final() {
return this.distance_to_final;
} | [
"public int distance(PuzzleState state) {\n int numOfTiles = 9;\n int rowLength = 3;\n int finalDistance = 0;\n for(int i = 1; i < numOfTiles; i++){\n if(goalState.posOf(i) != state.posOf(i)){\n int indexOfMissplacedTile = state.posOf(i);\n int in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets list of roles unsuccessfully accessed. | public void setRolesUnresolved(RoleUnresolvedList unresolvedList) {
if (unresolvedList != null) {
unresolvedRoleList = new RoleUnresolvedList();
for (Iterator<?> roleUnresIter = unresolvedList.iterator();
roleUnresIter.hasNext();) {
RoleUnresolved currR... | [
"public void issueRoles() {}",
"public void setUserRoles(String[] roles) {}",
"void setRoles(Set<String> roles);",
"public void setRoles(List<Role> roles) {\n this.roles = roles;\n }",
"void setRole(String roles);",
"public void setRoles(java.lang.String value);",
"public void setRoles(final C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if necessary columns exist in file. Not all columns are guaranteed to contain the data needed, so this method checks that. | public static boolean necessaryColumnPresent(List<String> arrayOfFileColumns, int requiredColumnIndex) {
return arrayOfFileColumns.size() > requiredColumnIndex;
} | [
"private boolean checkHasColumns( TableMeta tmeta ) {\n boolean hasColumns = tmeta.getColumns().length > 0;\n if ( ! hasColumns ) {\n reporter_.report( ReportType.FAILURE, \"ZCOL\",\n \"No columns known for table \"\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
POST a video with a url size less than 10 characters | @Test
public void uploadBadUrlVideo() {
Video video = new Video("Cool video", "www.y.com", 212);
Response response = target.request(MediaType.APPLICATION_JSON)
.post(Entity.entity(video, MediaType.APPLICATION_JSON));
assertThat(response.getStatus(), is(Status.BAD_REQUES... | [
"@Test\n public void uploadWrongDurationVideo() {\n Video video = new Video(\"Cool video\", \"www.youtube.com\", 0);\n Response response = target.request(MediaType.APPLICATION_JSON)\n .post(Entity.entity(video, MediaType.APPLICATION_JSON));\n\n assertThat(response.getStat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty "ManagedPropertyAttributeRequiredLevel" element | public com.microsoft.schemas.xrm._2011.contracts.ManagedPropertyAttributeRequiredLevel addNewManagedPropertyAttributeRequiredLevel()
{
synchronized (monitor())
{
check_orphaned();
com.microsoft.schemas.xrm._2011.contracts.ManagedPropertyAttributeRequiredLevel target = nu... | [
"public void setNilManagedPropertyAttributeRequiredLevel()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.microsoft.schemas.xrm._2011.contracts.ManagedPropertyAttributeRequiredLevel target = null;\r\n target = (com.microsoft.schemas.xrm._2011... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the pending ads count | public long getPendingAdCount(){
String approvalStatus = "Pending";
String query = "from Product where approvalStatus = :approvalStatus";
long pendingCount = 0;
List<Product> productsList = new ArrayList<>();
try{
productsList = entityManager
.createQuery(query)
... | [
"int getDeliveredCount();",
"public int getTotalActiveAds() {\n return totalActiveAds;\n }",
"public int getAnnouncementsCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_ANNOUNCEMENTS;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(count... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AddEnum__Group__1" $ANTLR start "rule__AddEnum__Group__1__Impl" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5019:1: rule__AddEnum__Group__1__Impl : ( ( rule__AddEnum__EnumEntryAssignment_1 ) ) ; | public final void rule__AddEnum__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5023:1: ( ( ( rule... | [
"public final void rule__AddEnum__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:5011:1: ( ru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove a user from the collection by giving the user's firstname. | public boolean remove(String firstname){
boolean rmSucc = false;
ArrayList<User> deleteList = new ArrayList<User>();
try {
for(User u : userList){
if(u.getFirstname().equals(firstname)) deleteList.add(u);
}
if(deleteList.size() == 0){
System.out.println("Can not find the person");
... | [
"public User removeUser(String name);",
"void removeUser(User user);",
"public void removeUser(String username);",
"public void removeFirstUser()\n\t{\n\t\tusers.remove(0);\n\t}",
"public void removeByFullName(String name, String lastName);",
"void removeUser(@Nonnull User user);",
"public void removeUs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
draw centerline of the runway | private void genCenterline(Group root, String runwayId, Integer helperHeight){
Point runwayPos = controller.getRunwayPos(runwayId);
Integer runwayLength = ((Double)controller.getRunwayDim(runwayId).getWidth()).intValue();
Integer runwayHeight = ((Double)controller.getRunwayDim(runwayId).getHeigh... | [
"protected void positionCenter() {\n\t\tlog(\"Positioning on center of line.\");\n\t\tdouble offset = -lineWidth / 2;\n\t\tbindTransition(getPilot().travelComplete(offset), LineFinderState.FINISH);\n\t}",
"public void drawLine() {\n for(int i=0; i < nCols; i++) {\n System.out.print(\"----\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this is the first time app is launching? | public static boolean isFirstLaunch(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getBoolean(PREF_KEY_FIRSTLAUNCH, true);
} | [
"private boolean isFirstTimeStartApp(){\n SharedPreferences ref = getApplication().getSharedPreferences(\"introSlider\", Context.MODE_PRIVATE);\n return ref.getBoolean(\"firstTimeFlag\", true);\n }",
"public boolean getFirstLaunchFlag() {\n return sharedPreferences.getBoolean(\"first_launc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
REMOVE FUNCTIONS Removes the subnode at the specified path. Returns the node that was removed. Samples: Tree removed = node.remove("path.to.node"); or Tree removed = node.remove("array[3].subarray[2]"); | public Tree remove(String path) {
Tree child = getChild(path, false);
if (child != null) {
child.remove();
}
return child;
} | [
"void removeNode(Node node);",
"IModel removeNode(IIdentity node);",
"void removeNode(final T value);",
"void remove(@NonNull String path);",
"@Override\n public boolean removeNode(Node node);",
"public abstract void removeChild(Node node);",
"abstract protected void removeNode (DefaultMutableTreeNod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the adminaccessible announcement control page | @RequestMapping(value = "/admin") public String getControlCentreAdminPage(final Model model) {
List<Announcement> announcements = announcementService.getAllAnnouncements();
logger.trace("Announcements list size: " + announcements.size());
model.addAttribute("announcements", announcements);
... | [
"@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public String getAdminPage() {\n \t\n \treturn \"adminpage\";\n\t}",
"public AdminPage clickOnAdminLink() {\n\t\tadminTabLink.click();\n\t\t\n\t\treturn new AdminPage();\t\t// return AdminPage \"objects\" -- every objects in this Admin pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
static UnitFilter example = HP(x > x > 40); | static UnitFilter HP(Predicate<Integer> c) {
return u -> c.test(u.getHitPoints());
} | [
"FilterCondition createFilterCondition(int clueNum);",
"public interface Filter {\n\n /**\n * Determines whether or not a word may pass through this filter.\n * @param word test word\n * @return TRUE if word may pass, FALSE otherwise\n */\n public boolean pass(String word);\n\n /**\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The getter method to retrieve the value of playerNo. | public int getPlayerNo() {
return playerNo;
} | [
"public int getPlayerNo() {\n return playerNo;\n }",
"public int getPlayerNumber() {\r\n\t\treturn this.playerNumber; \r\n\t}",
"public int getPlayerNumber() {return this.playerNum;}",
"public Integer getGameNo() {\r\n return gameNo;\r\n }",
"public void setPlayerNo(int value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CCastro Returns the BMH Edge Dissemination URI. Product files are posted to and read from this location. | protected String getBMHEdgeURI(final boolean operational) {
return (operational) ? BMH_EDGE : BMH_EDGE;
} | [
"java.lang.String getProductUrl();",
"String getProductURL();",
"public java.lang.String getProductURI() {\n return productURI;\n }",
"public String setReceiptURL()\n\t{\n\t\tString output =\"\";\n\t\tif (RECEIPT_FORM_ID.equals(\"remote_url\"))\n\t\t\toutput = REMOTE_URL;\n\t\telse\n\t\t{\n\t\t\tout... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience method. Equivalent to calling getSignerCert and then parsing out the CN from the certificate's Subject field. | public String getSignerCn() {
try {
X509Certificate signerCert = this.getSignerCert();
String dn = signerCert.getSubjectX500Principal().getName();
//System.out.println("getSignerCn");
//System.out.println(dn);
String cn = null;
try... | [
"public String getIssuerCN() { return (String) issuer.get(\"CN\"); }",
"public byte[] getX509Subject() {\n return x509Subject;\n }",
"public X509Certificate getSignerCert() throws FiComException {\r\n \treturn(X509Util.DERtoX509Certificate(pkcs1.getX509Certificate()));\r\n }",
"public String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the text label of an existing marker. The marker is modified on all computers in a network session. Example: "Marker1" setMarkerText You are here. | public native static void setMarkerText(String oper1, String oper2); | [
"public void setLabelText(String text);",
"private void setText(Marker marker, int i)\n {\n Bitmap.Config conf = Bitmap.Config.ARGB_8888;\n Bitmap bmp = Bitmap.createBitmap(150, 173, conf);\n Canvas canvas1 = new Canvas(bmp);\n\n Paint color = new Paint();\n color.setTextSize... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the speed at which the model automatically rotates | void setRotationSpeed(float speed)
{
this.rotationAngle = speed;
} | [
"public void setRotationSpeed(double rspeed){\n rotationSpeed = rspeed;\n }",
"public void setRotationSpeed() {\n\t\tsetRotationSpeed(DEFAULT_ROTATION_SPEED);\n\t}",
"public void setMotorSpeed(double speed){\n \tmotors.setSetpoint(speed);\n }",
"public void setSpeed(double speed);",
"@Overri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
metoda interpretuje kazdy wyraz znaleziony w pliku szablonu interpretuje tzn. sprawdza czy jest to normalny wyraz czy zmienna oraz czy wystepuja w nim znaki szczegolne \ oraz ' | private static String interpretujWyraz(final String wyraz) {
StringBuilder wynik = new StringBuilder(wyraz);
if (wyraz.length() > 1) {
if (wyraz.charAt(0) == '\\') {
wynik.deleteCharAt(0);
} else if ((wyraz.charAt(0) == '\'')
&& (wyraz.charAt(wyraz.length() - 1) == '\'')) {
wynik.deleteCha... | [
"public static void odczytZnakPoZnaku(String nazwaPlikuOdczyt) throws IOException {\n FileReader plikZPZ = null;\n try {\n plikZPZ = new FileReader(nazwaPlikuOdczyt);\n System.out.println(\"\\n\\nOdczyt pliku znak po znaku:\\n\");\n int znaki;\n //odczyt pli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Atom__Group_7__1__Impl" $ANTLR start "rule__Atom__Group_8__0" InternalSymboleoide.g:6205:1: rule__Atom__Group_8__0 : rule__Atom__Group_8__0__Impl rule__Atom__Group_8__1 ; | public final void rule__Atom__Group_8__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalSymboleoide.g:6209:1: ( rule__Atom__Group_8__0__Impl rule__Atom__Group_8__1 )
// InternalSymboleoide.g:6210:2: rule__Atom__Group_8__0__Impl rule... | [
"public final void rule__Atom__Group_7__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSymboleoide.g:6155:1: ( rule__Atom__Group_7__0__Impl rule__Atom__Group_7__1 )\n // InternalSymboleoide.g:6156:2: rule__Atom__Group_7... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Liefert die TurnierEditor Constraints | public TournamentEditorConstraints getTournamentEditorConstraints(); | [
"@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();",
"protected abstract void bakeConstraint();",
"private void setRestrictiveConstraint (int restriction)\r\n\t{\r\n\t\t// Keep the modifiers.\r\n\t\tconstraints &= TextField.CONSTRAINT_MASK... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field bestCost is set (has been assigned a value) and false otherwise | public boolean isSetBestCost() {
return __isset_bit_vector.get(__BESTCOST_ISSET_ID);
} | [
"public boolean hasCost() {\n return fieldSetFlags()[3];\n }",
"public boolean isSetShouldOtherCost() {\n return EncodingUtils.testBit(__isset_bitfield, __SHOULDOTHERCOST_ISSET_ID);\n }",
"public boolean isSetRotherCost() {\n return EncodingUtils.testBit(__isset_bitfield, __ROTHERCOST_ISSET_ID);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the surname2 of this person. | public void setSurname2(java.lang.String surname2) {
_person.setSurname2(surname2);
} | [
"public void setSurname1(java.lang.String surname1) {\n\t\t_person.setSurname1(surname1);\n\t}",
"public void setSurname(String s) {\n this.surname = s;\n }",
"public void setSurname(String surname) {\r\n\t\tthis.surname = surname;\r\n\t}",
"public java.lang.String getSurname2() {\n\t\treturn _person.getS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move from parent frame to child frame | public static void moveToChildFrame(WebDriver driver, String parentFrame, String childFrame) {
try{
MsLog.debug("Move from '"+parentFrame +"' iframe to '"+childFrame+"' iframe");
moveToDefaultContext(driver);
moveToChildFrame(driver, parentFrame);
moveToChildFrame(driver, childFrame);
}catch(Exception e... | [
"public void switchToParentIFrame() {\n\t\t_eventFiringDriver.switchTo().parentFrame();\n\t\tSystem.out.println(\"control is switched to Parent Frame\");\n\t}",
"public static void switchToParentFrame() {\r\n\t\ttry {\r\n\t\t\tdriver.switchTo().parentFrame();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tAssert.fail(e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test when the player wants to add a ship Out of the grid | @Test
public void test_8_AddShip_ArrayOutOfBounds(){
Grid g = new Grid(3);
Ship s = new Ship(2,5,5,'h');
boolean ok = g.addShip(s);
int nb = g.getShips().size();
//Test
assertFalse("The result should be false",ok);
assertEquals("It shouldn't have ship on the grid",0,nb);
} | [
"@Test\n\tpublic void test_6_AddShip_OutOfBounds() {\t\t\n\t\t// Initialisation\n\t\tGrid g = new Grid(3);\n\t\tboolean ok = false;\n\t\tShip s = new Ship(4,0,0,'h');\n\t\tok = g.addShip(s);\n\t\tint nb = g.getShips().size();\n\n\t\t// TEST\n\n\t\tassertTrue(\"The result should be FALSE\",!ok);\n\t\tassertEquals(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks the user's preferences and set the TextView's values with the right String. | private void configureTextViewAccordingToPreference() {
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mActivity);
String area = preferences.getString("area", "sq ft");
String currency = preferences.getString("currency", "$");
if (area.equals("sq ft"))
... | [
"private void setTexts(){\n TextView makemodel_textView = (TextView) findViewById(R.id.makemodel_textView);\n makemodel_textView.setText(\"Make: \" + postHashmap.get(MainActivity.getMAKE()) + \" \" + \"Model: \" + postHashmap.get(MainActivity.getMODEL()));\n\n TextView registration_textView =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
modify the coordinates of the corresponding balloon if a cell is selected when mouse is released | public void mouseReleased(MouseEvent e)
{
Roi roi = i1.getRoi();
if (roi !=null)
{
if (roi.getType() == roi.POLYGON & selected_cell>-1) // modify the selected cell
{
Polygon p = roi.getPolygon();
int[] XXi = p.xpoints;
int[] YYi = p.ypoints;
bal1 = (Balloon)(pop.BallList.get(selected_cell))... | [
"protected void changeCellState(EventHandler<? super MouseEvent> value){\n\t\tmyPolygon.setOnMouseClicked(value);\n\t}",
"public void mousePressed(MouseEvent e) {\n int columns = knot.getColumns() / 2;\n int rows = knot.getRows() / 2;\n \n int xStep = knot.getWidth() / columns;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes an input file and checks if it exists Promptly returns it to another method for later use | private static File identifyFile() {
try {
File inputFile = new File("inputFile.txt");
if (inputFile.createNewFile()) {
System.out.println("Debug : File Created");
} else {
System.out.println("Debug : File Exists");
}
re... | [
"public static File input()\n\t{\n Scanner scan = new Scanner(System.in);\n //Prompt the user for the desired input file to be processed\n System.out.print(\"Input file name: \");\n \n //Create the input file object\n String theFile = scan.nextLine(); // file may contain m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated method Getter of the AmazonConfig.amazonLog attribute. | public AmazonLog getAmazonLog()
{
return getAmazonLog( getSession().getSessionContext() );
} | [
"public AmazonLog getAmazonLog(final SessionContext ctx)\n\t{\n\t\treturn (AmazonLog)getProperty( ctx, AMAZONLOG);\n\t}",
"public void setAmazonLog(final AmazonLog value)\n\t{\n\t\tsetAmazonLog( getSession().getSessionContext(), value );\n\t}",
"public void setAmazonLog(final SessionContext ctx, final AmazonLog... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get CSS attribute : Ok_I_Will_Do_This_Now_Button | public String getCssValue_click_Ok_I_Will_Do_This_Now_Button(String attribute) {
return click_Ok_I_Will_Do_This_Now_Button.getCssValue(attribute);
} | [
"public String getCssValue_txt_Fuel_Rewards_Page_Button(String attribute) {\r\n\t\treturn txt_Fuel_Rewards_Page_Button.getCssValue(attribute);\r\n\t}",
"public String getText_click_Ok_I_Will_Do_This_Now_Button(){\r\n\t\treturn click_Ok_I_Will_Do_This_Now_Button.getText();\r\n\t}",
"public String getCssValue_cli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method populates the search data required for generating the Insight Data. | private ScoreCardSearchDTO populateSearchDataForInsightDB(String orgId, String toolId, String projectId) {
// Insight Data
MetricSearchDTO mData = null;
ArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>();
ScoreCardSearchDTO srchData = new ScoreCardSearchDTO();
srchData.setToolId(toolId);
s... | [
"private ScoreCardSearchDTO populateSearchDataForInsightDB(String orgId, String toolId, String projectId) {\n\t\t// Insight Data\n\t\tMetricSearchDTO mData = null;\n\t\tArrayList<MetricSearchDTO> mList = new ArrayList<MetricSearchDTO>();\n\t\tScoreCardSearchDTO srchData = new ScoreCardSearchDTO();\n\n\t\tsrchData.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "NORMALSET" $ANTLR start "POINT" | public final void mPOINT() throws RecognitionException {
try {
int _type = POINT;
int _channel = DEFAULT_TOKEN_CHANNEL;
// /media/Data/Universita/V_anno/1_semestre/Linguaggi e Compilatori/Progetto/Git/LeC/Progetto_LeC/src/grammatica.g:325:8: ( 'point' )
// /media/... | [
"public PointSET() {\r\n points = new SET<>();\r\n }",
"public void setPoints(String points);",
"public Snippet visit(PointType n, Snippet argu) {\n\t Snippet _ret=new Snippet(\"\",\"\",null, false);\n\t n.nodeToken.accept(this, argu);\n\t \t_ret.expType = new X10Point(1);\n\t n.nodeTo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fetches a RegisteredCall for a given ID. | public synchronized RegisteredCall getRegisteredCall(int callId) {
return currentCalls.get(Integer.valueOf(callId));
} | [
"public static BasicPhoneCall getPhoneCall(String sid){\n return loggedCalls.get(sid);\n }",
"public LinphoneCall getCurrentCall();",
"public CallLog findCallLogFromCallId(String callId);",
"public synchronized int registerCall(RegisteredCall call) {\n\t\tint id = idGen.generateAndReserve();\n\t\tcu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contract defining strategy for storing authenticated realm. | public interface RealmStore {
void store(String authId, Realm realm);
Optional<Realm> get(String authId);
void remove(String authId);
} | [
"public void setRealm(Realm realm);",
"public interface UserRealm {\n\n /**\n * Get the AuthorizationReader of the system\n *\n * @return The AuthorizationReader the system\n * @throws UserStoreException\n */\n AuthorizationManager getAuthorizationManager() throws UserStoreException;\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a string representation of an Attribute set. | public String attrsToString() {
StringBuffer sb = new StringBuffer();
try {
for (NamingEnumeration en = attrs.getAll(); en.hasMore();) {
Attribute attr = (Attribute)en.next();
sb.append(attr.getID() + "=[");
for (NamingEnumeration enum1 = attr.getAll(); enum1.hasMore();) {
... | [
"protected String getAttributes() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Attribute key : attributes) {\n\t\t\tsb.append(\" \");\n\t\t\tsb.append(key.toString());\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public String toString() {\n return attribute.getName() + \" : \" + attribute.getType... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read a file from the archive. If the first two bytes are 0x78 and (0x01 || 0x9C || 0xDA) it is likely to be compressed using zlib deflate. | public byte[] readFile(RAFFileEntry fileEntry) throws IOException {
archiveFile.setPosition(fileEntry.getDataOffset());
if (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException("File too big.");
byte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());
return data;
} | [
"void readcompressedfiles (String file) throws IOException\n {\n \t\t BufferedReader reader = null;\n reader = new BufferedReader(new FileReader(file));\n \t \t\tString line = new String();\n \t \t\tString readstring = new String();\n \t \t\tline=reader.readLine();\n \t \t\t\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the initial time | public double get_initial_time(){
return this.initial_time;
} | [
"public static int getDefaultTime() {\r\n\t\treturn defaultTime;\r\n\t}",
"long getInitTime();",
"public Date getInitTime() {\n\t\treturn initTime;\n\t}",
"public long getInitTime() {\n return initTime_;\n }",
"public long getInitialUserTime() {\n\n return pInitialUserTime;\n }",
"lo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the string representing the relative path to the image file of the current frame. | private void setFramePath()
{
currFramePath = location + "/" + currentSet + "/" + "frame"
+ Integer.toString(currFrame) + ".png";
} | [
"void setSpriteFolder(String string);",
"abstract public void setImageResourcesDir(String path);",
"void setStaticPicture(String path);",
"public void setStaticPicture(String path);",
"public void markAsPath() {\n InputStream input = getClass().getResourceAsStream(\"/AStarPathfinder/image/path.png\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the networkName property: Name of the virtual network in vmmServer. | public String networkName() {
return this.innerProperties() == null ? null : this.innerProperties().networkName();
} | [
"public String virtualNetworkName() {\n return this.virtualNetworkName;\n }",
"public String getNetworkName() {\n return networkName;\n }",
"public String getNetworkName () {\n return network.getRow(network).get(CyNetwork.NAME, String.class);\n }",
"public String getNetworkname()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the extension object associated with the entry. Caller must hold the mutex of this object. | void setExtensionObject(Object extensionObject); | [
"public void setExtension(java.lang.Object extension) {\r\n this.extension = extension;\r\n }",
"public void xsetExtObject(org.apache.xmlbeans.XmlString extObject)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the perSubmit corresponding to the query. | @Override
@Transactional(readOnly = true)
public List<PerSubmit> search(String query) {
log.debug("Request to search PerSubmits for query {}", query);
return StreamSupport
.stream(perSubmitSearchRepository.search(queryStringQuery(query)).spliterator(), false)
.collect(Col... | [
"public SubmissionSearchResult search(SubmissionSearchCriteria criteria);",
"SubmissionSearchResponse searchSubmissions(UserInfo userInfo, SubmissionSearchRequest request);",
"public String getSubmitBy() {\n return submitBy;\n }",
"public void onSearchSubmit(String queryTerm);",
"@SuppressWarnings... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find index of the highest amountSpent | public static int indexOfMostSpent(double[] amountsSpent) {
int index = 0;
double maxValue = 0.0;
for (int i=0; i<amountsSpent.length; i++) {
if (amountsSpent[i] > maxValue) {
maxValue = amountsSpent[i];
index = i;
}
}
return index;
} | [
"public int getMaxAmount(int slotIndex);",
"public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is input point set boolean. | public boolean isInputPointSet() {
return isPointSet;
} | [
"public boolean isSetPoint() {\n return EncodingUtils.testBit(__isset_bitfield, __POINT_ISSET_ID);\n }",
"public boolean atSetPoint(){\n return Math.abs(getPosition() - getSetpoint())<.1;\n }",
"boolean hasIsInputTo();",
"public void setPoint(Point p, boolean value){\n setPoint(p.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The doEdit class is used for getting Contact details from ContactDetails.jsp page. Then it invokes setter methods in doEdit class and invokes doEdit() method in doEdit for editing contact details in mirage.tblCrmContact table. | public String doEdit(){
resultType = LOGIN;
if(httpServletRequest.getSession(false).getAttribute(ApplicationConstants.SESSION_USER_ID) != null){
userRoleId = Integer.parseInt(httpServletRequest.getSession(false).getAttribute(ApplicationConstants.SESSION_ROLE_ID).toS... | [
"@RequestMapping(value = \"/edit\", method = RequestMethod.GET)\n\tpublic String editContact(HttpServletRequest req, Model model) {\n\t\tint parseInt = Integer.parseInt(req.getParameter(\"contactId\"));\n\t\tContactDomain contactByID = contactmgnservice.getContactByID(parseInt);\n\t\tmodel.addAttribute(\"beans\", c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "required" attribute | org.apache.xmlbeans.XmlBoolean xgetRequired(); | [
"@Test public void mandatoryAttr() {\n error(new IOContent(\"<package xmlns:http='http://expath.org/ns/pkg' spec='1.0'/>\"),\n REPO_DESCRIPTOR_X, \"Missing mandatory attribute not detected.\");\n }",
"public static List<String> getRequiredAttributes() {\n\t\treturn TestObject.REQUIRED_ATTRIBUTES;\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new ILS. | public ILS(Instance inst, Random random, int lowerBound, long rnaMax, int itersP, int p0, int pMax) {
this(inst, random, lowerBound, new Descent(inst, random, lowerBound), rnaMax, itersP, p0, pMax);
} | [
"public LSS() {\n\t\t\n\t}",
"public ILS(Instance inst, Random random, int lowerBound, Heuristic heuristic, long rnaMax, int itersP, int p0, int pMax) {\n super(inst, random, \"ILS\", lowerBound);\n\n this.heuristic = heuristic;\n this.rnaMax = rnaMax;\n this.itersP = itersP;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the AP's adapter if HtcReorderListView's adapter is not null | private ListAdapter getWrappedAdapter() {
return mDisableAdapter != null ? mDisableAdapter.getWrappedAdapter() : null;
} | [
"public ListAdapter getAdapter() {\n return mAdapter;\n }",
"public Adapter getAdapter() {\n\t\treturn mAdapter;\n\t}",
"public ObjectAdapter getAdapter() {\n return mAdapter;\n }",
"public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }",
"public DbAdapter ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transaction type. Null for trades, description of transaction for different types | public String getTransactionType() {
return transactionType;
} | [
"public String getTransactionType() {\n\t\treturn transactionType;\n\t}",
"public java.lang.String getTransactionType() {\r\n return transactionType;\r\n }",
"public java.lang.String getTransactionType() {\n return transactionType;\n }",
"TransactionType createTransactionType();",
"java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter and Setter Methods Operational Methods Method to return the value of imageLocation | public String getImageLocation()
{
return imageLocation;
} | [
"public String getImageLocation() {\n return imageLocation;\n }",
"public String getImageLocation() {\n\t\treturn this.imageLocation;\n\t}",
"public String getPictureLocation() {\n if (value == null) {\n return DEFAULT_PICTURE_LOCATION + DEFAULT_PICTURE;\n } else if (value.equ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end ruleAdditiveExpression $ANTLR start entryRuleAdditiveExpressionPart ../org.eclipselabs.mscript.language/srcgen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3747:1: entryRuleAdditiveExpressionPart returns [EObject current=null] : iv_ruleAdditiveExpressionPart= ruleAdditiveExpressio... | public final EObject entryRuleAdditiveExpressionPart() throws RecognitionException {
EObject current = null;
EObject iv_ruleAdditiveExpressionPart = null;
try {
// ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:... | [
"public final EObject entryRuleAdditiveExpression() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleAdditiveExpression = null;\n\n\n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscrip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given one of the segments in the pair, return the other | public Segment OtherSegment(Segment cs)
{
if(cs.equals(cs1))
{
return cs2;
}
else if(cs.equals(cs2))
{
return cs1;
}
return null;
} | [
"@Override\n public Object part2() {\n for (int i = 0; i < input.size(); i++) {\n for (int j = i + 1; j < input.size(); j++) {\n String str1 = input.get(i);\n String str2 = input.get(j);\n\n // only compare equal-length strings\n if (s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Handles user pressing "Reset" button, which resets clock and clock display | @FXML private void handleReset() {
stopClock();
stopWatch.reset();
} | [
"private void btnResetActionPerformed(java.awt.event.ActionEvent evt) {\n reset(); \n }",
"public void resetCommand() {\n beginMatchButton.setEnabled(false);\n switcherButton.setEnabled(true);\n stopMatchButton.setEnabled(false);\n\n autonomousTime.setEditable(true);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Cannot extend Hello because we have to throw RemoteException in EJB 2.x :( | public interface HelloRemote extends EJBObject {
public String hello() throws RemoteException;
public String hello(String name) throws RemoteException;
public void exception() throws RemoteException;
public void sleep(long msec) throws RemoteException;
} | [
"public interface HelloLocal extends javax.ejb.EJBLocalObject\r\n{\r\n\r\n /**\r\n * The one method - hello - returns a greeting to the client.\r\n */\r\n public String hello();\r\n}",
"public interface RemoteCommandHome extends javax.ejb.EJBHome {\n\n /**\n * Creates a remote instance of RemoteComma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handle for every card this player is dealt. kaiser state is DEAL Default impl does nothing. | public void onDealtCard(Kaiser k, Card c) {
} | [
"private void deal()\n { \n for(int i = 1; i <= dealer.NUM_CARDS; i++)\n {\n dw.enqueue(((Card)dealer.dequeue())); \n i++;\n de.enqueue(((Card)dealer.dequeue())); \n i++;\n }\n }",
"public void deal() {\n\t\ttry {\n\t\t\tList<Cards> dealCard = new ArrayList<Cards... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |