query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
drops table if the table_name already exists
@Override public void onUpgrade(SQLiteDatabase db, int i, int i1) { db.execSQL("DROP TABLE IF EXISTS " +Table_Name); onCreate(db); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }", "private static void dropBackupTableIfExist(SQLiteDatabase database, String tableName) {\n database.exec...
[ "0.7785208", "0.73674184", "0.7201932", "0.7068601", "0.7047398", "0.68599284", "0.68494564", "0.68346715", "0.68210864", "0.67659676", "0.67462784", "0.67192096", "0.6637822", "0.6630043", "0.661467", "0.6612423", "0.6596296", "0.65959525", "0.6595488", "0.6595488", "0.65939...
0.0
-1
code borrow from tutorial: add content to database
public boolean insertProperty(String forename, String surname, String type, String bedroom, String furniture, String date, String time, String rent, String notes, byte[] picture) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues contentValues = new ContentValues(); contentValues.put(col_1, forename); contentValues.put(col_2, surname); contentValues.put(col_3, type); contentValues.put(col_4, bedroom); contentValues.put(col_5, furniture); contentValues.put(col_6, date); contentValues.put(col_7, time); contentValues.put(col_8, rent); contentValues.put(col_9, notes); contentValues.put(col_10, picture); long result = db.insert(Table_Name, null, contentValues); if (result == -1){ return false; }else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"M...
[ "0.66735196", "0.64337534", "0.6354976", "0.63402325", "0.62352866", "0.6171187", "0.61591536", "0.6145335", "0.6091294", "0.6089664", "0.6075351", "0.6064323", "0.6058334", "0.60426897", "0.60094976", "0.59993875", "0.59964585", "0.59942114", "0.5984172", "0.5977514", "0.593...
0.0
-1
Return default Home factory depending on current OS
public static HomeFactory getDefault() { if (Utilities.isWindows()) { return getDefaultWindows(); } else if (Utilities.isMac()) { return getDefaultMac(); } else { return getDefaultUx(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Home defaultHome() {\n Home h = null;\n for (String ver : VER_CURRENT) {\n for (String path : WKIP) {\n if (Utilities.isWindows() && path.contains(\"AppData\")) { //NOI18N\n // issue #251710 - Gluon SceneBuilde...
[ "0.7169264", "0.639962", "0.63263065", "0.6237473", "0.6220252", "0.5984328", "0.5923006", "0.5880184", "0.5847034", "0.576133", "0.57253313", "0.5721687", "0.5717927", "0.56888366", "0.5668264", "0.56565005", "0.5639056", "0.56300366", "0.5588585", "0.5579858", "0.5570245", ...
0.8790187
0
Return Home for default SB location, if SB can be found there
@Override public Home defaultHome() { Home h = null; for (String ver : VER_CURRENT) { for (String path : WKIP) { if (Utilities.isWindows() && path.contains("AppData")) { //NOI18N // issue #251710 - Gluon SceneBuilder by default installs to C:\Users\<username>\AppData\Local\SceneBuilder final String appDataPath = System.getenv("AppData"); //NOI18N if (appDataPath != null) { final FileObject appDataFo = FileUtil.toFileObject(new File(appDataPath)).getParent(); h = loadHome(path.replace(VER_DELIMITER, ver).replace(APPDATA_DELIMITER, appDataFo.getPath())); } } else { h = loadHome(path.replace(VER_DELIMITER, ver), ver); } if (h != null) { return h; } } } return h; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String home() {\n\n String treefsHome = stringValue(\"treefs.home\");\n if(isNullOrEmpty(treefsHome)) {\n // default home location\n treefsHome = System.getProperty(\"user.dir\");\n }\n\n return treefsHome;\n }", "public static final String getHo...
[ "0.6772569", "0.6442304", "0.6244797", "0.61493105", "0.61422384", "0.60724956", "0.60673857", "0.60475117", "0.598444", "0.5966113", "0.5941479", "0.59278345", "0.59255147", "0.5849661", "0.5849017", "0.5807911", "0.5740127", "0.57280266", "0.5715587", "0.56809473", "0.56704...
0.73128843
0
Return SB Home for given customPath, if it is a valid SB location
@Override public Home loadHome(String customPath) { return loadHome(customPath, DEFAULT_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Home getHomeForPath(String path, String launcherPath, String propertiesPath, String defaultVersion) throws PathDoesNotExist {\n Parameters.notNull(\"path\", path); //NOI18N\n Parameters.notNull(\"launcherPath\", launcherPath); //NOI18N\n Parameters.notNull(\"propertiesPath\", pr...
[ "0.6375075", "0.6173634", "0.58540887", "0.5733719", "0.57000744", "0.5586807", "0.5497214", "0.54930294", "0.5463371", "0.5460057", "0.5452999", "0.544422", "0.539316", "0.53828233", "0.53444993", "0.5301217", "0.529368", "0.52548206", "0.51657706", "0.5155455", "0.5139214",...
0.732829
0
Returns Home if path is valid path and launcherPath points at existing launcher file
private static Home getHomeForPath(String path, String launcherPath, String propertiesPath, String defaultVersion) throws PathDoesNotExist { Parameters.notNull("path", path); //NOI18N Parameters.notNull("launcherPath", launcherPath); //NOI18N Parameters.notNull("propertiesPath", propertiesPath); //NOI18N String homePath = path; if(path.startsWith("~")) { // NOI18N String userHome = System.getProperty("user.home"); // NOI18N homePath = userHome + path.substring(1); } File installDir = new File(homePath); if (installDir != null && installDir.exists() && installDir.isDirectory()) { FileObject installDirFO = FileUtil.toFileObject(installDir); File launcher = new File(homePath + File.separator + launcherPath); if(launcher != null && launcher.exists() && launcher.isFile()) { FileObject propertiesFO = installDirFO.getFileObject(propertiesPath); // NOI18N if (propertiesFO != null && propertiesFO.isValid() && propertiesFO.isData()) { try { Properties props = new Properties(); FileReader reader = new FileReader(FileUtil.toFile(propertiesFO)); try { props.load(reader); } finally { reader.close(); } String version = props.getProperty("version"); //NOI18N if (version == null) { version = props.getProperty("app.version"); //NOI18N } return new Home(homePath, launcherPath, propertiesPath, version == null ? defaultVersion : version); } catch (IOException e) { } } else if (Utilities.isMac() && path.equals(NbBundle.getMessage(SBHomeFactory.class, "MAC_GLUON_HOME"))) { //NOI18N // Gluon SceneBuilder 8.0.0 does not have scenebuilder.properties file return new Home(homePath, launcherPath, propertiesPath, defaultVersion); } } } else { throw new PathDoesNotExist(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathT...
[ "0.6704234", "0.6515297", "0.65141475", "0.62812525", "0.6213963", "0.6134864", "0.6089882", "0.60639006", "0.6019496", "0.60150284", "0.59334725", "0.59169024", "0.5916862", "0.58888525", "0.58276683", "0.58161414", "0.568343", "0.5680307", "0.56655884", "0.5620219", "0.5601...
0.7737513
0
TODO: write comments and then code here
public static void main(String[] args) { setUpTortoise(); //have fun with the level int currentLevel = 9; drawTriangle(currentLevel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}",...
[ "0.6056866", "0.60282123", "0.59411633", "0.5799308", "0.57971156", "0.57026684", "0.56966704", "0.5680987", "0.5677147", "0.56515855", "0.56515855", "0.56515855", "0.56515855", "0.56515855", "0.56515855", "0.56298727", "0.56298727", "0.56204796", "0.5594018", "0.5593359", "0...
0.0
-1
Creates a string with the submissionset metadata (for debugging purposes only)
public static String debugSubmissionSetMetaData(SubmitTransactionData[] txnDatas) { final StringBuffer retVal = new StringBuffer(); Integer i = 0; for (final SubmitTransactionData txnData : txnDatas) { i++; retVal.append("\nSubmission-Set " + i + "\n"); // txnData.getDocList(); // ProvideAndRegisterDocumentSetType metadata = // txnData.getMetadata(); final SubmissionSetType ss = txnData.getSubmissionSet(); retVal.append(" EntryUUID: " + ss.getEntryUUID() + "\n"); retVal.append(" SourceId: " + ss.getSourceId() + "\n"); retVal.append(" SubmissionTime: " + ss.getSubmissionTime() + "\n"); retVal.append(" UniqueId: " + ss.getUniqueId() + "\n"); retVal.append(" Title: " + ss.getTitle() + "\n"); retVal.append(" PatientId: " + ss.getPatientId() + "\n"); retVal.append( " ContentTypeCode: " + debugCodeString(ss.getContentTypeCode()) + "\n"); retVal.append(" Author: " + debugAuthorString(ss.getAuthor()) + "\n"); retVal.append(" AvailabilityStatus: " + ss.getAvailabilityStatus() + "\n"); retVal.append( " Comments: " + debugInternationalString(ss.getComments()) + "\n"); retVal.append(" IntendedRecipient: "); if (ss.getIntendedRecipient().isEmpty()) { retVal.append("null"); } else { for (final Object item2 : ss.getIntendedRecipient()) { retVal.append("\n TODO IntendedRecipient " + item2.getClass().getName()); } } retVal.append("\n"); retVal.append(" AssociatedFolders: "); if (ss.getAssociatedFolders().isEmpty()) { retVal.append("null"); } else { for (final Object item2 : ss.getAssociatedFolders()) { retVal.append("\n TODO AssociatedFolders " + item2.getClass().getName()); } } retVal.append("\n"); retVal.append(" AssociatedDocuments: "); if (ss.getAssociatedDocuments().isEmpty()) { retVal.append("null"); } else { for (final Object item2 : ss.getAssociatedDocuments()) { retVal.append("\n " + (String) item2); } } retVal.append("\n"); } return retVal.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String metadata() {\n\t\tStringBuilder s = new StringBuilder();\n\t\ts.append(\"#######################################\");\n\t\ts.append(\"\\n# Metadata of query set\");\n\t\ts.append(\"\\n#\");\n\t\ts.append(\"\\n# Queries\");\n\t\ts.append(\"\\n# \\tTotal: \" + this.num_queries);\n\t\ts.append(\"\\n# \\...
[ "0.66923916", "0.62352455", "0.62281054", "0.6090569", "0.6064483", "0.60604805", "0.58481354", "0.5828084", "0.5796629", "0.5735737", "0.5727327", "0.56969273", "0.56146777", "0.55873936", "0.5562291", "0.55617", "0.55401886", "0.553087", "0.5530123", "0.552995", "0.55087143...
0.7554074
0
todo: what do I do with that?
private void activeDrawEffects() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void method_4270() {}", "protected boolean func_70814_o() { return true; }", "private void strin() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", ...
[ "0.58634716", "0.5773518", "0.5721594", "0.56929964", "0.56728524", "0.5655505", "0.56533056", "0.56505424", "0.5648628", "0.5591635", "0.54999566", "0.54680854", "0.544013", "0.5422788", "0.5416423", "0.54132086", "0.5405207", "0.54022396", "0.5391105", "0.5382599", "0.53689...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_formulario_busqueda, container, false); spinnerTipoReclamo = v.findViewById(R.id.spinnerTipoReclamo); btBuscar = v.findViewById(R.id.btBuscar); tipoReclamoAdapter = new ArrayAdapter<>(getActivity(),android.R.layout.simple_spinner_item,Reclamo.TipoReclamo.values()); tipoReclamoAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinnerTipoReclamo.setAdapter(tipoReclamoAdapter); btBuscar.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { Reclamo.TipoReclamo tipoReclamo = (Reclamo.TipoReclamo) spinnerTipoReclamo.getSelectedItem(); if(tipoReclamo == null) return; listener.mapaFormularioBusqueda(tipoReclamo); } }); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
int a[]=Utils.genArray(10,10); //size, maxValue
public static void main(String args[]){ int a[]={4,3,5,2,1,3,2,3}; //Missed 1 part:: //Need to skip the equals, as they don't satisfy the condition, a[i] < a[j] System.out.println(maxDistance(a)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int[] generateArray(int size, int startRange, int endRange) {\n\t\tint[] array = new int[size];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = (int)((Math.random()*(endRange - startRange + 1)) + startRange);\n\t\t}\n\t\treturn array;\n\t}", "static int[] populateArray(int lenght) {...
[ "0.67208016", "0.6688677", "0.6684708", "0.6620068", "0.6608329", "0.6600553", "0.65997267", "0.6573214", "0.64876425", "0.6478848", "0.6471144", "0.6465732", "0.6451986", "0.64128304", "0.6411", "0.64095277", "0.6368659", "0.6365062", "0.6353515", "0.6352482", "0.63491285", ...
0.0
-1
TODO Add reshape code
@Override public void reshape(GLAutoDrawable _drawable, int _arg1, int _arg2, int _arg3, int _arg4) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {\n\t\t\n\t}", "void reshape(int newRows,int newCols) {\n if (rows * cols != newRows * newCols)\n throw new IllegalArgumentException(String.format(\"%d x %d matrix can't be reshaped to %d x %d\", rows,...
[ "0.6367544", "0.5787666", "0.57724875", "0.5759661", "0.57499826", "0.5669749", "0.5623479", "0.5554409", "0.54924285", "0.53313804", "0.53104556", "0.5270426", "0.526321", "0.51756877", "0.5166376", "0.5165897", "0.51648855", "0.51147884", "0.51093507", "0.5074459", "0.50633...
0.59785396
1
Add all essential prime Implicant and check these minterms contained by the essential prime implicant. Essential Prime Implicant: Those prime Implicant in which, there is a minterm ( at least one) which occurs only in this Implicant
public void buildEssentialPrimeImplicant(){ //int count = 0; // For loop ticks all the essential prime Implicants for(Entry<Integer, Boolean> mint: mintermList.entrySet()){ //System.out.printf("\n %d minterm inside buildEssential.", mint.getKey()); int count = 0; for(Implicant p:primeImp){ if(p.contains(mint.getKey())){ count++; } } if(count == 1){ // Prime Implicant occurs for only one minterm mint.setValue(true); for(Implicant x:primeImp){ if(x.contains(mint.getKey())){ if(!finalPrimeImp.contains(x)) finalPrimeImp.add(x); //System.out.printf("\n %s added to final Prime Implicant List.",x.toString()); } } } } /** * Remove Essential Prime Implicant from primeImpl */ for (Implicant i:finalPrimeImp){ primeImp.remove(i); for(Entry<Integer, Boolean> mint: mintermList.entrySet()){ if(i.contains(mint.getKey())) mint.setValue(true); } primeImp.remove(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<Mask> findPrimaryImplicants() {\n\t\tList<Set<Mask>> newImplicants = createFirstColumn();\n\t\tSet<Mask> primaryImplicants = new LinkedHashSet<>();\n\n\t\twhile (true) {\n\t\t\tSet<Mask> temporaryPrimary = new LinkedHashSet<>();\n\n\t\t\tList<Set<Mask>> currentImplicants = new LinkedList<>(newImplicant...
[ "0.5218124", "0.5152776", "0.49649885", "0.4896511", "0.48761868", "0.48453334", "0.48360223", "0.47903875", "0.47813898", "0.477868", "0.47546235", "0.47391865", "0.46950516", "0.4693673", "0.46834123", "0.4638834", "0.46202806", "0.4611069", "0.46079913", "0.46010938", "0.4...
0.8175362
0
Find the _Fields constant that matches fieldId, or null if its not found.
public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // RESULT return RESULT; case 2: // SELLER_LIST return SELLER_LIST; case 3: // PAGINATION return PAGINATION; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // REFERRAL_LOG_IDS\n return REFERRAL_LOG_IDS;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n ...
[ "0.79869914", "0.7915354", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.78808534", "0.77862614", "0.7779145", "0.77291805", "0.7727816", "0.7721567", "0.77125883", "0.77125883", "0.7709597", "0.7708822", "0.7701162", "0.7699386", "0.76957756", "0.7...
0.0
-1
Find the _Fields constant that matches fieldId, throwing an exception if it is not found.
public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // E\n return E;\n default:\n return null;\n }\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields find...
[ "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7626831", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "0.7621988", "...
0.0
-1
Find the _Fields constant that matches name, or null if its not found.
public static _Fields findByName(String name) { return byName.get(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache.thrift.annotation.Nullable\n public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }", "@org.apache...
[ "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "0.7641586", "...
0.0
-1
Performs a deep copy on other.
public SellerListResult(SellerListResult other) { if (other.isSetResult()) { this.result = new com.jfshare.finagle.thrift.result.Result(other.result); } if (other.isSetSellerList()) { List<Seller> __this__sellerList = new ArrayList<Seller>(); for (Seller other_element : other.sellerList) { __this__sellerList.add(new Seller(other_element)); } this.sellerList = __this__sellerList; } if (other.isSetPagination()) { this.pagination = new com.jfshare.finagle.thrift.pagination.Pagination(other.pagination); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Prototype makeCopy();", "public void copy (WorldState other)\n\t{\n\t\tresetProperties();\n\t\t//Iterate through other state and clone it's properties into this states properties\n\t\tCollection<WorldStateProperty> otherProperties = other.properties.values();\n\t\tfor (WorldStateProperty property : otherProperti...
[ "0.7214815", "0.6982586", "0.6743959", "0.66792786", "0.6563397", "0.6549605", "0.65230364", "0.652084", "0.64842516", "0.64743775", "0.6450891", "0.6438907", "0.64186275", "0.640633", "0.6403375", "0.63743764", "0.6373319", "0.6358263", "0.6322797", "0.63214344", "0.62839", ...
0.0
-1
Returns true if field result is set (has been asigned a value) and false otherwise
public boolean isSetResult() { return this.result != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean hasValue() {\n return result.hasValue();\n }", "public boolean hasValue() {\n return result.hasValue();\n ...
[ "0.7537406", "0.7537406", "0.7376975", "0.7376975", "0.7095359", "0.70512784", "0.6954566", "0.69372046", "0.6909019", "0.6907865", "0.6867383", "0.6849193", "0.68425775", "0.68425775", "0.6839192", "0.6819286", "0.6819286", "0.6819286", "0.6819286", "0.6819286", "0.6819286",...
0.76244354
0
Returns true if field sellerList is set (has been asigned a value) and false otherwise
public boolean isSetSellerList() { return this.sellerList != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetBeerList() {\n return this.beerList != null;\n }", "public boolean isSeller(){\n\t\tif(sellerFlag == 1) return true;\n\t\telse return false;\n\t}", "public boolean isSetSellerOrderId() {\r\n return sellerOrderId != null;\r\n }", "public boolean isSetPriceList();", "public ...
[ "0.74309635", "0.7140209", "0.64939713", "0.64712274", "0.6398216", "0.61269945", "0.6120081", "0.6086464", "0.6016578", "0.5972393", "0.5926924", "0.59135294", "0.5829606", "0.5806942", "0.5753029", "0.5753029", "0.5712036", "0.5681782", "0.56473863", "0.56379604", "0.561149...
0.86837727
0
Returns true if field pagination is set (has been asigned a value) and false otherwise
public boolean isSetPagination() { return this.pagination != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPagination();", "boolean hasPagination();", "boolean hasPagination();", "boolean hasPagination();", "boolean hasPagination();", "boolean hasPagination();", "public boolean hasPagination() {\n return paginationBuilder_ != null || pagination_ != null;\n }", "public boolean hasPag...
[ "0.7810403", "0.7810403", "0.7810403", "0.7810403", "0.7810403", "0.7810403", "0.77584535", "0.77584535", "0.77584535", "0.77584535", "0.77584535", "0.77584535", "0.77151036", "0.77151036", "0.77151036", "0.77151036", "0.77151036", "0.77151036", "0.71286726", "0.7006825", "0....
0.82580703
0
Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case RESULT: return isSetResult(); case SELLER_LIST: return isSetSellerList(); case PAGINATION: return isSetPagination(); } throw new IllegalStateException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSetField() {\r\n return this.field != null;\r\n }", "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n ...
[ "0.7902013", "0.7902013", "0.777857", "0.777857", "0.777857", "0.777857", "0.7766488", "0.77303106", "0.7639815", "0.7565438", "0.750989", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.7498512", "0.74...
0.0
-1
check for required fields
public void validate() throws TException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean validateRequiredFields(StringBuffer b){\n boolean result = true;\n\n if (!TextFieldHelper.isNumericFieldValid(this.goalValue, \" Цель: \", b) ||\n !TextFieldHelper.isNumericFieldValid(this.startWeightValue, \" Исходный вес: \", b) ||\n !TextFieldHelper.isNumericFieldVali...
[ "0.75287306", "0.7430543", "0.7430543", "0.7430543", "0.7394445", "0.73590785", "0.7280072", "0.7234574", "0.72328943", "0.72021484", "0.7163772", "0.71448237", "0.7141192", "0.7092876", "0.7075819", "0.7058885", "0.70559984", "0.70541537", "0.70536923", "0.7030236", "0.70288...
0.0
-1
update healthcheck description in map and return true if status is ok
public static boolean getHealthCheckStatus(Map<String, Object> map) { String status = UtilitaireDao.get(0).isConnectionOk() ? HEALTHCHECK_RESULT_UP : HEALTHCHECK_RESULT_DOWN; map.put(HEALTHCHECK_ATTRIBUTE_STATUS, status); Map<String, Object> details = new HashMap<>(); map.put(HEALTHCHECK_ATTRIBUTE_DETAILS, details); HashMap<String, String> dbHealthCheck = new HashMap<>(); details.put(HEALTHCHECK_ATTRIBUTE_DATABASEHEALTHCHECK, dbHealthCheck); dbHealthCheck.put(HEALTHCHECK_ATTRIBUTE_STATUS, status); map.put(HEALTHCHECK_ATTRIBUTE_VERSION, properties.getVersion()); return map.getOrDefault(HEALTHCHECK_ATTRIBUTE_STATUS, "").equals(HEALTHCHECK_RESULT_UP); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private GeobatchRunInfo updateRunInfoStatus(GeobatchRunInfo runInfo) {\n RESTConsumerStatus status = null;\n try {\n status = getFlowService().getConsumerStatus(\n runInfo.getFlowUid());\n } catch (Exception e) {\n // status it's FAIL\n }\n runInfo.setFlowStatus(s...
[ "0.5582773", "0.55782557", "0.53578377", "0.53528464", "0.5324787", "0.5323293", "0.53136146", "0.52990454", "0.52768826", "0.52570415", "0.52415353", "0.5212064", "0.51935685", "0.51773447", "0.51465476", "0.5143063", "0.51402324", "0.5139396", "0.5125953", "0.5108291", "0.5...
0.6165449
0
TODO Autogenerated method stub
public void rollback(String tabletName, String txId, InetSocketAddress[] addresses, String errorMessage) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public String getTestHandlerKey() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<String> getMaxTxIds(String tabletName) throws IOException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public List<CommitLogStatus> getCommitLogStatus(String tabletName) throws IOException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void finishAdding(String tabletName, String txId) throws IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
/Imprimir vector de reversa
public static void main(String[] args) { int longitud; int contador = 0; int valor; Scanner entrada = new Scanner(System.in); System.out.print("Ingrese la longitud del vector: "); longitud = entrada.nextInt(); int numeros[] = new int [longitud]; for ( int i = 0; i<numeros.length; i++ ) { System.out.print("Ingrese el valor " + (i+1) + ": "); valor = entrada.nextInt(); numeros[i] = valor; } System.out.println("Valores invertidos del vector"); for ( int i = numeros.length -1; i>=0; i-- ) { System.out.println("Posición " + (i+1) + ": " + numeros[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] llenadoInversion(int[] vector)\r\n\t{\r\n\t\tint[] vecInvertido=new int[vector.length];\r\n\t\tint vecAux;\r\n\t\t\r\n\t\tfor(int i=0;i<vector.length;i++)\r\n\t\t{\r\n\t\t\tvecInvertido[i]=vector[vector.length-i-1];\r\n\t\t}\r\n\t\treturn vecInvertido;\r\n\t}", "@org.junit.Test\n public void inve...
[ "0.6978464", "0.67107093", "0.6684745", "0.6536715", "0.6363376", "0.63494486", "0.6301824", "0.6230113", "0.6172996", "0.61405015", "0.6121952", "0.6094896", "0.6060831", "0.6052787", "0.6015102", "0.59844077", "0.598108", "0.5943236", "0.59294575", "0.587619", "0.5873124", ...
0.59527105
17
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.6757412
38
Handle presses on the action bar items
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_search: openSearch(); return true; case R.id.action_settings: openSettings(); return true; case R.id.action_draw: doDraw(); return true; default: return super.onOptionsItemSelected(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n ret...
[ "0.7173379", "0.69227743", "0.69227743", "0.69227743", "0.69227743", "0.6911944", "0.6884609", "0.6881586", "0.68243235", "0.68193024", "0.68051094", "0.6801348", "0.678705", "0.678705", "0.67608094", "0.67543995", "0.6754033", "0.674645", "0.67355984", "0.6727317", "0.672570...
0.0
-1
Launch the Draw activity, send the string along for custom commands
private void doDraw() { Intent intent = new Intent(this, ActivityDraw.class); EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startDrawing(String objectString)\n {\n Intent intent = new Intent(this, MainActivity.class);\n\n switch (objectString) {\n case \"apple\":\n intent.putExtra(\"isFrom\", objectString);\n System.out.println(\"apple name :\"+objec...
[ "0.6102947", "0.5799279", "0.5774531", "0.5765402", "0.56059426", "0.5589471", "0.5578864", "0.55663013", "0.5533741", "0.5528521", "0.55283344", "0.55190015", "0.55125195", "0.5502169", "0.5468075", "0.5463449", "0.5410907", "0.53967136", "0.53703713", "0.53644663", "0.53576...
0.72670174
0
On click handler for Plot! button
public void onPlot(View view) { // Respond to the button click Intent intent = new Intent(this, PlotActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void toggleButton_actionPerformed(ActionEvent e) {\n this.togglePlot();\n }", "public void plotAction() {\n final PlotProperties props = new PlotProperties();\n addPlotRegister(props);\n\n final PlotManager pm = this.manager.getPlotManager();\n pm.showPlotUI(props);\n }", "pu...
[ "0.7546183", "0.71219367", "0.6868406", "0.6783953", "0.67188275", "0.654743", "0.65420216", "0.64792943", "0.6475629", "0.64157754", "0.63377976", "0.6326687", "0.6265265", "0.62488544", "0.6247911", "0.62400633", "0.61847645", "0.6175448", "0.6167104", "0.6167104", "0.61671...
0.77151287
0
On click handler for Toast button
public void onToast (View view) { // Respond to the button click doToast (); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to sh...
[ "0.76606727", "0.75929695", "0.75453985", "0.7413127", "0.7405105", "0.7386555", "0.7325937", "0.72805536", "0.7260248", "0.72053593", "0.7127077", "0.70998156", "0.70960885", "0.7078463", "0.7069818", "0.706454", "0.7061799", "0.70370877", "0.7014169", "0.7013056", "0.700843...
0.8148889
0
Get text to send to toast
private void doToast() { EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); // Create and send toast Context context = getApplicationContext(); int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, message, duration); toast.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "void onMessageToast(String string);", "void showToast(String value);", "private static void showToastText(String infoStr, int TOAST_LENGTH) {\n Context context = nu...
[ "0.73690724", "0.73200125", "0.7272823", "0.72186285", "0.7216768", "0.71116936", "0.7033684", "0.7033684", "0.6969925", "0.69612426", "0.6915404", "0.68233734", "0.67678356", "0.6741029", "0.6730417", "0.67033213", "0.66719735", "0.66438836", "0.6637769", "0.66266644", "0.66...
0.72208095
3
TODO Autogenerated method stub Create a text view
private void openSettings() { String message = "This would be settings."; Intent intent = new Intent(this, DisplayMessageActivity.class); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextView getDescriptionView();", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "protected View ShowWord() {\n\t\tTextView btn=new TextView(this);\n\t\tbtn.setId(index);\n\t\tbtn.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n//\...
[ "0.7239497", "0.71709067", "0.70702726", "0.7045436", "0.695608", "0.69433874", "0.6922868", "0.67664546", "0.65895295", "0.649588", "0.6470255", "0.63901573", "0.6374273", "0.63448066", "0.6344498", "0.62988365", "0.6293539", "0.6286051", "0.6284932", "0.6282093", "0.6280907...
0.0
-1
TODO Autogenerated method stub Create a text view
private void openSearch() { String message = "This would be search."; Intent intent = new Intent(this, DisplayMessageActivity.class); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextView getDescriptionView();", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "protected View ShowWord() {\n\t\tTextView btn=new TextView(this);\n\t\tbtn.setId(index);\n\t\tbtn.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n//\...
[ "0.7239497", "0.71709067", "0.70702726", "0.7045436", "0.695608", "0.69433874", "0.6922868", "0.67664546", "0.65895295", "0.649588", "0.6470255", "0.63901573", "0.6374273", "0.63448066", "0.6344498", "0.62988365", "0.6293539", "0.6286051", "0.6284932", "0.6282093", "0.6280907...
0.0
-1
On click handler for Send button
public void sendMessage (View view) { // Respond to the button click Intent intent = new Intent(this, DisplayMessageActivity.class); EditText editText = (EditText) findViewById(R.id.edit_message); String message = editText.getText().toString(); intent.putExtra(EXTRA_MESSAGE, message); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n send();\n }", "@Then(\"^Click On Send Button$\")\r\n\tpublic void click_On_Send_Button() {\n\t\tnop.click(\"//*[@id=\\\"submitMessage\\\"]/span\"); \r\n\t \r\n\t}", "public void handleSendButton(ActionEvent event) {\n\n ...
[ "0.7840916", "0.7468897", "0.74294496", "0.72300935", "0.7185345", "0.71218175", "0.7071737", "0.70644563", "0.7054084", "0.69917256", "0.6963316", "0.6950417", "0.69379455", "0.6927429", "0.68834275", "0.68620014", "0.6846489", "0.68429154", "0.6819913", "0.68031925", "0.680...
0.64857835
52
TODO: 5/20/2018 get Use of IMEI
public void get_IMEI(){ TelephonyManager mngr = (TelephonyManager) getSystemService(this.TELEPHONY_SERVICE); if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling // ActivityCompat#requestPermissions // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) // to handle the case where the user grants the permission. See the documentation // for ActivityCompat#requestPermissions for more details. return; } mngr.getDeviceId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIMEI(String IMEI) {\n this.IMEI = IMEI;\n }", "public void loadIMEI() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)\n != PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.shouldShowRequestPermissionRational...
[ "0.7075997", "0.6908646", "0.6731662", "0.659146", "0.65289146", "0.6347356", "0.6330571", "0.62172705", "0.61990213", "0.6195075", "0.6068349", "0.6050864", "0.6050864", "0.60424644", "0.6032097", "0.6024791", "0.59967095", "0.59776485", "0.5972654", "0.59569067", "0.5944071...
0.6900828
2
Gets the constant representing the enum member.
String constant();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EnumConstant createEnumConstant();", "public String getElement()\n {\n return \"enum\";\n }", "public int getConstant() {\n\t\treturn magicConstant;\n\t}", "String getConstant();", "java.lang.String getConstantValue();", "default Constant getConstant(ConstantName constantName) {return (Constant) con...
[ "0.64811456", "0.6374813", "0.63723534", "0.6337783", "0.63157207", "0.62206763", "0.59231687", "0.59051883", "0.58864397", "0.5874164", "0.5857268", "0.5838487", "0.57955813", "0.57949126", "0.575007", "0.5725959", "0.5720865", "0.5659917", "0.5644008", "0.56404984", "0.5598...
0.5726717
15
Changes component's font size to fit the DPI factor.
public static void adaptFontSize(JComponent component) { Font currentFont = component.getFont(); Font newFont = currentFont.deriveFont((float)DPI.toScale(currentFont.getSize())); component.setFont(newFont); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTextSizePx(float size) {\n mPaint.setTextSize(size);\n mSpaceWidth = mPaint.measureText(\" \");\n invalidate();\n }", "private void setFontSize(float newFontSize) {\n\t\tfontSize = newFontSize;\n\t\tproperties.setProperty(\"fontSize\", Float.toString(newFontSize));\n\n\t\t/...
[ "0.6855116", "0.67734236", "0.66894627", "0.66726255", "0.66292787", "0.64922917", "0.64642507", "0.6456182", "0.6437282", "0.6380191", "0.63529474", "0.6311121", "0.6291461", "0.6278574", "0.6232452", "0.62005585", "0.6188636", "0.61754674", "0.61658853", "0.6162614", "0.615...
0.747395
0
Tratamento de erro de input e output de arquivo
public static void main(String[] args) throws IOException{ Scanner sc = new Scanner(new FileInputStream("leitura.txt")); //Declarando o arquivo de entrada //classe Scanner importada do pacote java.util PrintStream ps = new PrintStream("saida.txt"); //Declarando o arquivo de saida //classe PrintStream importada do pacote java.io while( sc.hasNextLine() ){ //O metodo boolean hasNextLine() return true se houver uma proxima linha String linha = sc.nextLine(); //Lendo uma linha do arquivo de entrada ps.println(linha); //Escrevendo no arquivo de saida }//while ps.close(); //Fechando file de saida sc.close(); //Fechando file de entrada }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void errorFileEscenario() {\n\t\tvisorEscenario.errorFileEscenario();\t\n\t}", "boolean getFileErr();", "java.lang.String getErr();", "public void error();", "public void corruptedFileErrorMessage() {\n System.out.println(\"The file (\" + INVENTORY_FILE_PATH + \") is corrupted!\\n\"\n ...
[ "0.61249804", "0.60708845", "0.6050677", "0.59463435", "0.58627313", "0.5820958", "0.5763773", "0.5756024", "0.5754471", "0.5754471", "0.5754471", "0.57543164", "0.5738683", "0.57079804", "0.57021224", "0.5657519", "0.5622669", "0.5605091", "0.5571295", "0.5541745", "0.55352"...
0.0
-1
Create contents of the dialog.
private void createContents() { shell = new Shell(getParent(), getStyle()); shell.setSize(720, 480); shell.setText("1FN Normalization"); shell.setLayout(new GridLayout(2, false)); composite = new Composite(shell, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); composite.setLayout(new GridLayout(5, false)); lblSeparators = new Label(composite, SWT.NONE); lblSeparators.setText("Separators:"); composite_1 = new Composite(composite, SWT.NONE); composite_1.setLayout(new GridLayout(5, false)); composite_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1)); chk1 = new Button(composite_1, SWT.CHECK); chk1.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochk1widgetSelected(e); } }); chk1.setSelection(true); chk1.setText(";"); chk2 = new Button(composite_1, SWT.CHECK); chk2.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochk2widgetSelected(e); } }); chk2.setSelection(true); chk2.setText("cr"); chk3 = new Button(composite_1, SWT.CHECK); chk3.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochk3widgetSelected(e); } }); chk3.setText(","); chk4 = new Button(composite_1, SWT.CHECK); chk4.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochk4widgetSelected(e); } }); chk4.setText("space"); chk5 = new Button(composite_1, SWT.CHECK); chk5.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochk5widgetSelected(e); } }); chk5.setText("."); new Label(composite, SWT.NONE); new Label(composite, SWT.NONE); lblColumn = new Label(composite, SWT.NONE); lblColumn.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1)); lblColumn.setText("Column:"); lstColumn = new List(composite, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI); lstColumn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dolstColumnwidgetSelected(e); } }); GridData gd_lstColumn = new GridData(SWT.LEFT, SWT.FILL, false, true, 4, 1); gd_lstColumn.widthHint = 150; gd_lstColumn.heightHint = 80; lstColumn.setLayoutData(gd_lstColumn); lblMethod = new Label(composite, SWT.NONE); lblMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblMethod.setText("Method:"); checkSingle = new Button(composite, SWT.RADIO); checkSingle.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { docheckSinglewidgetSelected(e); } }); checkSingle.setText("Single Table (Recommended)"); chkMulti = new Button(composite, SWT.RADIO); chkMulti.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dochkMultiwidgetSelected(e); } }); chkMulti.setText("Multi table"); lblNewTableName = new Label(composite, SWT.NONE); lblNewTableName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblNewTableName.setText("New table name: "); txtNewTableName = new Text(composite, SWT.BORDER); txtNewTableName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent arg0) { dotxtNewTableNamemodifyText(arg0); } }); txtNewTableName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); lblActual = new Label(shell, SWT.NONE); lblActual.setText("Actual"); lblRefatored = new Label(shell, SWT.NONE); lblRefatored.setText("Refator"); modelEditor1 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL); GridData gd_modelEditor1 = new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1); gd_modelEditor1.widthHint = 250; modelEditor1.setLayoutData(gd_modelEditor1); modelEditor2 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL); modelEditor2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); btnConfirm = new Button(shell, SWT.NONE); btnConfirm.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { dobtnConfirmwidgetSelected(e); } }); btnConfirm.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1)); btnConfirm.setText("Confirm"); txtNewTableName.setEnabled(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAcc...
[ "0.7465564", "0.71213424", "0.70750844", "0.7056892", "0.7035284", "0.6982003", "0.6966167", "0.6853646", "0.68448454", "0.6811343", "0.68096405", "0.6801873", "0.67985934", "0.6798088", "0.679386", "0.6789257", "0.67799765", "0.6769032", "0.6748607", "0.67194223", "0.6717503...
0.58696645
99
This is how many in a row are needed to win
@Override public int getWinRunLength() { return WIN_RUN_LENGTH; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int setRowTotal(){\n\t\tif (game.getDifficulty() == 0 )\n\t\t\treturn 2;\n\t\telse if( game.getDifficulty() == 1 )\n\t\t\treturn 3;\n\t\telse \n\t\t\treturn 4;\n\t}", "private static int getNoOfWays() {\n int[][] arr = new int[4][4];\n\n for (int i = 0; i < 4; i++) {\n for (int j ...
[ "0.67514104", "0.6741884", "0.67270046", "0.6721207", "0.664749", "0.66330826", "0.66217184", "0.6619619", "0.6614167", "0.6583368", "0.6575121", "0.6555403", "0.6540665", "0.65331095", "0.6532944", "0.6532462", "0.64880174", "0.6481121", "0.6465617", "0.6424272", "0.64149", ...
0.0
-1
Created by sun on 2020/1/7.
public interface CoreServiceInvoker { GWRequest processRequest(Object requestData, InterfaceMapper mapper); /** * 处理请求信息 */ GWRequest processRequest(Object requestData, InterfaceMapper mapper, boolean needPackage); /** * 调用核心方法 */ GWResponse invoke(GWRequest request, boolean needPackage); /** * 处理返回信息 */ Object analysisResponse(GWRequest request, GWResponse response); Object analysisResp(GWRequest request, GWResponse response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public i...
[ "0.57359827", "0.5723961", "0.55853283", "0.54882216", "0.54651874", "0.53845114", "0.53715783", "0.5348995", "0.5318601", "0.5318601", "0.53089845", "0.5270208", "0.5270081", "0.52692646", "0.5247037", "0.5218099", "0.5205293", "0.51976407", "0.51976407", "0.51976407", "0.51...
0.0
-1
Creates a new CriteriaQueryTable based on the given CriteriaQuery. Note that this class will modify, edit, and dissect this query brutally, so the client should cease to observe or modify the query after using it to construct a CriteriaQueryTable.
public CriteriaQueryTable(CriteriaQuery q) { myCriteriaQuery = q; myOriginalRestriction = q.getRestriction(); if (myOriginalRestriction == null) { myOriginalRestriction = JPA.em().getCriteriaBuilder().conjunction(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {\n\t\treturn null;\n\t}", "Query createQuery(final String query);", "protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}", "publi...
[ "0.6619345", "0.54894006", "0.5449284", "0.5350727", "0.5312455", "0.5311169", "0.5269535", "0.5232444", "0.52319187", "0.51725227", "0.5156656", "0.51274705", "0.5078078", "0.5058827", "0.5041707", "0.50372213", "0.50151664", "0.49762502", "0.49762502", "0.49762502", "0.4976...
0.651409
1
Adds a new column, as the next column in order, that reflects the value extracted from each entry by the given Expression.
public void addColumn(Expression value) { myInfoExposer.addColumn(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addCalculatedColumn(CalculatedColumn calculatedColumn, String name, String expressionText) {\n try {\n\n ColumnHolder columnHolder = output.getSchema().getColumnHolder(name);\n if (columnHolder != null) {\n if (!(columnHolder.getColumn() inst...
[ "0.5998531", "0.5889226", "0.58759624", "0.5573632", "0.5376325", "0.5376143", "0.53372777", "0.52872634", "0.52303594", "0.52104795", "0.5197145", "0.5179153", "0.5151707", "0.5129434", "0.51242614", "0.5094909", "0.5044256", "0.5031913", "0.50079197", "0.50014347", "0.49999...
0.6480437
0
Adds a new column, as the next column in order, that reflects the value extracted from each entry by the given Expression, processed through the given transform.
public void addColumn(Expression value, ObjectTransformer transform) { myInfoExposer.addColumn(value, transform); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addColumn(Expression value) {\n myInfoExposer.addColumn(value);\n }", "private void addCalculatedColumn(CalculatedColumn calculatedColumn, String name, String expressionText) {\n try {\n\n ColumnHolder columnHolder = output.getSchema().getColumnHolder(name);\n ...
[ "0.5671454", "0.53911996", "0.49505463", "0.49478826", "0.4856033", "0.48080996", "0.47934353", "0.47224644", "0.47165114", "0.4712829", "0.4709603", "0.46299937", "0.4629976", "0.46118203", "0.4603959", "0.4579418", "0.45776927", "0.4488561", "0.4481713", "0.44789606", "0.44...
0.6899748
0
Set flag to true indicating the process can start the next round.
public void beginNextRound() { setBeginNextRound(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startProcess() {\r\n\t\tprocess = true;\r\n\t}", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "private boolean isStartable()\n {\n if (! isAlive() && nextStartTime <= System.currentTimeMillis())\n {\n return true;\n }\n else\n {\n return false;\...
[ "0.66995287", "0.6294001", "0.6287425", "0.6171089", "0.6152971", "0.6049881", "0.60360724", "0.59879553", "0.5986022", "0.5969997", "0.5934342", "0.5925195", "0.5898762", "0.58892775", "0.585799", "0.58528006", "0.58163595", "0.5808784", "0.578589", "0.5760824", "0.5743124",...
0.61078864
5
Constructor which sets the default scanner.
public parser(java_cup.runtime.Scanner s) {super(s);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "private ConsoleScanner() {}", "public Metad...
[ "0.7363979", "0.71984017", "0.7137678", "0.71248406", "0.70821637", "0.7008351", "0.70074767", "0.6923786", "0.68472075", "0.68472075", "0.68472075", "0.68472075", "0.68472075", "0.68472075", "0.66874146", "0.66866326", "0.66866326", "0.6629352", "0.66149765", "0.65839934", "...
0.6865954
12
Constructor which sets the default scanner.
public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public static void setScanner(Scanner s) {\n scanner = s;\n }", "public static void setInputScanner(InputScanner scanner){\n inputScanner = scanner;\n }", "private ConsoleScanner() {}", "public Metad...
[ "0.7363979", "0.71984017", "0.7137678", "0.71248406", "0.70821637", "0.7008351", "0.70074767", "0.6923786", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.6865954", "0.68472075", "0.68472075", "0.68472075", "0.68472075", "0.68472...
0.0
-1
Access to production table.
public short[][] production_table() {return _production_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] production_table() {\r\n return _production_table;\r\n }", "public short[][] production_table() {\r\n return _production_table;\r\n }", "short[][] productionTable();", "public String getTable()\n {\n return table;\n }", "private void refTable() {\n tr...
[ "0.68532145", "0.6843889", "0.57185096", "0.56440794", "0.563", "0.5615971", "0.56071514", "0.5580453", "0.55784947", "0.55773133", "0.5487715", "0.5472419", "0.5464648", "0.54604506", "0.5398757", "0.53913164", "0.5386026", "0.5377525", "0.53717554", "0.5368894", "0.5353499"...
0.68878466
30
Access to parseaction table.
public short[][] action_table() {return _action_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] action_table() {\r\n return _action_table;\r\n }", "public ActionList getActions();", "public int getAction() {\n\t\treturn action;\n\t}", "String[] getActions();", "public Action getAction() {\n\treturn action;\n }", "public int getAction()\n {\n return m_action;\n ...
[ "0.71799415", "0.6271413", "0.60241354", "0.6008953", "0.59867096", "0.5980041", "0.5955848", "0.5938487", "0.5920429", "0.5917709", "0.59064436", "0.590324", "0.59030133", "0.5900386", "0.5894549", "0.5894549", "0.5894549", "0.5894549", "0.5890299", "0.58894557", "0.5886304"...
0.7215594
30
Access to reduce_goto table.
public short[][] reduce_table() {return _reduce_table;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public short[][] reduce_table() {\r\n return _reduce_table;\r\n }", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_table;}", "public short[][] action_table() {return _action_tab...
[ "0.5971808", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643", "0.47024643",...
0.6235091
30
Action encapsulation object initializer.
protected void init_actions() { action_obj = new CUP$parser$actions(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void init_actions()\n {\n action_obj = new CUP$FractalParser$actions(this);\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }", "protected void init_actions()\n {\n action_obj = new CUP$Parser$actions(this);\n }", "prote...
[ "0.7878943", "0.7846156", "0.78301626", "0.78301626", "0.78301626", "0.78301626", "0.78301626", "0.7827101", "0.7796163", "0.7776218", "0.7776218", "0.77193624", "0.7718638", "0.7694373", "0.76459444", "0.7571881", "0.7568066", "0.7562422", "0.7553669", "0.75510633", "0.75282...
0.7798481
21
Invoke a user supplied parse action.
public java_cup.runtime.Symbol do_action( int act_num, java_cup.runtime.lr_parser parser, java.util.Stack stack, int top) throws java.lang.Exception { /* call code in generated class */ return action_obj.CUP$parser$do_action(act_num, parser, stack, top); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void executeAction( String actionInfo );", "public final java_cup.runtime.Symbol CUP$Parser$do_action(\n int CUP$Parser$act_num,\n java_cup.runtime.lr_parser CUP$Parser$parser,\n java.util.Stack CUP$Parser$stack,\n int CUP$Parser$top)\n ...
[ "0.66233104", "0.65339345", "0.65339345", "0.65339345", "0.6502368", "0.6490189", "0.6490189", "0.6490189", "0.6490189", "0.6490189", "0.64837754", "0.645815", "0.63573897", "0.63072646", "0.62915266", "0.6286955", "0.6286955", "0.62713635", "0.6186821", "0.6142021", "0.61393...
0.59196347
50
Method with the actual generated action code.
public final java_cup.runtime.Symbol CUP$parser$do_action( int CUP$parser$act_num, java_cup.runtime.lr_parser CUP$parser$parser, java.util.Stack CUP$parser$stack, int CUP$parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$parser$result; /* select the action based on the action number */ switch (CUP$parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // e ::= PAR_A e PAR_C { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Nodo val = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = val; CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // e ::= IDENTIFICADOR { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; String val = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Primitivo( val, TipoOperacion.IDENTIFICADOR ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // e ::= FALSO { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; String val = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Primitivo( false, TipoOperacion.FALSO ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // e ::= VERDADERO { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; String val = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Primitivo( true, TipoOperacion.VERDADERO ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // e ::= DECIMAL { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; String val = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Primitivo( Double.valueOf(val), TipoOperacion.NUMERO ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // e ::= ENTERO { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; String val = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Primitivo( Double.valueOf(val), TipoOperacion.NUMERO ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // e ::= e IGUAL_QUE e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Relacional( val1, val2, TipoOperacion.IGUAL_QUE ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // e ::= e AND e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Booleana( val1, val2, TipoOperacion.AND ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // e ::= e DIVISION e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Aritmetica( val1, val2, TipoOperacion.DIVISION ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // e ::= e MULTIPLICACION e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Aritmetica( val1, val2, TipoOperacion.MULTIPLICACION ); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // e ::= e RESTA e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Aritmetica(val1, val2, TipoOperacion.RESTA); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // e ::= e SUMA e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int val2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val2 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Aritmetica(val1, val2, TipoOperacion.SUMA); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // e ::= RESTA e { Nodo RESULT =null; int val1left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int val1right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo val1 = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = new Aritmetica(val1, TipoOperacion.NEGATIVO); CUP$parser$result = parser.getSymbolFactory().newSymbol("e",8, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // tipo ::= DOUBLE { Tipo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Object a = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = Tipo.DOUBLE; CUP$parser$result = parser.getSymbolFactory().newSymbol("tipo",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // tipo ::= INT { Tipo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Object a = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = Tipo.INT; CUP$parser$result = parser.getSymbolFactory().newSymbol("tipo",1, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // declaracion ::= tipo IDENTIFICADOR IGUAL e P_COMA { Nodo RESULT =null; int tipoleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).left; int tiporight = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)).right; Tipo tipo = (Tipo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-4)).value; int idleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Nodo val = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Declaracion(id,tipo,val); CUP$parser$result = parser.getSymbolFactory().newSymbol("declaracion",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // declaracion ::= tipo IDENTIFICADOR P_COMA { Nodo RESULT =null; int tipoleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int tiporight = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Tipo tipo = (Tipo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; int idleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int idright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; String id = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Declaracion(id,tipo); CUP$parser$result = parser.getSymbolFactory().newSymbol("declaracion",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // asignacion ::= IDENTIFICADOR IGUAL e P_COMA { Nodo RESULT =null; int idleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left; int idright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right; String id = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Nodo val = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Asignacion(id, val); CUP$parser$result = parser.getSymbolFactory().newSymbol("asignacion",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // imprimir ::= IMPRIMIR PAR_A e PAR_C P_COMA { Nodo RESULT =null; int valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left; int valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right; Nodo val = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value; RESULT = new Imprimir(val); CUP$parser$result = parser.getSymbolFactory().newSymbol("imprimir",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-4)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // instruccion ::= imprimir { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = a; CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // instruccion ::= asignacion { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = a; CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // instruccion ::= declaracion { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = a; CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // instrucciones ::= instruccion { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=new LinkedList<>(); RESULT.add(a); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones",11, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // instrucciones ::= instrucciones instruccion { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; LinkedList<Nodo> a = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int bleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int bright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo b = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=a; RESULT.add(b); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones",11, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // instruccion_sup ::= LLAVE_A instrucciones LLAVE_C { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; LinkedList<Nodo> a = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Arbol(a); CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion_sup",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // instruccion_sup ::= instruccion { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = a; CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion_sup",3, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // instrucciones_sup ::= instruccion_sup { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=new LinkedList<>(); RESULT.add(a); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones_sup",10, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // instrucciones_sup ::= instrucciones_sup instruccion_sup { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; LinkedList<Nodo> a = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int bleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int bright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo b = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=a; RESULT.add(b); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones_sup",10, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // instruccion_top ::= LLAVE_A instrucciones_sup LLAVE_C { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; LinkedList<Nodo> a = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = new Arbol(a); CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion_top",2, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // instruccion_top ::= instruccion { Nodo RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT = a; CUP$parser$result = parser.getSymbolFactory().newSymbol("instruccion_top",2, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // instrucciones_top ::= instruccion_top { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo a = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=new LinkedList<>(); RESULT.add(a); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones_top",9, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // instrucciones_top ::= instrucciones_top instruccion_top { LinkedList<Nodo> RESULT =null; int aleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; LinkedList<Nodo> a = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; int bleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int bright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; Nodo b = (Nodo)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; RESULT=a; RESULT.add(b); CUP$parser$result = parser.getSymbolFactory().newSymbol("instrucciones_top",9, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // ini ::= instrucciones_top { Object RESULT =null; int valorleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left; int valorright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right; LinkedList<Nodo> valor = (LinkedList<Nodo>)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value; parser.AST = new Arbol(valor); CUP$parser$result = parser.getSymbolFactory().newSymbol("ini",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } return CUP$parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // $START ::= ini EOF { Object RESULT =null; int start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right; Object start_val = (Object)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value; RESULT = start_val; CUP$parser$result = parser.getSymbolFactory().newSymbol("$START",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT); } /* ACCEPT */ CUP$parser$parser.done_parsing(); return CUP$parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public void createAction() {\n }", "@Override\n\tpublic ...
[ "0.7253985", "0.7253985", "0.7253985", "0.71544045", "0.71270514", "0.71028495", "0.682494", "0.6795898", "0.66515064", "0.6604793", "0.6412416", "0.6410986", "0.6400891", "0.635059", "0.6294932", "0.6284992", "0.6284992", "0.6284992", "0.6255204", "0.623979", "0.6188923", ...
0.0
-1
/ methods sendeditorEcho, sendeditorMessage(strStatus), notifyScriptStart(), notifyScriptTermination() are public in case developers want to use ScriptWindow separate from the Jmol application.
public ScriptEditor() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void scriptStarted(Script s);", "public interface Begin_Window {\n\tpublic void setTitle(String text);\n\n\tpublic void repaint();\n}", "public ExecScriptCallback()\n {\n\tchooserTitle = DragonUI.textSource.getI18NText(TextKeys.SPTFILE,\n\t\t\t\t\t\t \"SCRIPT FILE TO RUN\");\n\t}", "@Override\n\...
[ "0.58181864", "0.5740767", "0.5700805", "0.5499888", "0.5407384", "0.5397332", "0.5371415", "0.5357765", "0.5348695", "0.5339885", "0.5291136", "0.52484834", "0.5241389", "0.5233444", "0.5233133", "0.5233133", "0.5217557", "0.5210754", "0.5208", "0.51983726", "0.5169525", "...
0.0
-1
Remember the edit and update the menus
public void undoableEditHappened(UndoableEditEvent e) { undo.addEdit(e.getEdit()); // undoAction.updateUndoState(); // redoAction.updateRedoState(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editMenuItem() {\n\t\tviewMenu();\n\n\t\t// Clean arraylist so that you can neatly add data from saved file\n\t\tmm.clear();\n\t\t\n\t\tString menuEdit;\n\t\tint editC;\n\n\t\tSystem.out.println(\"Which one do you want to edit?\");\n\n\t\tString toChange;\n\t\tDouble changePrice;\n\t\tScanner menuE = n...
[ "0.69750285", "0.6826321", "0.6749115", "0.6657597", "0.66471195", "0.6624654", "0.64790875", "0.6394249", "0.6383559", "0.63574934", "0.6318848", "0.6276073", "0.6247528", "0.6217611", "0.62158096", "0.6214048", "0.6160985", "0.6148902", "0.61466473", "0.61378944", "0.606701...
0.0
-1
Removes all content of the script window, and add a new prompt.
void clearContent() { try { super.remove(0, getLength()); } catch (Exception exception) { //Logger.error("Could not clear script window content", exception); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearPrompt()\n\t{\n\t\tpromptTarget = \"\";\n\t\tpromptType = \"\";\n\t\ttempPrompt = \"\";\n\t\tshowPrompt = true;\n\t}", "private void prompt() {\n System.out.print(Strings.MAIN_PROMPT);\n System.out.flush();\n }", "public void clearEditMode()\n\t{\n\t\tpromptTarget = \"\";\n\t\...
[ "0.6743993", "0.6250523", "0.6027476", "0.6017015", "0.59914315", "0.5944225", "0.5810089", "0.5804759", "0.5698608", "0.56726724", "0.5653648", "0.5619073", "0.55968714", "0.55784935", "0.55068266", "0.54182756", "0.53959924", "0.53833145", "0.5381719", "0.53471434", "0.5339...
0.59098977
6
/ WARNING Possible parameter corruption WARNING void declaration
private B() { void var2_-1; void var1_-1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "void berechneFlaeche() {\n\t}", "public abstract void mo53562a(C18796a c18796a);", "void m1864a() {\r\n }", "void m5769c() throws C0841b;", "public void m23075a() {\n }", "public final ...
[ "0.6717172", "0.666661", "0.665114", "0.6597644", "0.65408194", "0.6504009", "0.64868635", "0.64437896", "0.64067566", "0.6397628", "0.6397434", "0.638744", "0.63719195", "0.6259147", "0.6192493", "0.6171678", "0.6168462", "0.61438406", "0.61191326", "0.61008114", "0.608989",...
0.0
-1
Returns the alertId of this Alert object.
public Long getAlertId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getAlertaId() {\n\t\treturn _pnaAlerta.getAlertaId();\n\t}", "public void setAlertId(Long alertId);", "public java.lang.String getPrimaryKey() {\n\t\treturn _pnaAlerta.getPrimaryKey();\n\t}", "public java.lang.String getPortalId() {\n\t\treturn _pnaAlerta.getPortalId();\n\t}", "publ...
[ "0.75385445", "0.68346214", "0.6432031", "0.60407734", "0.59107727", "0.5873167", "0.5873167", "0.5872208", "0.5830726", "0.5807306", "0.5779375", "0.5761463", "0.57568413", "0.5706579", "0.56885207", "0.5681977", "0.5671756", "0.56568575", "0.5645911", "0.56341", "0.5633999"...
0.8016332
0
Sets the alertId of this Alert object.
public void setAlertId(Long alertId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAlertaId(java.lang.String alertaId) {\n\t\t_pnaAlerta.setAlertaId(alertaId);\n\t}", "public Long getAlertId();", "public void setPortalId(java.lang.String portalId) {\n\t\t_pnaAlerta.setPortalId(portalId);\n\t}", "public void setId(String eId) {\n\t\tmId = eId;\n\t}", "public com.opentext.bn...
[ "0.6809466", "0.56809866", "0.540125", "0.52424407", "0.5093373", "0.50830686", "0.50774056", "0.50378716", "0.50378716", "0.50365615", "0.5015024", "0.50032455", "0.4980681", "0.4979211", "0.4977961", "0.49631274", "0.4961968", "0.4961968", "0.49587387", "0.49405092", "0.493...
0.78321326
0
TODO Autogenerated method stub
@Override public void onClick(View v) { Toast.makeText(context.getBaseContext(), "a:"+v.getId(), Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void run() { height= ll1.getHeight(); Log.d("AddMenu", "height:"+height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { Toast.makeText(context.getBaseContext(), "a:"+v.getId(), Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
The first line contains an integer, T (the number of test cases). Each line i of the T subsequent lines contain a String, S.
public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int cases = sc.nextInt(); for(int i=0;i<cases;i++){ String[] strArray = sc.next().split(""); String odd = ""; String even = ""; for(int j=1;j<strArray.length;j++){ if(j%2==0){ even += strArray[j]; }else{ odd += strArray[j]; } } System.out.println(odd + " " + even); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String minWindow(String S, String T) {\r\n\t\t// Note: The Solution object is instantiated only once and is reused by\r\n\t\t// each test case.\r\n\t\tif (T.length() > S.length()) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tMap<Character, Integer> table = new HashMap<Character, Integer>();\r\n\t\tchar[] ss = S....
[ "0.57772386", "0.57094014", "0.56864256", "0.56689644", "0.56007326", "0.550909", "0.5499286", "0.5489182", "0.54861873", "0.54220796", "0.5416288", "0.5402709", "0.53984886", "0.5356736", "0.5326034", "0.5303742", "0.5266709", "0.52614677", "0.5235409", "0.5232551", "0.52133...
0.0
-1
Specify component name as a parameter, like: View all products or Orders
public void navigateTo(String component){ String locator = "//a[text()='" + component + "']"; //component is parameter of our method (on the below: navigateTo(String component)) wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(locator))).click(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setComponent(String componentName1) {\n this.component = componentName1;\n }", "public abstract Component getComponentByName(String name);", "String getComponentName();", "String getComponentName();", "public void setComponentName(ComponentName name);", "Builder setComponent(String compon...
[ "0.6488087", "0.6480269", "0.6240326", "0.6240326", "0.61473215", "0.60986364", "0.6002676", "0.5988219", "0.5966325", "0.581244", "0.5783182", "0.57292116", "0.5721346", "0.5721191", "0.5666627", "0.56191283", "0.56077135", "0.56034756", "0.56002027", "0.55807155", "0.557188...
0.50250304
63
TODO code application logic here
public static void main(String[] args) { String s="lksdhfsaklhsdszf"; System.out.println("lksdhfsaklhsdszf "+ palindrome(s)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }"...
[ "0.60802186", "0.5912082", "0.58425087", "0.58339286", "0.5810548", "0.57580656", "0.57396024", "0.5721001", "0.5705411", "0.5666017", "0.5657976", "0.5613798", "0.5611188", "0.5611188", "0.55960613", "0.55933475", "0.557677", "0.5572332", "0.5565667", "0.55482084", "0.553657...
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static post_property_option newInstance(String param1, String param2) { post_property_option fragment = new post_property_option(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.activity_post_property_screen, container, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@...
[ "0.6619185", "0.65246344", "0.6473144", "0.6473144", "0.64351684", "0.6325494", "0.62368196", "0.6189416", "0.6158721", "0.61455715", "0.6123594", "0.6107332", "0.6101038", "0.6092755", "0.6049496", "0.6049496", "0.60442764", "0.604003", "0.604003", "0.6007846", "0.59999037",...
0.0
-1
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public int...
[ "0.7323901", "0.720826", "0.71346456", "0.712432", "0.71223646", "0.7014406", "0.6975986", "0.6975986", "0.6975986", "0.6973731", "0.69676983", "0.69656146", "0.6960717", "0.69542384", "0.6943149", "0.6933716", "0.69288176", "0.69264686", "0.6922715", "0.6909953", "0.6902666"...
0.0
-1
TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic ...
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.599...
0.0
-1
Last item will be the footer
@Override public int getCount() { return resultList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Class<?> footer() {\n return footer;\n }", "@Override\n\t\t\tpublic void onLastItemVisible() {\n\t\t\t\t\n\t\t\t}", "@Override\n public Wrapper getAfterLast()\n {\n return null;\n }", "@Override\n\tpublic String formatFooter() {\n\t\treturn \"\\n\";\n\t}", "public void onFo...
[ "0.680151", "0.6622709", "0.6413282", "0.6366172", "0.6318798", "0.62912107", "0.6281096", "0.6240096", "0.6204741", "0.61932206", "0.613808", "0.60915023", "0.6078722", "0.6043703", "0.6040354", "0.60228854", "0.5986891", "0.598468", "0.59607416", "0.5945771", "0.5943057", ...
0.0
-1
Find the SD Card path
public String saveimage(Bitmap bmp, String file_name) { String path = null; File filepath = Environment.getExternalStorageDirectory(); OutputStream output; // Create a new folder in SD Card File dir = new File(filepath.getAbsolutePath() + "/JVHUB/"); if (dir.exists() && dir.isDirectory()) { // do something here // Create a name for the saved image String timeStamp = "JVHUB_pic"; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HH_mm_ss"); String currentTimeStamp = dateFormat.format(new Date()); File file = new File(dir, currentTimeStamp + ".png"); // Show a toast message on successful save try { output = new FileOutputStream(file); path = file.getAbsolutePath(); // Compress into png format image from 0% - 100% bmp.compress(Bitmap.CompressFormat.PNG, 100, output); output.flush(); output.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { dir.mkdirs(); String timeStamp = "JVHUB_pic"; File file = new File(dir, timeStamp + ".png"); // Show a toast message on successful save try { output = new FileOutputStream(file); path = file.getAbsolutePath(); // Compress into png format image from 0% - 100% bmp.compress(Bitmap.CompressFormat.PNG, 100, output); output.flush(); output.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static File getRemovableStorage() {\n final String value = System.getenv(\"SECONDARY_STORAGE\");\n if (!TextUtils.isEmpty(value)) {\n final String[] paths = value.split(\":\");\n for (String path : paths) {\n File file = new File(path);\n if...
[ "0.70292187", "0.6799682", "0.65922564", "0.6570023", "0.6491518", "0.6481777", "0.6402041", "0.6398959", "0.63210976", "0.6244797", "0.62429684", "0.6087304", "0.6045556", "0.6042889", "0.6030283", "0.6026261", "0.6006941", "0.5987511", "0.5975506", "0.5918474", "0.5868237",...
0.0
-1
setting progress bar to zero
@Override protected void onPreExecute() { pDialog = new ProgressDialog(getActivity()); pDialog.setMessage("Please wait..."); pDialog.setCancelable(false); pDialog.setIndeterminate(false); pDialog.setMax(100); pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pDialog.show(); // progressBar.setVisibility(View.VISIBLE); // progressBar.setProgress(0); super.onPreExecute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void reset() {\n\t\tmProgress = 0;\n\t}", "public void setProgress(int value);", "private void resetProBar() {\n matchProgressBar.setValue(matchProgressBar.getMinimum());\n }", "void setProgress(int progress);", "void setProgress(int progress);", "void setProgress(float prog...
[ "0.7546203", "0.71789134", "0.713026", "0.70206624", "0.70206624", "0.70102304", "0.6850272", "0.6810621", "0.6801642", "0.6771715", "0.6770708", "0.67628205", "0.67386115", "0.67219526", "0.6677245", "0.667453", "0.66614497", "0.6660129", "0.66197217", "0.65436757", "0.65176...
0.0
-1
Making progress bar visible updating progress bar value
@Override protected void onProgressUpdate(Integer... progress) { pDialog.setProgress(progress[0]); // updating percentage value //txtPercentage.setText(String.valueOf(progress[0]) + "%"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percent...
[ "0.7869361", "0.78174865", "0.7725495", "0.7668017", "0.7632286", "0.7566374", "0.75293875", "0.7512615", "0.7452047", "0.7445028", "0.7445028", "0.73771507", "0.7321026", "0.73123294", "0.7283333", "0.7282169", "0.7274883", "0.7258265", "0.7258265", "0.71365476", "0.70979065...
0.694653
30
TODO Autogenerated method stub
protected List getProperties() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Sets the term type.
public void setType(int type) { this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTermType(int ttype){\n if (ttype != TERM_FULL && ttype != TERM_NEAR_OPT &&\n ttype != TERM_EASY && ttype != TERM_PRED_ER ) {\n throw new IllegalArgumentException(\"Unrecognized termination type \"+\n \"code: \"+ttype);\n ...
[ "0.758057", "0.6921644", "0.6824296", "0.674999", "0.674999", "0.674999", "0.67307395", "0.6620565", "0.66082585", "0.659999", "0.6562707", "0.652737", "0.65090686", "0.6478084", "0.64495575", "0.6447053", "0.64383554", "0.64318484", "0.64250535", "0.64182746", "0.6394861", ...
0.0
-1
Obtains the term type.
public int getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TermType getTermType();", "public Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "public Keywords.Type getTyp...
[ "0.8934388", "0.7022892", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.70150596", "0.69628894", "0.6941295", "0.6941295", "0.6941295", "0.6941295", "0.6941295", "0.6941295", "0.6...
0.0
-1
Obtains the values for the term.
public String[] getValues() { String[] retArr = new String[values.size()]; values.toArray(retArr); return retArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Term[] getTerms() { return terms; }", "BigDecimal getTermValue();", "Values values();", "List getValues();", "public List<PropertyValueMember> terms() {\n return terms != null ? terms : new ArrayList<>();\n }", "public Collection<Term> getAll() {\n\t\treturn terms.values();\n\t}", "pub...
[ "0.6859336", "0.67503995", "0.6640164", "0.650079", "0.6496865", "0.63967913", "0.6360547", "0.62873065", "0.6226046", "0.6202141", "0.61873734", "0.6180176", "0.6145324", "0.61277014", "0.61277014", "0.611288", "0.61025107", "0.61007684", "0.6100612", "0.60870695", "0.608282...
0.0
-1
Adds a value to the value list for the term.
public void addValue(Object value) { if (!values.contains(value)) { values.add(value + ""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addValue() {\n addValue(1);\n }", "public void addValue(double value) {\r\n\t\tvalues.add(value);\r\n\t}", "public void addValue(Row value)\n\t{\n\t\tallValues.add(value);\n\t}", "public void add(Object value) {\n\n\t}", "public void addValue(String value) {\n synchronized (va...
[ "0.7181512", "0.70180285", "0.6939376", "0.6834056", "0.6715391", "0.6626197", "0.66167206", "0.6558328", "0.64753115", "0.64752674", "0.63684094", "0.6336278", "0.6293994", "0.62841386", "0.62708247", "0.6212017", "0.62073135", "0.62065524", "0.6173692", "0.6147002", "0.6142...
0.69461185
2
Removes a value from the value list for the term.
public void removeValue(Object value) { if (values.contains(value)) { values.remove(value + ""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Property removeValue(PropertyValue<?, ?> value);", "@Override\n\tpublic void removeValue(String arg0) {\n\t}", "public final void remove(@NotNull T value) {\n\t\tObject priorValue;\n\t\tboolean replaced;\n\t\tdo {\n\t\t\tpriorValue = this.value.get();\n\t\t\tObject newValue = remove(priorValue, value);\n\t\t\t...
[ "0.653692", "0.6536036", "0.64980906", "0.64615613", "0.6457523", "0.64312214", "0.6395608", "0.6393415", "0.6350963", "0.6350963", "0.62908864", "0.6264088", "0.620453", "0.6084725", "0.6074386", "0.60739297", "0.601535", "0.5977015", "0.596095", "0.5918927", "0.5879951", ...
0.7306032
0
Removes any currently kept values for the term and sets them to the specified ones.
public void setValues(Object[] vals) { values.clear(); for (int ctr=0; ctr<vals.length; ctr++) { values.add(vals[ctr] + ""); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Value.Builder clearTerm() {\n term = null;\n fieldSetFlags()[14] = false;\n return this;\n }", "protected void resetValues() {\n synchronized (values) {\n values.removeAll(new ArrayList(values));\n }\n }", "void unsetValue();", "void unsetValue();", ...
[ "0.64248276", "0.61457646", "0.6123513", "0.6123513", "0.59965533", "0.5937431", "0.5924123", "0.5874817", "0.5824537", "0.5823862", "0.57923037", "0.5759939", "0.5736473", "0.5688934", "0.56668127", "0.56426096", "0.5559644", "0.5552488", "0.5534981", "0.5509002", "0.5500136...
0.0
-1
Constructs a term data object for the specified term.
public TermData(String term) { this.term = term; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QDataSetTerm createDataSetTerm();", "public AcademicTerm(int termIndex, Term term) {\n this.termIndex = termIndex;\n this.term = term;\n }", "protected Term createTermFrom(String tag) {\n\t\tTerm tmp = terms.getOrDefault(tag, new Term(tag, this, terms.size()));\n\t\tterms.put(tag, tmp);\n\t\t/...
[ "0.7090865", "0.64460593", "0.6441779", "0.63273686", "0.6318271", "0.62687796", "0.60113275", "0.5985595", "0.5905975", "0.5771523", "0.5762616", "0.5747891", "0.57119507", "0.56589925", "0.55992407", "0.5555059", "0.55471474", "0.55358404", "0.5481146", "0.54688007", "0.545...
0.8255166
0
Properties // Gets the javascript statement bound to the "onclick" event.
protected String getOnClickStatement() { return "var $event = jQuery.event.fix(event); if ($event.target.nodeName !== 'BUTTON') { $event.stopPropagation(); }"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DISPID(-2147412104)\n @PropGet\n java.lang.Object onclick();", "public final String getOnClickAttribute() {\n return getAttributeValue(\"onclick\");\n }", "public String getOnclick()\r\n\t{\r\n\t\treturn _onClick;\r\n\t}", "public Object getOnclick() {\r\n\t\treturn getOnClick();\r\n\t}", "@DI...
[ "0.6891467", "0.67714894", "0.64966065", "0.63813585", "0.627492", "0.55563015", "0.5531359", "0.5518987", "0.54774916", "0.53205293", "0.52916706", "0.52806926", "0.5214573", "0.5189461", "0.5151111", "0.51480436", "0.50563025", "0.5032769", "0.5032769", "0.50276816", "0.502...
0.6742573
2
Retrieves all CPU profiles associated with the given cluster id.
List<CpuProfile> getAllForCluster(Guid clusterId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<CpuProfile> getAllForCluster(Guid clusterId, Guid userId, boolean isFiltered, ActionGroup actionGroup);", "static public ClusterProfile[] getClusterProfiles() {\n return getClusterProfiles(0);\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<...
[ "0.63897556", "0.5982972", "0.5218024", "0.520241", "0.50743526", "0.47455433", "0.47152156", "0.4661982", "0.4640873", "0.4567147", "0.45549524", "0.4552158", "0.43897465", "0.43803358", "0.43753216", "0.43719506", "0.43622002", "0.43481073", "0.43471372", "0.43438664", "0.4...
0.77396137
0
Retrieves all CPU profiles associated with the given cluster id, according user's permissions.
List<CpuProfile> getAllForCluster(Guid clusterId, Guid userId, boolean isFiltered, ActionGroup actionGroup);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<CpuProfile> getAllForCluster(Guid clusterId);", "static public ClusterProfile[] getClusterProfiles() {\n return getClusterProfiles(0);\n }", "public Vector getProfilePerms(Long profileId) throws Exception\n {\n if (!profilePerms.containsKey(profileId))\n {\n synchroni...
[ "0.7466457", "0.5808393", "0.5253936", "0.52048814", "0.5054086", "0.47765365", "0.4643998", "0.44806576", "0.44328684", "0.4423127", "0.44210902", "0.437721", "0.43766788", "0.43142036", "0.43120053", "0.43078244", "0.43005556", "0.42844054", "0.42754364", "0.4244133", "0.42...
0.6908322
1
Create the XmlUi processor. Root should point to a "skin" node. idToComponent is a Hashtable with application specific collection of id>java.awt.Component pairs. actionListener > route actions to it.
public XmlUi(IfcApplet applet, XmlNode root, Hashtable idToComponent, ActionListener actionListener) { this(applet, root, idToComponent, actionListener, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n com...
[ "0.58189005", "0.5484593", "0.5300479", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", "0.52899915", ...
0.5995
0
Return the java.awt.Label align value that corresponds to the "align" attribute in the given XmlNode
int getAlign(XmlNode node) { return getAlign(node.getAttribute(ATTR_ALIGN, "CENTER")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final String getAlignAttribute() {\n return getAttributeValue(\"align\");\n }", "int getAlignValue();", "public String getAlign() {\n return align;\n }", "public int getAlignment()\n {\n return align;\n }", "int getVerticalAlignValue();", "TickAlign getAlign();", "@Overr...
[ "0.7295235", "0.696436", "0.6772606", "0.6539898", "0.63218725", "0.6287527", "0.6237281", "0.6231627", "0.6210075", "0.6150922", "0.6135282", "0.6135282", "0.6129186", "0.6096488", "0.6014812", "0.59497195", "0.58987826", "0.58935636", "0.58875805", "0.5737165", "0.5696159",...
0.8236434
0
Set bgcolor, fgcolor and font attributes, defined in the XmlNode, on the given component.
void setAttrs(final Component comp, XmlNode node) { final String mouseEnter = node.getAttribute(ATTR_MOUSEENTER, (String) null); final String mouseExit = node.getAttribute(ATTR_MOUSEEXIT, (String) null); if ((mouseEnter != null) || (mouseExit != null)) { comp.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent e) { if (mouseEnter != null) { processActions(mouseEnter, comp); } } public void mouseExited(MouseEvent e) { if (mouseExit != null) { processActions(mouseExit, comp); } } }); } Color bgColor = node.getAttribute(ATTR_BGCOLOR, (Color) null); if (bgColor != null) { comp.setBackground(bgColor); } else { // comp.setBackground(Color.red); } Color fgColor = node.getAttribute(ATTR_FGCOLOR, (Color) null); if (fgColor != null) { comp.setForeground(fgColor); } int fontsize = node.getAttributeFromTree(ATTR_FONTSIZE, -1); String fontface = node.getAttributeFromTree(ATTR_FONTFACE); String fontStyle = node.getAttributeFromTree(ATTR_FONTSTYLE); if ((fontsize > 0) || (fontface != null) || (fontStyle != null)) { int style = Font.PLAIN; if (fontStyle != null) { if (fontStyle.equals("bold")) { style = Font.BOLD; } else if (fontStyle.equals("italics")) { style = Font.ITALIC; } else if (fontStyle.equals("none")) { style = Font.PLAIN; } } if (fontsize <= 0) { fontsize = 12; } if (fontface == null) { fontface = "Dialog"; } Font f = new Font(fontface, style, fontsize); comp.setFont(f); } int margin = node.getAttribute(ATTR_MARGIN, 1); int top = node.getAttribute(ATTR_MARGINTOP, margin); int left = node.getAttribute(ATTR_MARGINLEFT, margin); int bottom = node.getAttribute(ATTR_MARGINBOTTOM, margin); int right = node.getAttribute(ATTR_MARGINRIGHT, margin); Color color = node.getAttribute("color", Color.black); String border = node.getAttribute(ATTR_BORDER, ""); if (comp instanceof JComponent) { JComponent jcomp = (JComponent) comp; if (border.equals("matte")) { jcomp.setBorder(BorderFactory.createMatteBorder(top, left, bottom, right, color)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void parseColorInfo( Node node, GraphObject go ) {\n NamedNodeMap map = node.getAttributes();\n String foreground = map.getNamedItem( \"foreground\" ).getNodeValue();\n String background = map.getNamedItem( \"background\" ).getNodeValue();\n\n Color forecolor = parseRGB( foregrou...
[ "0.58768743", "0.5540339", "0.53470176", "0.53461987", "0.5278498", "0.5273409", "0.5226183", "0.52102023", "0.5208951", "0.52057946", "0.52013046", "0.5200219", "0.5160704", "0.51242024", "0.5120831", "0.51094574", "0.50458056", "0.50458056", "0.4971329", "0.49679336", "0.49...
0.70894843
0
Layout (or relayout) the children of the given Container.
private Container layoutContainer(Container panel, XmlNode node, Vector xmlChildren) { panel.removeAll(); String panelId = node.getAttribute(ATTR_ID); String layout = node.getAttribute(ATTR_LAYOUT, ""); Vector children = new Vector(); Vector nodes = new Vector(); int hspace = node.getAttribute(ATTR_HSPACE, 0); int vspace = node.getAttribute(ATTR_VSPACE, 0); int rows = node.getAttribute(ATTR_ROWS, 0); int cols = node.getAttribute(ATTR_COLS, 1); String defaultComp = node.getAttribute(ATTR_DEFAULT, "nocomp"); JTabbedPane tabs = null; if (layout.equals(VALUE_LAYOUTBORDER)) { panel.setLayout(new BorderLayout()); } else if (layout.equals(VALUE_LAYOUTCARD)) { panel.setLayout(new CardLayout()); } else if (layout.equals(VALUE_LAYOUTTAB)) { tabs = new JTabbedPane(); panel.setLayout(new BorderLayout()); panel.add("Center", tabs); } else if (layout.equals(VALUE_LAYOUTFLOW)) { panel.setLayout(new FlowLayout(FlowLayout.LEFT, hspace, vspace)); } else if (layout.equals(VALUE_LAYOUTGRID)) { panel.setLayout(new GridLayout(rows, cols, hspace, vspace)); } for (int i = 0; i < xmlChildren.size(); i++) { XmlNode childXmlNode = getReffedNode((XmlNode) xmlChildren.elementAt(i)); Component childComponent = xmlToUi(childXmlNode); if (childComponent == null) { continue; } componentToParent.put(childComponent, panel); children.addElement(childComponent); nodes.addElement(childXmlNode); if ( !childComponent.isVisible()) { continue; } if (layout.equals(VALUE_LAYOUTBORDER)) { String place = childXmlNode.getAttribute(ATTR_PLACE, "Center"); panel.add(place, childComponent); } else if (layout.equals(VALUE_LAYOUTTAB)) { tabs.add(childXmlNode.getAttribute(ATTR_LABEL), childComponent); } else if (layout.equals(VALUE_LAYOUTCARD)) { String childId = childXmlNode.getAttribute(ATTR_ID); panel.add(childId, childComponent); if (defaultComp.equals(childId)) { ((CardLayout) panel.getLayout()).show(panel, childId); } } else if (layout.equals(VALUE_LAYOUTINSET)) { GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace, hspace); GuiUtils.doLayout(panel, new Component[] { childComponent }, 1, GuiUtils.DS_Y, GuiUtils.DS_Y); break; } else if (layout.equals(VALUE_LAYOUTWRAP)) { GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace, hspace); GuiUtils.doLayout(panel, new Component[] { childComponent }, 1, GuiUtils.DS_N, GuiUtils.DS_N); break; } else if ( !layout.equals(VALUE_LAYOUTGRIDBAG)) { panel.add(childComponent); } } if (layout.equals(VALUE_LAYOUTGRIDBAG)) { double[] cw = GuiUtils.parseDoubles(node.getAttribute(ATTR_COLWIDTHS)); double[] rh = GuiUtils.parseDoubles(node.getAttribute(ATTR_ROWHEIGHTS)); if (cw == null) { cw = GuiUtils.DS_Y; } if (rh == null) { rh = GuiUtils.DS_N; } GuiUtils.tmpInsets = new Insets(vspace, hspace, vspace, hspace); GuiUtils.doLayout(panel, GuiUtils.getCompArray(children), node.getAttribute(ATTR_COLS, 1), cw, rh); } containerToNodeList.put(panel, nodes); return panel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void layoutContainer(Container parent);", "public void layoutContainer(Container parent) {\n // Step 1: Prepare for layout.\n prepare(SPECIFIC_SIZE);\n Insets insets = parent.getInsets();\n int width = parent.getWidth() - insets.left - insets.right;\n int height = parent...
[ "0.68504244", "0.664269", "0.6541113", "0.65257895", "0.65036714", "0.6460405", "0.639853", "0.62603545", "0.6223094", "0.612468", "0.61011356", "0.58812886", "0.58286196", "0.5799644", "0.57096344", "0.56352365", "0.56283504", "0.5616022", "0.5482654", "0.5411711", "0.540336...
0.57809764
14
Create an image label or button from the given XmlNode
private ImageButton makeImageButton(XmlNode node, String imagePath, String action) { if (imagePath == null) { imagePath = node.getAttribute(ATTR_IMAGE, "no path"); } try { Image image = IfcApplet.getImage(imagePath); Image overImage = IfcApplet.getImage(node.getAttribute(ATTR_OVERIMAGE, (String) null)); Image downImage = IfcApplet.getImage(node.getAttribute(ATTR_DOWNIMAGE, (String) null)); int w = node.getAttribute(ATTR_WIDTH, -1); int h = node.getAttribute(ATTR_HEIGHT, -1); boolean border = node.getAttribute(ATTR_BORDER, false); boolean onPress = node.getAttribute(ATTR_EVENT, "onclick").equals("onpress"); Dimension dim = null; if ((w > 0) && (h > 0)) { dim = new Dimension(w, h); } ImageButton tb = new ImageButton(image, overImage, downImage, dim, border, onPress); String key = node.getAttribute(ATTR_KEY); if (key != null) { keyToComponent.put(key.toLowerCase(), tb); } if (action == null) { action = node.getAttribute(ATTR_ACTION, (String) null); } if (action != null) { tb.setActionListener(this); tb.setAction(action); } return tb; } catch (Exception exc) { exc.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected Button createPushButton(Composite parent, String label, Image image) {\n\t\treturn super.createPushButton(parent, label, image);\n\t}", "ElementImage createElementImage();", "private void initNodeListe() {\n\t\t\n\t\tbtnAddTransaction = new JFXButton();\n\t\tbtnAddTransaction.setButtonTy...
[ "0.5831418", "0.56772006", "0.53696907", "0.53107786", "0.5300874", "0.5241229", "0.52404314", "0.5224586", "0.51797754", "0.5116995", "0.50522304", "0.50304604", "0.50144565", "0.50129974", "0.49852166", "0.4917568", "0.49112403", "0.49079347", "0.4904156", "0.4892143", "0.4...
0.6569554
0
Create the awt Component defined by the given skin node.
private Component createComponent(XmlNode node, String id) { Component comp = null; String tag = node.getTag(); if (tag.equals(TAG_PANEL)) { comp = layoutContainer(new JPanel(), node, node.getChildren()); } else if (tag.equals(TAG_BORDER)) { comp = layoutBorder(node, node.getChildren()); } else if (tag.equals(TAG_TEXTINPUT)) { int cols = node.getAttribute(ATTR_COLS, -1); int rows = node.getAttribute(ATTR_ROWS, -1); String value = node.getAttribute(ATTR_VALUE, ""); JTextComponent textComp; if (rows > 1) { if (cols < 0) { cols = 30; } textComp = new JTextArea(value, rows, cols); } else { if (cols == -1) { textComp = new JTextField(value); } else { textComp = new JTextField(value, cols); } ((JTextField) textComp).addActionListener(this); } comp = textComp; String action = node.getAttribute(ATTR_ACTION, (String) null); if (action != null) { componentToAction.put(textComp, action); } } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) { String actionTemplate = null; JMenuItem mi; String label = node.getAttribute(ATTR_LABEL, ""); String action = node.getAttribute(ATTR_ACTION); String value = node.getAttribute(ATTR_VALUE); String key = node.getAttribute(ATTR_KEY); if ((action == null) && (actionTemplate != null) && (value != null)) { action = GuiUtils.replace(actionTemplate, "%value%", value); } if ((key != null) && !key.startsWith("group:")) { label = label + " " + key; } if (node.getTag().equals(TAG_CBMENUITEM)) { boolean initValue = node.getAttribute(ATTR_VALUE, true); JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label, initValue); String group = node.getAttribute(ATTR_GROUP, (String) null); addToGroup(group, cbmi); mi = cbmi; if (action != null) { Hashtable actions = new Hashtable(); actions.put(ATTR_ACTION, action); actions.put(ATTR_VALUE, new Boolean(initValue)); componentToAction.put(cbmi, actions); cbmi.addItemListener(this); if ((group == null) || initValue) { itemStateChanged(new ItemEvent(cbmi, 0, cbmi, ItemEvent.ITEM_STATE_CHANGED)); } } if (key != null) { if (key.startsWith("group:")) { if (group != null) { key = key.substring(6); keyToComponent.put(key.toLowerCase(), group); } } else { keyToComponent.put(key.toLowerCase(), mi); } } } else { mi = new JMenuItem(label); if (action != null) { mi.setActionCommand(action); mi.addActionListener(this); if (key != null) { keyToComponent.put(key.toLowerCase(), mi); } } } if (id != null) { idToMenuItem.put(id, mi); } comp = mi; } else if (tag.equals(TAG_MENU)) { Vector children = node.getChildren(); JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, "")); comp = menu; for (int i = 0; i < children.size(); i++) { XmlNode childElement = (XmlNode) children.get(i); if (childElement.getTag().equals(TAG_SEPARATOR)) { menu.addSeparator(); continue; } Component childComponent = xmlToUi(childElement); if (childComponent == null) { continue; } menu.add(childComponent); } } else if (tag.equals(TAG_MENUBAR)) { Vector children = node.getChildren(); JMenuBar menuBar = new JMenuBar(); comp = menuBar; for (int i = 0; i < children.size(); i++) { XmlNode childElement = (XmlNode) children.get(i); Component childComponent = xmlToUi(childElement); if (childComponent == null) { continue; } menuBar.add(childComponent); } } else if (tag.equals(TAG_SPLITPANE)) { Vector xmlChildren = node.getChildren(); if (xmlChildren.size() != 2) { throw new IllegalArgumentException( "splitpane tag needs to have 2 children " + node); } XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0)); XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1)); Component leftComponent = xmlToUi(leftNode); Component rightComponent = xmlToUi(rightNode); boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true); int orientation = findValue(node.getAttribute(ATTR_ORIENTATION, (String) null), SPLITPANE_NAMES, SPLITPANE_VALUES); JSplitPane split = new JSplitPane(orientation, continuous, leftComponent, rightComponent); int divider = node.getAttribute(ATTR_DIVIDER, -1); if (divider != -1) { split.setDividerLocation(divider); } split.setOneTouchExpandable( node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true)); double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0); if (resizeweight != -1.0) { split.setResizeWeight(resizeweight); } comp = split; } else if (tag.equals(TAG_LABEL)) { String label = node.getAttribute(ATTR_LABEL, ""); comp = new JLabel(label, getAlign(node)); } else if (tag.equals(TAG_IMAGE)) { comp = makeImageButton(node, null, null); } else if (tag.equals(TAG_SHAPEPANEL)) { comp = new ShapePanel(this, node); } else if (tag.equals(TAG_BUTTON)) { JButton b = new JButton(node.getAttribute(ATTR_LABEL, "")); b.setActionCommand(node.getAttribute(ATTR_ACTION, "No action")); b.addActionListener(this); comp = b; } else if (tag.equals(TAG_CHOICE)) { Choice b = new java.awt.Choice(); String action = node.getAttribute(ATTR_ACTION, (String) null); int selected = node.getAttribute(ATTR_SELECTED, 0); Hashtable actions = new Hashtable(); for (int i = 0; i < node.size(); i++) { XmlNode child = getReffedNode(node.get(i)); if ( !child.getTag().equals(TAG_ITEM)) { throw new IllegalArgumentException("Bad choice item:" + child); } b.add(child.getAttribute(ATTR_LABEL, "")); String value = child.getAttribute(ATTR_VALUE, (String) null); if (value != null) { actions.put(ATTR_VALUE + i, value); } String subAction = child.getAttribute(ATTR_ACTION, (String) null); if (subAction != null) { actions.put(ATTR_ACTION + i, subAction); } } comp = b; if (action != null) { actions.put(ATTR_ACTION, action); componentToAction.put(b, actions); b.select(selected); b.addItemListener(this); itemStateChanged(new ItemEvent(b, 0, b, ItemEvent.ITEM_STATE_CHANGED)); } } else if (tag.equals(TAG_CHECKBOX)) { JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, ""), node.getAttribute(ATTR_VALUE, false)); String action = node.getAttribute(ATTR_ACTION, (String) null); comp = b; if (action != null) { componentToAction.put(comp, action); b.addItemListener(this); itemStateChanged(new ItemEvent(b, 0, b, ItemEvent.ITEM_STATE_CHANGED)); } } else { comp = new JLabel("Unknown tag:" + tag); System.err.println("Unknown tag:" + node); } return comp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Component createComponent();", "Component createComponent();", "public void setSkin(Skin skin);", "ComponentType createComponentType();", "public void Skin() {\n }", "abstract public Skin getSkin();", "public SkinTest() {\r\n initComponents();\r\n }", "private void createdComponent() {\r...
[ "0.56172895", "0.56172895", "0.55945086", "0.54530734", "0.5341608", "0.5314193", "0.527142", "0.51888716", "0.49938393", "0.49565426", "0.48518994", "0.48181096", "0.48040172", "0.47968292", "0.47968292", "0.47968292", "0.47968292", "0.47968292", "0.47968292", "0.47968292", ...
0.53919286
4
Find the corresponding int value in the values array at the index of the v value in the names array
private int findValue(String v, String[] names, int[] values, int dflt) { if (v == null) { return dflt; } v = v.toLowerCase(); for (int fidx = 0; fidx < names.length; fidx++) { if (v.equals(names[fidx])) { return values[fidx]; } } return dflt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int indexFromName(String name) {\n for (int index = 0; index < values.length; index++) {\n if (getNames()[index] == name) {\n return index;\n }\n }\n return -1;\n }", "private static float getValue(ArrayList<Array> arrays, float index, String...
[ "0.68902653", "0.6279617", "0.6274147", "0.61893964", "0.5973514", "0.5811433", "0.58090425", "0.57951194", "0.5654755", "0.5603127", "0.55635184", "0.5549224", "0.5542268", "0.5533215", "0.55325294", "0.5508241", "0.55000484", "0.5460335", "0.5434789", "0.54235303", "0.54218...
0.8165782
0
This method parses the given code line and adds the resulting COGCommand(s) to the cluster.
public abstract String parse(String name, List<CodeLine> c, Cluster cluster, Map<String,String> subs, Assemble compiler);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processCommand(String line) {\n\t\ttry {\n\t\t\tString[] command = line.replaceAll(\"[$]\", \"\").split(\" \");\n\t\t\tif (command[0].equals(\"Add\") && command.length == 4) {\n\t\t\t\tadd(command[1], command[2], Integer.valueOf(command[3]));\n\t\t\t} else if (command[0].equals(\"Charge\") && command.l...
[ "0.5880019", "0.55902815", "0.5387331", "0.52270305", "0.51734906", "0.51394266", "0.51301533", "0.5085382", "0.5034139", "0.49940914", "0.49289423", "0.49268207", "0.49052432", "0.4868238", "0.48499563", "0.4837045", "0.48324382", "0.48106807", "0.48088804", "0.48070946", "0...
0.5336866
3
This method adds any system defines to the map of substitutions.
public void addDefines(Map<String, String> subs) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSubstitution(Map<String, String> substitutionMap, String find, String replace)\n {\n if (find != null && replace != null)\n {\n substitutionMap.put(find.toUpperCase(), replace);\n } \n }", "private static void registerToSystem() {\n Enumeration<?...
[ "0.5719594", "0.56565905", "0.5589251", "0.5524743", "0.50830764", "0.5039791", "0.50069743", "0.4983774", "0.48964426", "0.48923317", "0.48802632", "0.4844669", "0.4789909", "0.47860166", "0.478053", "0.47628582", "0.47545004", "0.47464707", "0.47451726", "0.47445893", "0.47...
0.68855023
0
Creates a self checkout station
@Before public void setUp() throws Exception { currency = Currency.getInstance("CAD"); int[] noteDenominations = { 5, 10, 20, 50, 100 }; BigDecimal[] coinDenominations = { BigDecimal.valueOf(0.05), BigDecimal.valueOf(0.10), BigDecimal.valueOf(0.25), BigDecimal.valueOf(1.0), BigDecimal.valueOf(2.0) }; int maxWeight = 23000; int scaleSensitivity = 10; station = new SelfCheckoutStation(currency, noteDenominations, coinDenominations, maxWeight, scaleSensitivity); //load the dispensers for(int i = 0; i < station.banknoteDispensers.size(); i++) { Banknote banknoteToLoad = new Banknote(noteDenominations[i],currency); for(int j = 0; j < 100; j++) { station.banknoteDispensers.get(noteDenominations[i]).load(banknoteToLoad); } } for(int i = 0; i < station.coinDispensers.size(); i++) { Coin coinToLoad = new Coin(coinDenominations[i], currency); for(int j = 0; j < 100; j++) { station.coinDispensers.get(coinDenominations[i]).load(coinToLoad); } } // creates a banknote and a coin int value = 5; banknote = new Banknote(value, currency); coin = new Coin(coinDenominations[0], currency); //creates a payWithCoin and a payWithBanknote payWithBanknote = new PayWithBanknote(station); payWithCoin = new PayWithCoin(station); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean create(Station obj) {\n\t\treturn false;\r\n\t}", "FuelingStation createFuelingStation();", "ChargingStation createChargingStation();", "protected void copyCreateStation(NbaDst work) {\n\t\tif (!work.getNbaSources().isEmpty()) {\n\t\t\tNbaSource nbaSource = (NbaSource) work.getN...
[ "0.6321027", "0.6274154", "0.6180798", "0.55312425", "0.5424928", "0.5303719", "0.5263615", "0.52598417", "0.5231791", "0.5180999", "0.51716846", "0.514072", "0.5107145", "0.51050586", "0.50994235", "0.5089813", "0.5064285", "0.50398755", "0.50398755", "0.50398755", "0.502807...
0.51414394
11
Creates all the "text boxes" for the shelter information on page when shelter is clicked
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_list); model = ModelFacade.getInstance(); shelterName = findViewById(R.id.sheltertext); key = findViewById(R.id.uniqueKey); capacity = findViewById(R.id.capacity); vacancy = findViewById(R.id.vacancy); longitude = findViewById(R.id.longitude); latitude = findViewById(R.id.latitude); address = findViewById(R.id.address); special = findViewById(R.id.special); phone = findViewById(R.id.phone); restriction = findViewById(R.id.restrict); selfReport = findViewById(R.id.selfReport); Intent intent = getIntent(); Bundle bundle = intent.getExtras(); if (bundle != null) { final Shelter shelter = (Shelter) bundle.get("Shelter"); if (shelter != null) { reload(shelter); } final Button button = findViewById(R.id.updateVacancyButton); button.setOnClickListener(v -> requestUpdateVacancy(shelter)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(S...
[ "0.72077525", "0.6808849", "0.673253", "0.6620402", "0.6596075", "0.6575526", "0.6514935", "0.65047973", "0.64812756", "0.6470426", "0.6442673", "0.64251006", "0.6421763", "0.6419597", "0.6413348", "0.64087105", "0.6406395", "0.6395639", "0.63749886", "0.63301456", "0.6317419...
0.0
-1