query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
This method was generated by Apache iBATIS ibator. This method returns the value of the database column YLJZN.CURRECT_CHRONIC.APRPERSON2
public String getAprperson2() { return aprperson2; }
[ "public void setAprperson2(String aprperson2) {\r\n this.aprperson2 = aprperson2;\r\n }", "public String getAprperson1() {\r\n return aprperson1;\r\n }", "public Row getPersonVO2() {\n return (Row)getAttributeInternal(PERSONVO2);\n }", "public String getAprperson3() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .SSIT.proto.LobbyChatMessage Message = 1;
SSIT.proto.Unetmgr.LobbyChatMessage getMessage();
[ "SSIT.proto.Unetmgr.LobbyChatMessageOrBuilder getMessageOrBuilder();", "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.ChatDataOrBuilder getChatDataOrBuilder();", "io.yuri.yuriserver.packet.Protos.ChatOrBuilder getChatOrBuilder();", "com.whiuk.philip.mmorpg.shared.Messages.ClientMessage.ChatDataOrBuild...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
AND Methods Method to load the portal url
public void loadURL() { logger.writeLog("INFO","Opening url ........."); navigateToApplication(); }
[ "public interface PortalURL\n{\n enum URLType\n { \n ACTION(\"action\"), \n RESOURCE(\"resource\"), \n RENDER(\"render\"); \n \n private final String name;\n \n private URLType(String name)\n {\n this.name = name;\n }\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cuts individual and return a list with the parts of it
@SuppressWarnings("unchecked") private List<T> Cut(T individual) { ArrayList<T> list = new ArrayList<T>(2); int length = individual.getChromosomeLength(); if (EvRandomizer.INSTANCE.nextDouble() < (length - 1) * cut_probability) { int cut_place = EvRandomizer.INSTANCE.nextInt(length - 1); T ...
[ "ToParts getToParts();", "private List<String> getParts(String s) {\n\t\tList<String> parts = new ArrayList<String>();\n\t\t\n\t\tif ((s != null) && (s.indexOf(\" \") < 0)) {\n\t\t\tString[] pieces = s.split(\"[-.]\");\n\t\t\tif (pieces.length > 1) {\n\t\t\t\tfor (String p : pieces) {\n\t\t\t\t\tparts.add(p);\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates and returns the route waiting time
public abstract double getRouteWaitingTime(LinkedHashMap<String,Double> anaParams,AnalyticalModelNetwork network);
[ "int getRouteTimeoutInMillis();", "public long getWaitTime() {\n \t//System.out.println(\"arrival: \" + getArrivalTime() + \", wait: \" + wait);\n \treturn wait;}", "public int waitTime(Ride ride) {\n int max = Math.max(0, ride.getEarliestStart() - (this.currentStep + this.distanceToRideStart(ride)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DAO to manage ProjectBudget entities.
public interface ProjectBudgetDAO extends JpaDao<ProjectBudget> { /** * JPQL Query - findProjectBudgetById * */ public ProjectBudget findProjectBudgetById(Integer id) throws DataAccessException; /** * JPQL Query - findProjectBudgetById * */ public ProjectBudget findProjectBudgetById(Integer id, int st...
[ "public interface ProjectAnnualBudgetDAO extends JpaDao<ProjectAnnualBudget> {\n\n\t/**\n\t * JPQL Query - findProjectAnnualBudgetByProjectSourceContaining\n\t *\n\t */\n\tpublic Set<ProjectAnnualBudget> findProjectAnnualBudgetByProjectSourceContaining(String projectSource) throws DataAccessException;\n\n\t/**\n\t ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save problem in libSVM format : : ...
public static void saveProblem(svm_problem svmProb, String file) { try { BufferedWriter br = new BufferedWriter(new FileWriter(file)); for (int i = 0; i < svmProb.l; i++) { // <label> br.write(Double.toString(svmProb.y[i])); for (int j = 0; j < svmProb.x[i].length; j++) { if (svmProb.x[i][j].va...
[ "private void setProblem() throws IOException, InvalidInputException{\r\n String finalInputFileName;\r\n if(scale){\r\n finalInputFileName = inputFileName + \".scaled\";\r\n }\r\n else{\r\n finalInputFileName = inputFileName;\r\n }\r\n \r\n // R...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the associate ID of this WFMS_Associate_History.
@Override public void setAssociateId(java.lang.String associateId) { _wfms_Associate_History.setAssociateId(associateId); }
[ "@Override\n\tpublic void setAssocHistoryId(int assocHistoryId) {\n\t\t_wfms_Associate_History.setAssocHistoryId(assocHistoryId);\n\t}", "@Override\n\tpublic void setAssociateName(java.lang.String associateName) {\n\t\t_wfms_Associate_History.setAssociateName(associateName);\n\t}", "@Override\n\tpublic java.lan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /moods : Create a new mood.
@PostMapping("/moods") @Timed public ResponseEntity<MoodDTO> createMood(@Valid @RequestBody MoodDTO moodDTO) throws URISyntaxException { log.debug("REST request to save Mood : {}", moodDTO); if (moodDTO.getId() != null) { throw new BadRequestAlertException("A new mood cannot already ...
[ "@PostMapping\n public void newMood(Authentication auth, @RequestBody Mood mood){\n ApplicationUser user = applicationUserRepository.findByUsername((auth.getName()));\n mood.setUser(user);\n LocalDateTime currentTime = LocalDateTime.now();\n mood.setTimestamp(currentTime);\n mo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if while pulling a target should be ignored (for example, because it is friendly or simply cannot be agroed).
public boolean isPullIgnored() { return name.matches(session.getPullIgnoreds()); }
[ "boolean checkShouldSkipTarget(String target) {\n return Boolean.TRUE.equals(SKIP_TARGETS.retrieve(target));\n }", "public boolean isPulling() {\r\n if(getDistance() <= 50 || session.getMe().inCombat() || isPet()) {\r\n return false;\r\n }\r\n\r\n if(session.getMe().getExtendedTargetCount(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete the tail of the snake for the board
private void unpaintTail() { board.paintPath(Arrays.asList(snake.getTail()), GridCell.EMPTY.getColor()); }
[ "private void deleteTail() {\n int cont = sizeSnake;\n for (int i = positions.size() - 1; i >= 0; i--) {\n if (cont == 0) {\n Position t = positions.get(i);\n Cells.get(t.y).get(t.x).updateColor(2);\n } else {\n cont--;\n }\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CV_spec__Group__4" $ANTLR start "rule__CV_spec__Group__4__Impl" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:15644:1: rule__CV_spec__Group__4__Impl : ( ( rule__CV_spec__SignatureDefsAssignment_4 ) ) ;
public final void rule__CV_spec__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:15648:1: ( ( ( rule__CV_spec__Signature...
[ "public final void rule__CV_spec__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:15636:1: ( rule__CV_spec__Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current Evolizer session of the given URL.
public IEvolizerSession getEvolizerSession() throws EvolizerException { // IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(fDbUrl); // return session; return fSession; }
[ "private String getSessionFromURL( String url ) {\n Pattern p = Pattern.compile( \"ses=([a-f\\\\d]+)\" );\n Matcher m = p.matcher( url );\n if ( m.find() ) {\n return m.group( 1 );\n }\n throw new NoSuchElementException( \"Couldn't find session from URL: \" + url );\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A convenient factory method, which instantiates property descriptor from its toString representation.
public static <T extends AbstractEntity<?>> PropertyDescriptor<T> fromString(final String toStringRepresentation) { try { final String[] parts = toStringRepresentation.split(":"); final Class<T> entityType = (Class<T>) Class.forName(parts[0]); final String propertyName = part...
[ "public static <T extends AbstractEntity<?>> PropertyDescriptor<T> fromString(final String toStringRepresentation, final Optional<EntityFactory> factory) {\n try {\n final String[] parts = toStringRepresentation.split(\":\");\n final Class<T> entityType = (Class<T>) Class.forName(parts[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
toString method print out the cost, neighbor and marked of the vertex
public String toString() { String vertex = "\n" + "Cost " + getCost() + "\n"; vertex += "Neighbors: " + adjacent.size() + "\n"; vertex += "Mark: " + getMarked(); return vertex; }
[ "public String toString()\n\t{\n\t \n\t\tString str = vertexName + \": \" ;\n\t\tfor(int i = 0 ; i < adjacencyList.size(); i++)\n\t\t\tstr = str + adjacencyList.get(i).vertexName + \" \";\n\t\treturn str ;\n\t\t\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder();\n String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the unlocalized name based on metadata/damage.
@Override public final String getUnlocalizedName(final int metadata) { return this.getUnlocalizedName(); }
[ "public String getUnlocalizedName(ItemStack stack) {\r\n \tEnumOreType v = EnumOreType.values()[stack.getItemDamage()];\r\n \tswitch(v) {\r\n\t \tcase IRON:\r\n\t \tcase GOLD:\r\n\t \tcase FLOUR:\r\n\t \t\treturn \"item.\"+v.name+\"_dust\";\r\n\t \tdefault:\r\n\t return \"item.unknow...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempts to find the annotation in the provided collection.
public static <T extends Annotation> Optional<T> findFirst(TypeName annoTypeName, Collection<T> coll) { String name = annoTypeName.name(); return coll.stream() .filter(it -> it.typeName().name().equals(name)) ...
[ "public static <T extends Annotation> Optional<T> findFirst(String annoTypeName,\n Collection<T> coll) {\n assert (!annoTypeName.isBlank());\n return coll.stream()\n .filter(it -> it.typeName().name().equals(annoTypeName))\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute synth terminal evaluators. The procedure must be called after the symbol span predicates are compiled. I.e. after the computeReduceInfo() call.
public void computeEvaluators() { List<Production> prods = new ArrayList<>(); int trueId = predicates.get(SymbolSpanPredicate.TRUE); for(Production p : productions) { // replace all terminals List<Symbol> syms = new ArrayList<>(); TIntArrayList predIds = new ...
[ "public void computeReduceInfo() {\n int trueId = predicates.get(SymbolSpanPredicate.TRUE);\n\n for(Production p : productions) {\n for(Symbol s : p.rhs) {\n if(s.pred != null) {\n p.preds.add(s.pred);\n p.predIds.add(s.pred.compile(predi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to construct the road maps from a JSON configuration
private static void buildRoadFromJson(String filepath) { ScriptEngine engine; ScriptEngineManager scriptEngineManager = new ScriptEngineManager(); engine = scriptEngineManager.getEngineByName("javascript"); String json; try { json = new String(Files.readAllBytes(Paths.get(filepath))); Strin...
[ "public ClientModel modelFromJSON(JSONObject newModelJSON) throws JsonSyntaxException {\n\n //Break up ClientModel pieces and build a new ClientModel object manually:\n//GET MAP\n JSONObject newMapJSON = newModelJSON.getJSONObject(\"map\");\n\n //GET RADIUS\n int newCMRadius = newMapJSON.getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use plain SQL to form this WITH statement
default With withSQL(final String sql) { return with((String) null).sql(sql); }
[ "SELECT createSELECT();", "public interface BeforeWith<T extends BeforeWith<T>> extends QueryPart, QueryPartSQL<T>, QueryPartLinked<T> {\r\n\r\n\t/**\r\n\t * Continue query with WITH\r\n\t *\r\n\t * @param name The name of the with-block\r\n\t * @return The new WITH statement\r\n\t */\r\n\tdefault With with(final...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Save to Sent items
private void sendtoSentItems() { ContentValues values = new ContentValues(); values.put("address", mSMSNumber); values.put("body", mMsgBody); mContext.getContentResolver().insert(Uri.parse("content://sms/sent"), values); }
[ "BroadcastItem saveItem(BroadcastItem item);", "private void saveItems(){\n try {\n FileUtils.writeLines(getSavedFile(), items);\n } catch (IOException e) {\n Toast.makeText(this, \"Could not load saved items!\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"saveItems()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
showing particular contact details.
@RequestMapping("/{cId}/contact") public String showContactDetail(@PathVariable("cId") Integer cId,Model model,Principal principal) { System.out.println("CID "+cId); Optional<Contact> contactOptional = this.contactRepository.findById(cId); Contact contact = contactOptional.get(); // String userName =...
[ "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "public void viewContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ View Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%n%nClient Number: \");\n\t\tin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builder a specific field comparator query fragment.
protected String getFieldComparator(FieldCondition condition) { String fieldComparator = ""; String field = popDataQuery(condition.getFieldName().toString()); String value = "'" + condition.getValue().toString() + "'"; // Dates are stored as epochs in sql schemas ...
[ "public SortBuilder(String field) {\n if (field == null) {\n field = \"\";\n }\n switch (field) {\n case \"name\":\n this.field = \"name\";\n break;\n case \"introduced\":\n this.fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Lookup a function in the module.
public Function lookup(String functionName) { Object func = functions.get(functionName); if (func == null) { throw new IllegalArgumentException(functionName); } return (Function) func; }
[ "public FunctionDefinitionNode lookupFunction(final String functionName) {\n if (isLocalFunction(functionName)) {\n return this.userDefinedFunctions.get(functionName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupFunction(functionName);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns account number based on the ip
public static int getAccountNumberFromIp(String ip){ return ipList.get(ip); }
[ "int getInIp();", "int getIp();", "int getAccountNum();", "int getClientIp();", "private int getNbAccountForHost(String host)\n {\n ProtocolProviderFactory factory =\n DictAccRegWizzActivator.getDictProtocolProviderFactory();\n\n ArrayList<AccountID> registeredAccounts \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns maximum value of matrix. Applies masking element wise if this matrix is masked.
Matrix maxAsMatrix() throws MatrixException;
[ "double max() throws MatrixException;", "public Integer max(){\n int max=data[0][0];\n for(int i=0; i<countRowTable; i++)\n for(int j=0; j<countColumnTable; j++) {\n if(data[i][j]>max){\n max=data[i][j];\n }\n }\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_ServerPORTlist.orderbyid
public void setOrderbyid(Integer orderbyid) { this.orderbyid = orderbyid; }
[ "public static void setOrderBy (String columnList){\n fetchAllOrderBy=columnList;\n }", "public void setOrderBy(boolean value) {\n this.orderBy = value;\n }", "public Integer getOrderbyid() {\r\n return orderbyid;\r\n }", "public void setServersOrder() { \r\n Server...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all fields which have the specified property set to the specified boolean value. This method searches the field property/attribute string for matching key/values.
public DBField[] getFieldsWithBoolean(String key, boolean value) { java.util.List<DBField> af = new Vector<DBField>(); for (Iterator<DBField> i = this.fieldMap.valueIterator(); i.hasNext();) { DBField fld = i.next(); if (fld.getBooleanAttribute(key,false) == value) { ...
[ "boolean getBoolean(String propertyName);", "public boolean getBoolean(String property);", "public java.util.List<Foo> findByField2(boolean field2);", "void boolField(String name, boolean isDefined, boolean value);", "public boolean getBoolean(String key) {\n\t\t//return Boolean.valueOf(getString(key)).bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the ServiceStatus and persists it. Only allowed if we claimed the coordinate.
public void updateStatus(ServiceStatus status) throws CloudnameException, CoordinateMissingException { zkCoordinateData.setStatus(status); updateCoordinateData(); }
[ "public void updateStatus(final ServiceStatus status)\n throws CloudnameException, CoordinateMissingException {\n zkCoordinateData.setStatus(status);\n updateCoordinateData();\n }", "public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}", "public void setSt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parttion takes an int array and pivot returns an object with an int array of values Greater and Lower
public static Object[] Partition(int[] A, int pivot){ // Initialize two arraylists List<Integer> lower = new ArrayList<Integer>(); List<Integer> greater = new ArrayList<Integer>(); // Iterate through each element in the int array for(int i = 0; i < A.length; i++){ // If the A[i] is less than...
[ "private static int partition( int arr[] , int first , int last ) {\n \t \n \t int pivot = arr[ last ]; // Set pivot to last element\n \t int i = ( first - 1 ); \n \n \t /**\n \t * Sorts array, putting elements less than pivot to the left\n \t * and elements greater ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds all session commands.
Builder addAllSessionCommands() { addCommandCodes(SessionCommand.SESSION_COMMANDS); return this; }
[ "Builder addAllPredefinedCommands() {\n addAllSessionCommands();\n addAllLibraryCommands();\n return this;\n }", "private void registerCommands() {\n\t\tcommands = new LinkedHashMap<>();\n\n\t\t// User Commands\n\t\tregister(JoinCommand.class);\n\t\tregister(GameListCommand.class);\n\t\tregister...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the current device supports multipackage APKs.
private boolean supportsMultiPackageApk() { return SystemProperties.getBoolean("persist.sys.child_packages_enabled", false); }
[ "public boolean isMixPackagesPresent()\n\t{\n\t\ttry\n\t\t{\n\t\t\tArrayList<Integer> versions = new ArrayList<Integer>();\n\t\t\t\n\t\t\tif(PackageInformation.getInstance().collectPkgInfoFromUPM())\n\t\t\t{\n\t\t\t\tVector<ApplicationVersion> firmwareInfo = PackageInformation.getInstance().getAppVersionsFromSpot()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a mutation for a column colName whose value is value and with tiemstamp ts.
private Mutation createMutationForCol(ByteBuffer colName, ByteBuffer value, long ts) { return new Mutation() .setColumn_or_supercolumn(new ColumnOrSuperColumn() .setColumn(new Column().setName(colName) .setValue(value).setTimest...
[ "public interface CassandraMutationTimestampProvider {\n /**\n * Returns the Cassandra timestamp at which sweep sentinels should be written.\n *\n * This is called once per API call to CassandraKeyValueServiceImpl.addGarbageCollectionSentinelValues().\n */\n long getSweepSentinelWriteTimestamp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the total number of elements in a map whose values are lists of elements.
public static <T, U> int sizeOfListMap(final Map<T, List<U>> map) { int result = 0; for (Map.Entry<T, List<U>> entry: map.entrySet()) result += entry.getValue().size(); return result; }
[ "public static <T, U> int sizeOfListMap(Map<T, List<U>> map)\n\t{\n\t\tint result = 0;\n\t\tfor (Map.Entry<T, List<U>> entry: map.entrySet()) result += entry.getValue().size();\n\t\treturn result;\n\t}", "public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'fragments'
@Test public void fragmentsTest() { // TODO: test fragments }
[ "public boolean hasFragment()\n\t{\n\t\treturn (StringUtil.isEmpty(getFragment())==false); \n\t}", "public boolean getParseFragments();", "public final boolean getSupportsFragments() {\n\t\treturn true;\n\t}", "public boolean isFragment() {\n return fragment;\n }", "@SmallTest\n public void tes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the form feature.
public void setFormFeature(String formFeature) { this.formFeature = formFeature; }
[ "@Param(nameType=NameType.FEATURE, defaultDoc = \"Feature containing the word form.\")\n public String getFormFeature() {\n return formFeature;\n }", "public void setForm(boolean form);", "public void setFeatureType( FeatureType ft ) {\n }", "@Override\n public void setFeature(String feature)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form ResultadosCarreras
public ResultadosCarreras(java.awt.Frame parent, boolean modal, LogicaAplicacion la, int index) { super(parent, modal); initComponents(); Carrera c = la.getListaCarreras().get(index); TableModelResultado t = new TableModelResultado(c.getListaCarrera()); jTableResultado.setModel(t...
[ "public void procesarResultados() {\n\t\tfor (int i = 0; i < resultadosCosecha.length; i++) {\n\t\t\tCosecha c = new Cosecha();\n\t\t\tfor (int j = 0; j < resultadosCosecha[i].length; j++) {\n\t\t\t\tswitch(j){\n\t\t\t\tcase 0:\tc.setNombre(String.valueOf(resultadosCosecha[i][j])); break;\n\t\t\t\tcase 1: c.setCult...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates scene containing either instructions or credits and a return to menu button and adds them to a root node, then returns a scene container that is made from the root node.
public Scene initialise(int width, int height) { root = new Group(); informationScene = new Scene(root, width, height); Button backButton = new Button(); backButton.setText("Press Enter to Return to Menu"); switch (displayInfo) { case 1: informationScene.setFill(new ImagePattern(new Image("fil...
[ "public Scene setupMenu() {\n\n Group root = new Group();\n\n MenuText titleText = new MenuText(centerX, sceneHeight / 4 + BOX_HEIGHT / 5, TITLE, Main.TITLE_FONT);\n\n //on clicking start, start level1\n EventHandler <MouseEvent> startHandler = new EventHandler<MouseEvent>() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an aliased SAMPLE.SAMPLE_ORDER_PRODUCT table reference
public SampleOrderProduct(Name alias) { this(alias, SAMPLE_ORDER_PRODUCT); }
[ "public SampleOrderProduct(String alias) {\n this(DSL.name(alias), SAMPLE_ORDER_PRODUCT);\n }", "private void generateProductTable() {\n productInventory.setAll(Inventory.getAllProducts());\n productTable.setItems(productInventory);\n productTable.refresh();\n }", "private stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write this message to the dataOutput stream such that this message can be completely reconstructed through this.read(dataInput).
public void write(DataOutput dataOutput) throws IOException { if (this.wrappedMessage != null) { MessageHelper.writePublishable(dataOutput, wrappedMessage); } else if (messageClassName != null && messageBytes != null) { dataOutput.writeBoolean(true); MessageHelper.writeString(dataOutput, m...
[ "private void writeData() {\n appendBytes(message.getData().getValue());\n LOGGER.debug(\"Data: {}\", message.getData().getValue());\n }", "public void write(DataOutput dataOutput) throws IOException {\n MessageHelper.writeString(dataOutput, line);\n }", "public abstract void writeData(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to find a random location on this map (reachable from the center) within some bounds. The bounds provided must be within map bounds.
public Location getRandomLocationInBounds(Set<String> roads, int iterations, double minLat, double maxLat, double minLon, double maxLon) { Location loc; for (int i = 0; i < iterations; i++) { double latDiff = maxLat - minLat; double lonDiff = maxLon - minLon; double lat = minLat + RNG.nextDouble() * l...
[ "public static Point random(Point bounds) {\r\n\tint x = RNG.nextInt(bounds.x);\r\n\tint y = RNG.nextInt(bounds.y);\r\n\treturn new Point(x, y);\r\n }", "Spawn(LatLngBounds bounds) {\n Random rand = new Random();\n double rangeNS = bounds.northeast.latitude - bounds.southwest.latitude;\n d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the billingStartDate value for this UpdateRecurringPaymentsProfileRequestDetailsType.
public java.util.Calendar getBillingStartDate() { return billingStartDate; }
[ "public OffsetDateTime billingPeriodStartDate() {\n return this.innerProperties() == null ? null : this.innerProperties().billingPeriodStartDate();\n }", "public void setBillingStartDate(java.util.Calendar billingStartDate) {\r\n this.billingStartDate = billingStartDate;\r\n }", "@ApiModelPr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Produces a JSON object structure describing the specified Java package.
private JsonNode json(ObjectMapper mapper, JavaPackage javaPackage) { ObjectNode node = mapper.createObjectNode(); ArrayNode imports = mapper.createArrayNode(); for (JavaPackage dependency : javaPackage.getDependencies()) { imports.add(dependency.name()); } Set<Depe...
[ "protected abstract String getJavaPackage();", "public JavaPackage getJavaPackage();", "public Package getPackage();", "String getPackage();", "public JavaPackage asJavaPackage() {\r\n\t\tJavaPackage outPckg = null;\r\n\t\tString pckgStr = this.asString();\r\n\t\tif (!Strings.isNullOrEmpty(pckgStr)) {\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method generates all the ways of dividing totalNodes into two sets each containing at least one node. It will generate one set for each possible partitioning. The other partition is implied in the absent values. In order not to generate the inverse of any set, we always include the 0th node in our sets.
@VisibleForTesting static Set<Set<Integer>> generatePartitions(int totalNodes) { checkArgument(totalNodes > 1, "totalNodes must be greater than 1"); Set<Integer> numbers = IntStream.range(0, totalNodes) .boxed() .collect(toImmutableSet()); ...
[ "private HashMap<List<Integer>, UniqueSet> getMinimalUniqueSets() {\n\n\t\t// for each node in each mapping\n\t\t// generate list of nodes that are shared\n\t\t/*\n\t\t * i.e.\n\t\t * [[3, 3], [0, 2], [2, 0], [4, 4], [1, 1], [5, 5], [6, 6]]\n\t\t * [[2, 2], [0, 3], [3, 0], [4, 4], [1, 1], [5, 5], [6, 6]]\n\t\t * [[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the pensioncertificateneedrecovery property.
public void setPENSIONCERTIFICATENEEDRECOVERY(boolean value) { this.pensioncertificateneedrecovery = value; }
[ "public boolean isPENSIONCERTIFICATENEEDRECOVERY() {\r\n return pensioncertificateneedrecovery;\r\n }", "public void setRecovery (java.lang.String recovery) {\n\t\tthis.recovery = recovery;\n\t}", "public void setRecovery(entity.Recovery value) {\n __getInternalInterface().setFieldValue(RECOVERY_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Vector For Storing Customers in The Bank BANK ADMIN LIST
public static void main(String[] args) { Vector<AdminBank> Admin_Bank_List =new Vector<>(); AdminBank ad1=new AdminBank("admin","admin"); AdminBank ad2=new AdminBank("abc","abc"); AdminBank ad3=new AdminBank("riz123","qwerty"); Admin_Bank_List.add(ad1); Admin_Bank_List.ad...
[ "private static void assignBankAccounts() {\n\t\tfor (Customer customer : customerList) {\n\t\t\t//make sure customer has no current accounts before adding serialized accounts\n\t\t\tcustomer.clearAccounts();\n\t\t\t\n\t\t\tfor (BankAccount account : accountList) {\n\t\t\t\tif (account.getCustomer().getUsername().e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRulePrimitiveType" $ANTLR start "rulePrimitiveType" InternalBasicAttributes.g:352:1: rulePrimitiveType : ( ( rule__PrimitiveType__Group__0 ) ) ;
public final void rulePrimitiveType() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBasicAttributes.g:356:2: ( ( ( rule__PrimitiveType__Group__0 ) ) ) // InternalBasicAttributes.g:357:2: ( ( rule__PrimitiveType__Group__0 ) ) ...
[ "public final void rulePrimitiveType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:456:2: ( ( ( rule__PrimitiveType__Group__0 ) ) )\n // InternalTaskDefinition.g:457:2: ( ( rule__PrimitiveType__Group__0 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overrides the Object equals method to determine equivalence between two Graph objects
public boolean equals(Object o){ if (o == null){ return false; } else if (o == this){ return true; } else if (o.getClass() != this.getClass()){ return false; } HashGraph otherGraph = (HashGraph)o; return otherGraph.graph.equals(this.graph); }
[ "@Override\n public boolean equals (Object other_g) {\n int current_key, neighbor_key;\n // if other is from a different object\n if (!(other_g instanceof directed_weighted_graph))\n return false;\n directed_weighted_graph graph_other = (directed_weighted_graph) other_g;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty value (as xml) as the last "additionalInput" element
ch.crif_online.www.webservices.crifsoapservice.v1_00.KeyValuePair addNewAdditionalInput();
[ "org.apache.xmlbeans.XmlString addNewParam();", "void xsetAdditionalField1(org.apache.xmlbeans.XmlString additionalField1);", "void xsetAdditionalField2(org.apache.xmlbeans.XmlString additionalField2);", "org.apache.xmlbeans.XmlObject addNewCValue();", "void xsetAdditionalField3(org.apache.xmlbeans.XmlStrin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The higher the value, the better the planet is (used for planets not owned by this player).
private int oppPlanetValue(Planet p, PlayerUtils.Location center) { int value = 0; // scale the production value to 0-1 (1 being least production time). double productionValue = -(p.PRODUCTION_TIME - 100) / 66.0; // scale the unit value to 0-1 (1 being least # of units). // o...
[ "private double getPlanetMass() {\r\n\t\treturn MathUtils.randRange(MIN_PLANET_MASS, MAX_PLANET_MASS);\r\n\t}", "public int getCurrPlanet() {\r\n\t\treturn planetNum;\r\n\t}", "public int getPlanetWidth() {\r\n\t\treturn planetWidth;\r\n\t}", "private Vector3f getPlanetPosition() {\r\n\t\tVector3f position = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last inserted mailbox
public String getForwardMailbox() { if(forwardPaths.size() > 0) { //Selects the last added mailbox String s = forwardPaths.get(forwardPaths.size() - 1); return ValidateData.getMailbox(s); } //Returns unknown if no mailbox is stored return "Unknown"; }
[ "public Message getLastReceivedMessage(){\n\t\treturn messageBox.pollLast();\n\t}", "int getLastMessageDest();", "public String getMailbox() {\n return mailbox;\n }", "public jakarta.mail.Message GetLatestMail()\n {\n try {\n Folder inbox = store.getFolder(\"Inbox\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a request builder for the PassiveDnsRecord collection
@Nonnull public com.microsoft.graph.security.requests.PassiveDnsRecordCollectionWithReferencesRequestBuilder passiveDnsReverse() { return new com.microsoft.graph.security.requests.PassiveDnsRecordCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment("passiveDnsReverse"), getClient(), nul...
[ "@Nonnull\n public com.microsoft.graph.security.requests.PassiveDnsRecordCollectionWithReferencesRequestBuilder passiveDns() {\n return new com.microsoft.graph.security.requests.PassiveDnsRecordCollectionWithReferencesRequestBuilder(getRequestUrlWithAdditionalSegment(\"passiveDns\"), getClient(), null);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show the next frame of animation. Return true if we are still animating, false otherwise.
private boolean showNextFrame() { AnimationFrame frame = window.waitForNextFrame(); if (frame == null) { // For example, if the window was closed return false; } for (int y = 0; y < grid.length; y++) { for (int x = 0; x < grid[y].length; x++) { ...
[ "protected boolean nextFrame() {\n if (counter % FRAME_DELAY == 0) {\n currFrame = (currFrame + 1) % currAnimation.getLength();\n return true;\n } else { return false; }\n }", "public boolean advance() {\n currentFrame ++;\n if(currentFrame >= frames.size()) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Matches username to domain and returns matching users.
@WebMethod(operationName = "WEBWebUserFindUsersByDomain", action = "http://www.avectra.com/2005/WEBWebUserFindUsersByDomain") @WebResult(name = "WEBWebUserFindUsersByDomainResult", targetNamespace = "http://www.avectra.com/2005/") @RequestWrapper(localName = "WEBWebUserFindUsersByDomain", targetNamespace = "h...
[ "List<UserRepresentation> searchUserAccount(final String username);", "private List<String> extractUserNames(List<UserSearchInput> values)\n {\n List<String> result = new ArrayList<String>();\n if (values != null)\n {\n for (UserSearchInput value : values)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method resolves mappings for times and dates e.g timestamp___, date___, datetime___, time___
private String resolveMappings(String propValue){ Date date = new Date(); TimeZone timeZone = TimeZone.getTimeZone("Africa/Nairobi"); if(propValue.equals("timestamp___")){ Long timestamp = System.currentTimeMillis(); return timestamp.toString(); } else if(...
[ "private void prepareTypeMappings()\r\n\t{\r\n\t\ttypeResolver\r\n\t\t\t\t.addAbstractTypeMapping(INotification.class, Notification.class)\r\n\t\t\t\t.addAbstractTypeMapping(IRequestInfo.class, RequestInfo.class)\r\n\t\t\t\t.addAbstractTypeMapping(IRequestedAnnouncement.class,\r\n\t\t\t\t\t\tRequestedAnnouncement.c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds and adds a row in the info view.
private void addInfoRow(List<Text> list) { TextFlow textFlow = new TextFlow(); Insets padding = new Insets(0, 5, 0, 5); textFlow.setPrefWidth(300); textFlow.setPadding(padding); for (Text text : list) { textFlow.getChildren().add(text); } infoViewLayout.getChildren().add(textFlow); }
[ "private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The standard way to save classifiers and Mallet data for repeated use is through Java serialization. Here we load a serialized classifier from a file.
public Classifier loadClassifier() throws FileNotFoundException, IOException, ClassNotFoundException { Classifier classifier; File file = new File(getServletContext().getRealPath("/WEB-INF/tweets.classifier")); ObjectInputStream ois = new ObjectInputStream (new FileInputStream (file)); ...
[ "void runClassifier(File fileToClassify) throws IOException;", "private static void serializeDataset() throws ClassNotFoundException {\n\t\tPreprocessing preprocess = new Preprocessing();\n\t\tFileUtil futil = new FileUtil();\n\t\tString folname = \"/Users/Shubham/Documents/workspace/ILP/amr_anno_1.0/data/unsplit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new Lane at the specific coordinates.
public Lane(int xPos, int yPos) { super(xPos, yPos); }
[ "ILane createLane();", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "Coordinate createCoordinate();", "public Road(int x, int y, int width, int height)\n {\n screenWidth = width;\n screenHeight = height;\n xTopLeft = x;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table tb_express_trace
@Insert({ "insert into tb_express_trace (order_id, num, ", "com, status, message, ", "ischeck, traceJson, ", "create_time, ", "last_udpate_time)", "values (#{orderId,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR}, ", "#{com,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR...
[ "@Select({\n \"select\",\n \"order_id, num, com, status, message, ischeck, traceJson, create_time, last_udpate_time\",\n \"from tb_express_trace\",\n \"where order_id = #{orderId,jdbcType=VARCHAR}\"\n })\n @ResultMap(\"BaseResultMap\")\n TbExpressTrace selectByPrimaryKey(String ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set player p (WP or BP) to be a manual player.
public void manualCommand(Piece p) { _playing = false; _players[p.ordinal()] = new HumanPlayer(p, this); }
[ "@Override\n public void antidote(Player p) {\n LOG.wtf(this.getClass().getSimpleName(), \"ANTIDOTE SET TO \" + p.toString());\n }", "public void setPlayer(Player p) {\n\t\tplayerToUpdate = p;\n\t}", "public void changePlayerMode(PlayerMode p) {\n\t\t\r\n\t\tplayerMode = p;\r\n\t\tif (playerMode !=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 sub_order_id = 2;
public int getSubOrderId() { return subOrderId_; }
[ "int getSubOrderId();", "int getSubReqID();", "int getDpdOrderID();", "public Integer getOrder_id() {\n return order_id;\n }", "UUID getOrderID();", "io.dstore.values.IntegerValue getFromOrderStateId();", "public void setOrder_id(Integer order_id) {\n this.order_id = order_id;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Access to the variable this.namepurchase with namepurchase
public void setNamepurchase(String namepurchase) { this.namepurchase = namepurchase; }
[ "public String getNamepurchase() {\n return namepurchase;\n }", "public String getPurchasecopy() {\r\n return purchasecopy;\r\n }", "java.lang.String getPaidName();", "public String getPayeename() {\n return payeename;\n }", "public String getPurchasecopy() {\r\n\t\treturn purc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Education Forms List
@Override @RequestMapping(value = "", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "authorization", value = "oAuth Access token for API calls", defaultValue = "Bearer DF0310", required = true, dataType = "string", paramType = "header") }) public Iterable<EducationFor...
[ "ReferenceList getListForms( );", "public List<HasFormAssociation> listFormAssociations();", "public abstract Collection<Pair<String,String>> getAllForms();", "public List<TRForm> viewFormforSupervisors(int eid);", "List<TuitionReimbursementForm> getTuitionForms();", "void showFormSections(List<FormSectio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reduction methods Each reduction method returns a count which is the number of reductions that it has performed during its pass through the code. this reduction method looks for ld[abefdw] 0 and replaces it with the equivalent clr[abefdw] differences in the handling of the carry bit between these two instructions force...
public int loadAccumulatorImmediateZeroRegisterInstructionCollapse(LinkedList<Assembly> ll, int reductionLevel) { int reductionCounter = 0; for (Iterator<Assembly> i = ll.iterator(); i.hasNext(); ) { Assembly as = i.next(); for (int h = 0; h < as.size(); h++) { AsmLine l1 = as.get(h); if ...
[ "public int num_reductions() {return _num_reductions;}", "public void note_reduction_use() {_num_reductions++;}", "private void reductions() {\n for (STATE state : _states.values()) {\n addreductions(state);\n }\n }", "protected abstract double getReductionFactor();", "int getRed...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an instance of the PushCommand.
private Command createPushCommand() { return new PushCommand(); }
[ "public Push() {\n super(ActionType.PUSH);\n }", "private Command createPopCommand() {\n\t\treturn new PopCommand();\n\t}", "public static Command create(String instruction) {\n return new GenericQMP(instruction);\n }", "Command createCommand();", "public PushNotification() {\n\t}", "protect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a Publisher given the Id
public Publisher getById(Long id) { return this.publisherRepository.getById(id); }
[ "Publisher getPublisher(String aId) throws Exception;", "Optional<Publisher> findById(long id);", "@GET\n @Path(\"/{id : \\\\d+}\")\n @Produces(APPLICATION_JSON)\n @ApiOperation(value = \"Find a publisher by the Id.\", response = PublisherDTO.class)\n @ApiResponses(value = {\n @ApiResponse(co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns which bucket contains the mean.
private int MeanBucket() { return(getBucketIdx(Mean())); }
[ "int getAvgBucketSize();", "java.lang.String getBucket();", "public String getBucket();", "public int getBucketNum()\r\n {\r\n return bucketNum;\r\n }", "default double geometricMean() {\n return geometricMean.summarize(this);\n }", "public double getAverageBucketSize(){\r\n int nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the "bool" element
public void setBool(gov.nih.nlm.ncbi.www.UserFieldDocument.UserField.Data.Bool bool) { synchronized (monitor()) { check_orphaned(); gov.nih.nlm.ncbi.www.UserFieldDocument.UserField.Data.Bool target = null; targ...
[ "void setBoolean(boolean val);", "void setBoolean(boolean value);", "public void setBoolean(String name, boolean value);", "public void setValue(boolean booleanValue);", "public void setTrue() {\n state = true;\n }", "void setBooleanProperty(String name, boolean value);", "public void setTallied(jav...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The request builder for this WorkbookFunctionsSumIf
public BaseWorkbookFunctionsSumIfRequestBuilder(final String requestUrl, final IBaseClient client, final java.util.List<Option> requestOptions, final com.google.gson.JsonElement range, final com.google.gson.JsonElement criteria, final com.google.gson.JsonElement sumRange) { super(requestUrl, client, requestOpti...
[ "public IWorkbookFunctionsSumIfRequest buildRequest(final java.util.List<Option> requestOptions) {\n WorkbookFunctionsSumIfRequest request = new WorkbookFunctionsSumIfRequest(\n getRequestUrl(),\n getClient(),\n requestOptions\n );\n\n if (hasParamet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get application meta info of corresponding package.
public static Bundle getApplicationMetaInfo(Context context, String packageName) { ApplicationInfo appInfo = packageName.equals(context.getPackageName()) ? context.getApplicationInfo() : null; Bundle metaInfo = appInfo != null ? appInfo.metaData : null; if (metaInfo == null) { ...
[ "public T packageInfo( String packageName ) {\n\t\treturn packageNamesToInfo.get( packageName );\n\t}", "public static List<AppInfo> getAppsInfo() {\n List<AppInfo> list = new ArrayList<>();\n PackageManager pm = getApp().getPackageManager();\n List<PackageInfo> installedPackages = pm.getInst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Creates a door object on a specified side within a specified room.
public Door(int doorSide, Room room) { this.doorSide = doorSide; this.containingRoom = room; initDoorResources(); }
[ "public void createDoor() {\n Door door = new Door((Display.getWidth() / 2.0f) - 50, Display.getHeight() - 150, 148, 125, \"res/assets/ExitDoor.png\",1);\n\n addObj(door);\n }", "private static Object createDoor(final IGameObjects gameObjects, XMLTag door) {\n XMLTag position = door.getEle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last e s f entity state in the ordered set where className = &63; and classPK = &63;.
public it.ethica.esf.model.ESFEntityState fetchByESFEntityStateCName_CPk_Last( java.lang.String className, long classPK, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException;
[ "public it.ethica.esf.model.ESFEntityState findByESFEntityStateCName_CPk_Last(\n\t\tjava.lang.String className, long classPK,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tit.ethica.esf.NoSuchEntityStateException;", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter to compute the total interest accrued over the course of the mortgage
public double totalInterest(){ return (this.getBlendedPayment() * this.mPay) - this.principle; }
[ "public double getTotalInterestEarned()\r\n {\r\n return totalInterestEarned;\r\n }", "public double getAccruedInterest() {\n return _accruedInterest;\n }", "public int getAnnualIncome() {\n return annualIncome;\n }", "public double getEarnedInterest()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "access_list" D:\\decomplier_tools\\smali\\smali\\smali\\src\\main\\antlr3\\smaliTreeWalker.g:222:1: access_list returns [int value] : ^( I_ACCESS_LIST ( ACCESS_SPEC ) ) ;
public final int access_list() throws RecognitionException { int value = 0; CommonTree ACCESS_SPEC15 = null; value = 0; try { // D:\\decomplier_tools\\smali\\smali\\smali\\src\\main\\antlr3\\smaliTreeWalker.g:227:3: ( ^( I_ACCESS_LIST ( ACCESS_SPEC )* ) ) // ...
[ "Accessions getAccessions();", "List<AccessRights> getAccessRights();", "declaration_list2 getDeclaration_list2();", "Access getAccess();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 504,\n FQN=\"llvm::Module::getAliasList\", NM=\"_ZN4llvm6Mo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Imports SOAP Headers Features that allows to operate with SOAP headers.
public GlobalFeatures importGlobalFeatures(GlobalFeatures globalFeatures, WSDLBinding binding) { FeatureType headersFeature = new FeatureType(); headersFeature.setName(HeadersFeature.NAME); String provider = DefaultProviders.getProvider(headersFeature.getName()); if (provider != null) { headersF...
[ "private SOAPHeader getSoapHeader(List extensibles)\n {\n SOAPHeader soapHeader = null;\n\n // find the soap header\n if (extensibles != null)\n {\n Iterator i = extensibles.iterator();\n while (i.hasNext() && soapHeader == null)\n {\n try\n {\n soapHeader = (SOAPH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes an active player from the game given its color
public void removePlayer(String color){ this.getPlayer(color).setActive(false); removeXPlayers(this.getPlayer(color).getPIndex()); turn = this.xPlayers.indexOf(currentPlayer); }
[ "private void removeChip(int x, int y, int color) {\n if (color == myColor) {\n machinePlayerChips--;\n } else if (color == opponentColor) {\n opponentChips--;\n }\n board[x][y] = EMPTY;\n }", "ILoColor removeColor(Color toRemove);", "void unsetColor();", "public void remove(){\r\n\t\tl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs the Exception with a default message referring to the id of the comment not found.
public CommentNotFoundException(long id) { super("Comment not found by id:" + id); }
[ "public MessageNotFoundException(String message, String ID){\r\n\t\tsuper(message, ID);\r\n\t}", "public ReviewEntityNotFoundException(String message, ExceptionData data, long id) {\n super(message, data);\n\n this.id = id;\n }", "public IlegalCommentException(String message) {\r\n\t\tsuper(mes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets or clears the get_locations boolean.
public void setGetLocations(boolean get_locations) { this.get_locations = get_locations; }
[ "public void setSeveralLocations(boolean value) {\r\n this.severalLocations = value;\r\n }", "public boolean is_set_location() {\n return this.location != null;\n }", "boolean isSetLocation2();", "boolean isSetLocationFilterOptions();", "void setMyLocationEnabled(boolean enabled);", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Verify that the "Init Database" is downloaded successfully when clicking on the "Init Database" link
@Test public void TC640DADD_33(){ Reporter.log("Verify that the Init Database is downloaded successfully when clicking on the 'Init Database' link"); /*1. Navigate to DTS portal 2. Log into DTS portal as a DTS user successfully 3. Navigate to "Apps & Devices" page 4. Click "Add App or Device" link 5...
[ "private void initDatabase(){\r\n\t\ttry {\r\n\t\t\tif(!isDatabaseValid()){\r\n\t\t\t\tcleanDatabase();\r\n\t\t\t\tcreateTables();\r\n\t\t\t\tDatabasePopulator.demoPopulate();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Failed to check database validity: \" + e);\r\n\t\t\tSystem.exit(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves an article. If the supplied article has a populated ID, the save operation is treated as an update. If the supplied article does not have a populated ID, the save operation is treated as a create.
public Article save(Article article);
[ "public Article save(Article article) {\n return articleRepository.save(article);\n }", "@Transactional\n\tpublic void saveArticle(Article article) {\n\t\tArticle existingArticle = articleDAO.findArticleByPrimaryKey(article.getId());\n\n\t\tif (existingArticle != null) {\n\t\t\tif (existingArticle != ar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a JSON array to a Config.
private static void loadJson(JsonArray array, ConfigImpl config, String key) { int index = 0; for (JsonElement element : array) { String newKey = addToKey(key, Integer.toString(index)); loadJson(element, config, newKey); index++; } }
[ "void appendArray(Object jsonArray, String key, Object value);", "void add(JSONValue val)\n {\n this.array.add(val);\n length += val.size();\n }", "public void test_putJSONArray() {\n Exception ex = null;\n try {\n System.setProperty(\"org.apache.wink.common.model.json.factory.i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "PostalBox" element
public void xsetPostalBox(org.apache.xmlbeans.XmlString postalBox) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(POSTALBOX$28, 0); if (t...
[ "public void setPostalBox(java.lang.String postalBox)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTALBOX$28, 0);\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//GENEND:|38getter|2| //GENBEGIN:|39getter|0|39preInit Returns an initiliazed instance of tfFormRegistro component.
public TextField getTfFormRegistro() { if (tfFormRegistro == null) {//GEN-END:|39-getter|0|39-preInit // write pre-init user code here tfFormRegistro = new TextField("Registro / Conta:", "1 de 55 Conta 10", 32, TextField.ANY | TextField.UNEDITABLE);//GEN-LINE:|39-getter|1|39-postInit ...
[ "public TextField getTfFormVencimento() {\n if (tfFormVencimento == null) {//GEN-END:|42-getter|0|42-preInit\n // write pre-init user code here\n tfFormVencimento = new TextField(\"Data de Vencimento:\", \"15/05/2009\", 12, TextField.ANY | TextField.UNEDITABLE);//GEN-LINE:|42-getter|1|4...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns value for specified key as char.
public char getChar(final Object key) { return getMixed(key).toChar(); }
[ "@NativeCallable\n public char getChar(String key) {\n return getChar(key, (char) 0);\n }", "@Override\n\tpublic char getParameterAsChar(String key) throws UndefinedParameterError {\n\t\tString parameterValue = getParameter(key);\n\t\tif (parameterValue.length() > 0) {\n\t\t\treturn parameterValue.ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
description: UserService date: 2021/1/11 22:14 author: LIBEL version: 1.0
public interface UserService { /** * description: 用户登录 * version: 1.0 * date: 2021/1/11 22:38 * author: LIBEL * * @param param * @return com.adp.FTXSecurity.model.vo.UserVo */ UserVo login(LoginParam param); /** * description: 更新用户信息 * version: 1.0 * d...
[ "public interface UserService {\n\n boolean login(String user, String pass);\n String register(String username, String password, String country, int age);\n User getLoggedUser();\n void setLockSuggestions(boolean val);\n boolean getLockSuggestions();\n Document getUserById(String id);\n List<Us...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method gets the raw weather data of the cities by zipcode current overall condition, maximum temperature, minimum temperature, and current temperature. The data is returned as a String array of size 4. index 0 = overall condition index 1 = max temp index 2 = min temp index 3 = current temp Uses openweather API
String[] getRawWeatherDataByZipcode(String zipcode) throws JsonSyntaxException, Exception { final String urlHalf1 = "http://api.openweathermap.org/data/2.5/weather?q="; final String apiCode = "&APPID=0bc46790fafd1239fff0358dc4cbe982"; String url = urlHalf1 + zipcode + ",us" + apiCode; String[] weatherData = ...
[ "String[] getRawWeatherData(String city) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + city + apiCode;\n\n\t\tString[] weatherData ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Desvira a carta, mostra o valor dela
public void desvirar() throws Exception{ //Caso a carta já esteja desvirada é retornado um erro if(!isViradaParaBaixo()) throw new Exception("A carta já está desvirada"); //Caso contrário somente é desvirado a Carta. this.viradaParaBaixo = false; }
[ "void eliminarCarta(Carta cartaEliminar);", "public Carta sacarCarta()\n {\n Carta cartaADevolver = null;\n if(mazo.size() > 0){\n cartaADevolver = mazo.remove(0);\n }\n return cartaADevolver;\n }", "public Carta sacarCarta()\n {\n Carta cartaADevolver = null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called by installUI to get the editor component of the JSpinner. By default it just returns JSpinner.getEditor(). Subclasses can override createEditor to return a component that contains the spinner's editor or null, if they're going to handle adding the editor to the JSpinner in an installUI override. T...
protected JComponent createEditor() { return spinner.getEditor(); }
[ "public JawbComponent getEditorComponent () {\n if (editorComponent == null)\n initEditorComponent ();\n return editorComponent;\n }", "public Component getComponent() {\n return editorTextField;\n }", "public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}", "public java.awt.Com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Obtain the loaded ConnectionProperties.
static ConnectionProperties getProperties() throws Throwable { if (_props == null) { synchronized (_lock) { if (_props == null) loadProperties(); } } return _props; }
[ "private static void loadProperties()\n {\n try\n {\n _props = ConnectionProperties.load();\n }\n catch (Throwable t)\n {\n Logger.err(\"[DelegateHelper.loadProperties] Error \", t);\n _props = ConnectionProperties.getDefaultProperties();\n }\n }", "public java.util.Properties ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
============================================================================ ============================================================================ closes all tabs but original and returns control to original tab
public void closeAllTabsButOriginal() { //if only 1 tab - close it if (driver.getWindowHandles().size() == 1) { driver.close(); } else { String originalHandle = driver.getWindowHandles().toArray()[0].toString(); //Do something to open new tabs ...
[ "public void closeOpenedTabs() {\n\t\tString originalHandle = driver.getWindowHandle();\t \n\t for(String handle : driver.getWindowHandles()) {\n\t if (!handle.equals(originalHandle)) {\n\t driver.switchTo().window(handle);\n\t driver.close();\n\t }\n\t }\n\t driver.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'TNode Type'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseTNodeType(TNodeType object) { return null; }
[ "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 caseType(Type object)\n {\n return null;\n }", "TypeNode typ(AstNode node);", "public T caseNodeOperationType(NodeOperationType object) {\n\t\treturn null;\n\t}", "priva...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets all virtual children of a ParseNode. There is no guarantee about the ordering of these children.
public List<ParseNode> getVirtualChildren() { List<ParseNode> children = new ArrayList<ParseNode>(); if (virtualChildren == null) { return children; } Collection<Set<VirtualParseNode>> childrenSets = virtualChildren.values(); for (Set<VirtualParseNode> parseNodeSet : childrenSets) ...
[ "public StrieNode[] getAllChildren(){\r\n\t\t// O(1)\r\n\t\treturn children;\r\n\t}", "public List<ParseNode> getChildren()\r\n\t{\r\n\t\treturn children;\r\n\t}", "public Vector getChildren()\r\n\t{\r\n\t\treturn m_children;\r\n\t}", "public Iterator<ParseTreeNode> children() {\r\n if ((_children == n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end setMicroClSum Increases the number of micro classifiers in the set.
public void increaseMicroClSum(int mCl) { microClSum += mCl; }
[ "public void addClassifier(Classifier cl) { \r\n try {\r\n \tset[macroClSum] = cl;\r\n \tmicroClSum += cl.getNumerosity();\r\n \tmacroClSum++;\r\n\t}catch (Exception e){\r\n System.out.println (\"Exception in the insertion of a new classifier. The macroClSum is : \"+macroClSum+\" and t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is responsible for removing the cwcDetails Its a lengthy way to do it modify it later when requirements are clear.
public String removeCwcMembers(CwcDetailCompositeDTO cwcDetailCompositeDTO) { String result="error"; List<CwcDetailPK> cwcDetailPKs=new ArrayList<CwcDetailPK> (); List<CwcDetail> cwcDetails=new ArrayList<CwcDetail> (); List<CwcDetail> cwcDetailsToModify=new ArrayList<CwcDetail> ...
[ "void unsetCustomsDetails();", "public void removeFromCedingHistory(entity.WCCededPremiumHistory element);", "public void removeCard(){\t\t\n\t\tthis.card=null;\n\t}", "public void removeAlterationLineItemDetailAt(int iCtr) {\n if (iCtr < 0 || listAlterationLineItemDetails == null\n || iCtr > listAl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column COURT_ROOM.ROOM_MEMO
public void setRoomMemo(String roomMemo) { this.roomMemo = roomMemo; }
[ "public void setRoom(int value) {\n this.room = value;\n }", "public void setMomo(String momo) {\n\t\tthis.momo = momo == null ? null : momo.trim();\n\t}", "public void setSoulMate(MOB mob);", "public void setRoom2(Room room);", "public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of addRule method, of class Connection.
@Test public void testAddRule() { System.out.println("addRule"); ConnectionRule rule = null; Connection instance = new Connection(); instance.addRule(rule); int resultSize = instance.getRules().size(); assertEquals(1, resultSize); ConnectionRule resultRule = i...
[ "@Test\r\n public void testAddRule() throws Exception{\r\n System.out.println(\"addRule\");\r\n RuleSetImpl instance = new RuleSetImpl(\"Test\", true);\r\n instance.addRule(new RegExRule(\".*\", \"string\"));\r\n instance.addRule(new RegExRule(\"a.*\", \"aString\"));\r\n List<R...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get total number of questions by author
public int getNumOfQuestionByAuthor(String author){ String sql = "SELECT COUNT (*) AS TotalQuestion FROM Question WHERE Author = ?"; try { PreparedStatement st = connection.prepareStatement(sql); st.setString(1, author); ResultSet rs = st.executeQuery(); w...
[ "int getTotalAuthorReviewByAuthorName(String name);", "Long countByAuthor(Long authorId) ;", "int getAuthorsCount();", "@Override\n\tpublic int countByAuthor(String author) {\n\t\tauthor = Objects.toString(author, \"\");\n\n\t\tFinderPath finderPath = _finderPathCountByAuthor;\n\n\t\tObject[] finderArgs = new...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO This is slightly imprecise if inner timer is running because two clock reads will be made by totalTimer.sumTime() and innerSumTime().
private long outerSumTime() { return totalTimer.sumTime() - innerSumTime(); }
[ "public TimeSpan getInnerSumTime() {\n return totalTimer.export(innerSumTime());\n }", "public Timer getOverallTimer();", "private long currentOuterInterval() {\n return isRunning() ? totalTimer.currentInterval() - currentInnerTimer.sumTime() : 0;\n }", "public int getTotalTime() {\n if (active...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string strval = 1;
boolean hasStrval();
[ "void setValuestr(final String valuestr);", "java.lang.String getVal();", "private String getDefaultValue(String str, String def) {\r\n\t\tif ( (str != null) && (str.length() > 0)) {\r\n\t\t\treturn str;\r\n\t\t}\r\n\t\treturn def;\r\n\t}", "String getInitValue();", "public static Value makeAnyStr() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter gets whether box is full
public boolean setBoxFull() { return full; }
[ "public boolean isBox() {\n return box;\n }", "public void setFull(boolean boxFull) {\n full = boxFull;\n }", "public void setBoxFull(boolean full)\n\t{\n\t\tthis.full = full;\n\t}", "public boolean isBoxUsefulSize()\r\n\t{\r\n\t\tBlockPos size = size();\r\n\t\treturn size.getY() >= MIN_SIZE && ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }