query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
/ Write a return method that can remove the duplicate values from String Ex: removeDup("AAABBBCCC") ==> ABC Approach One:
public static void main(String[] args) { String str = "AAABBBCCC"; String result = ""; for (int i = 0; i < str.length(); i++) { for (int j = 0; j < str.length(); j++) { if (str.charAt(i) == str.charAt(j)) { result += str.charAt(i); ...
[ "public String deDup(String input) {\n // Write your removeCho2 here.\n if (input == null || input.length() <= 1) {\n return input;\n }\n int i = 0;\n int j = 0;\n char[] in = input.toCharArray();\n while (j < in.length) {\n if (i == 0 || in[i -...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { ExecutaButton1 = new javax.swing.JButton(); ExecutaButton2 = new javax.swing.JButton(); ExecutaButton3 = new javax.swing.JButton(); ...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
HBox buttons returns HBox that contains buttons, set in the bottom of border pane in the scene
private HBox Buttons () { HBox hbox = new HBox(); hbox.setSpacing(20.0); hbox.setPrefHeight(70.0); hbox.setAlignment(Pos.CENTER); Button btnTotal = new Button("Total"); btnTotal.setStyle("-fx-background-radius: 5em; "+ "-fx-min-width: 50px; " + "-fx-min-...
[ "public HBox makeHBox(){\n HBox hBox = new HBox();\n hBox.setPrefHeight(55);\n\n check = new Button(\"Check\");\n check.setPrefSize(BUTTON_W, BUTTON_L);\n\n hint = new Button(\"Hint\");\n hint.setPrefSize(BUTTON_W, BUTTON_L);\n\n solve = new Button(\"Solve\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changing the color of the line
public void changeColor(View v) { switch (v.getId()) { case R.id.red: { drawView.setColor(Color.RED); break; } case R.id.yellow: { drawView.setColor(Color.YELLOW); break; } case R.id.green: { drawView.setColor(Color.GREEN); break; } case R.id.blue: { drawView.setC...
[ "public void setLineColor(Color c) { lineColor = c; }", "public void setColor(Color c){\n lineColor = c;\n }", "public void lineColor(Color c) {\r\n _lineColor = c;\r\n }", "public abstract void lineColor(int color);", "private void drawLine(Color wybranyKolor2, int currentX, int current...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Implement message sending
@Override public void send(String message) { }
[ "public void send() {\n\t\t\r\n\t}", "@Override\n public void handleMessage(Message msg) {\n\n\n\n }", "@Override\r\n\tpublic void send(String msg) {\n\t\t\r\n\t}", "@Override\n public void processMessage() {\n\n }", "public void send() {\n String info = message.getText();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by greg3d on 05.11.17.
public interface ISetAnimation { void setShowAnimation(Animation showAnimation); void setHideAnimation(Animation showAnimation); }
[ "@Override\n public void extornar() {\n \n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n }", "protected void mo4791d() {\n }", "@Override\n \tpublic void init() {\n \n \t}", "@Override\n\t\tpub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ID of the Instance resource to update. To get the instance ID, use a [InstanceService.List] request. string instance_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "&lt;=50"];
@java.lang.Override public com.google.protobuf.ByteString getInstanceIdBytes() { java.lang.Object ref = instanceId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref)...
[ "public void setInstanceid(Long instanceid) {\n this.instanceid = instanceid;\n }", "@JsonSetter(\"instance-id\")\n public void setInstanceId(String instanceId)\n {\n if( instanceId == null )\n throw new InvalidArgumentException(\"The instance id cannot be null\");\n \n this.instanceId =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increase the bounce count to the email addresses involved. The column "DataTypeValues" from MsgAction table should contain address types (FROM, TO, etc) that need to be updated (bounce count increment).
public Long process(MessageBean messageBean) throws DataValidationException { if (isDebugEnabled) logger.debug("Entering process() method..."); if (messageBean==null) { throw new DataValidationException("input MessageBean is null"); } if (taskArguments == null || taskArguments.trim().length() ==...
[ "public Builder setMailCount(int value) {\n bitField0_ |= 0x00004000;\n mailCount_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void updateUserBuildCount(String mailAddress, int buildId,\n\t\t\tint buildCount) throws CacheDaoException {\n \n\t}", "SkypeForBu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by Apache iBATIS ibator. This method corresponds to the database table bimanufacinfotb
int deleteByPrimaryKey(Short manufacId);
[ "public Object getCABAFILIA_URBANI() throws SQLException {\n\t\treturn select.getCacheValueAt(rowNumber, 5);\n\t}", "public static List<ColumnBeanPropertyPair> getBiInfo() {\n return biInfo;\r\n }", "public int addTab5Info(String SysGbn,String Jawon) throws SQLException, Exception {\n\t\tConnection c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table shop_book
public ShopBookExample() { oredCriteria = new ArrayList<Criteria>(); }
[ "@Override\n\tpublic List<Book> getAllBooks() {\n\t\tString sql=\"select * from springbook\";\n\t\tList<Book> bookList=jdbcTemplate.query(sql,new BookMapper());\n\t\treturn bookList;\n\t}", "@Mapper(BookMapper.class)\n @SqlQuery(\"select b.isbn, b.title, b.number_of_pages, a.id a_id, a.name a_name, g.id g_id, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PojogenProperty__Group_16_1__0__Impl" $ANTLR start "rule__PojogenProperty__Group_16_1__1" ../org.sqlproc.meta.ui/srcgen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:14771:1: rule__PojogenProperty__Group_16_1__1 : rule__PojogenProperty__Group_16_1__1__Impl ;
public final void rule__PojogenProperty__Group_16_1__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.sqlproc.meta.ui/src-gen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:14775:1: ( rule__PojogenProperty__Group_16_...
[ "public final void rule__PropertyDefinition__Group_4__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.osate.xtext.aadl2.propertyset.ui/src-gen/org/osate/xtext/aadl2/propertyset/ui/contentassist/antlr/internal/InternalPro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get encoding key (server or client), by analyzing the file name of a real media file. Example: seniorcitizenroom00001234s00a6gt8e.jpg
public int mediaFileGetEncodingKeyOfRealFileName(Context context, String mediaFilePath) { // Validate parameter if (mediaFilePath == null || mediaFilePath.length() == 0) return 0; // Get file name String fileName = FileUtilFunctions.fileGetFileNamePart(mediaFilePath); if (fileName == null || fileName.length...
[ "private String getEncodedFilename(String filename)\n\t{\n\t\treturn (filename.substring(0,filename.length()) + \".lzw\");\n\t}", "protected String getFileName(Object key) {\n\t\tString fileName = format.format((key.hashCode() & 0x7FFFFFFF) % MAX_CAPACITY);\n\t\tStringBuffer buffer = new StringBuffer(12);\n\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the file given is a quokka file. It may be a quokka file if: 1. The source is an ant build file and a matching quokka file exists (by naming convention) 2. The file content is detected as a quokka file
private File getQuokkaFile(File buildFile) { if (getImportStack().size() != 0) { // Don't detect when importing return null; } // TODO: add content-based detection (check for quokka header) String name = buildFile.getName(); if (name.indexOf("quokka") != -1) { ...
[ "boolean isActualFile();", "public boolean isFile() {\n return CATEGORY_FILE.equals(category());\n }", "boolean hasFileFormat();", "public boolean isAudioFile(){\n\t\treturn isFileType(getMediaName(), \"Audio\");\n\t}", "public final boolean isFile() {\n\t\treturn this.documentHasType(\"file\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PojogenProperty__Group_21__2" $ANTLR start "rule__PojogenProperty__Group_21__2__Impl" ../org.sqlproc.meta.ui/srcgen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:15700:1: rule__PojogenProperty__Group_21__2__Impl : ( ( rule__PojogenProperty__DbTableAssignment_21_2 ) ) ;
public final void rule__PojogenProperty__Group_21__2__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.sqlproc.meta.ui/src-gen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:15704:1: ( ( ( rule__PojogenProperty__D...
[ "public final void rule__TableProperty__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.obeo.dsl.sprototyper.ui/src-gen/fr/obeo/dsl/ui/contentassist/antlr/internal/InternalSPrototyper.g:6512:1: ( ( ( rule__TablePropert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getMaxMileage method, of class Analysis.
@Test public void testGetMaxMileage() { System.out.println("Test case for getMaxMileage"); Analysis instance = new Analysis(); int expResult = 0; int result = instance.getMaxMileage(); assertEquals(expResult, result); }
[ "@Test\r\n public void testAreaMax() {\r\n System.out.println(\"areaMax\");\r\n int MAX = 7;\r\n ListaFiguras instance = new ListaFiguras(MAX);\r\n instance.agrega(new Rectangulo(20,15));\r\n instance.agrega(new Triangulo(200,53));\r\n instance.agrega(new Cuadrado(1));\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of execute method, of class MovingWindowWeightedAverage.
@Test public void testExecute_5args_1() { System.out.println("execute"); float[] waveforms = new float[] {1.0f, 5.0f, 2.0f, 3.0f, 2.2f, -1.0f, 4.0f, 5.0f, 0.0f, 0.0f, 3.2f, -0.5f, 1.1f, 2.2f, 1.1f, 4.0f}; int recordLength = 16; int radius = 2; WaveformUtils.WindowType windowType = WaveformUtils.WindowType.R...
[ "@Test\n\tpublic void testExecute_4args_2()\n\t{\n\t\tSystem.out.println(\"execute\");\n\t\tdouble[] waveforms = new double[] {1.0, 5.0, 2.0, 3.0, 2.2, -1.0, 4.0, 5.0, 0.0, 0.0, 3.2, -0.5, 1.1, 2.2, 1.1, 4.0};\n\t\tint recordLength = 16;\n\t\tint radius = 2;\n\t\tboolean useUnbiasedEstimateOfVariance = true;\n\t\td...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.lvl6.proto.MinimumUserProto sender = 1;
com.lvl6.proto.UserProto.MinimumUserProto getSender();
[ "comm.CommModel.MemberOrBuilder getSenderOrBuilder();", "public bridgempp.services.socket.protobuf.UserOrBuilder getSenderOrBuilder() {\n return getSender();\n }", "com.ubbcluj.amcds.myDalgs.communication.Protocol.ProcessIdOrBuilder getSenderOrBuilder();", "Reference getSender();", "comm.CommModel.Membe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an abstract resource with the specified parameters.
protected AbstractResource(T template, String resourceId, D details) { this.template = checkNotNull(template, "template is null"); this.id = checkNotNull(resourceId, "resourceId is null"); this.details = details; }
[ "protected abstract Resource<V> createResource();", "public interface CreateResourceService {\n Resource create(ResourceType type, String title, String author, int releaseYear);\n}", "public abstract GeneratedResource generateResource(String params);", "public interface ResourceFactory {\n\n\t/**\n\t * res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles all the elements of the Ehrs for Locations
private void handleEhrs(Connection connection, VhDirLocation loc, int locId) throws SQLException { ResultSet resultset = DatabaseUtil.runQuery(connection,"SELECT * from ehr where location_id = ?", locId); while(resultset.next()) { VhDirEhr ehr = ResourceFactory.getEhr(resultset,connection); loc.addEhr(ehr); ...
[ "@Override\n\tpublic Hour heures() {\n\t\treturn null;\n\t}", "@Override\n public Void visitTime(Time time, ElmContext context) {\n return super.visitTime(time, context);\n }", "private void getTimeHour(){\n\t\tLocalDate date=LocalDate.now();\n\t\tthis.orderDate=date.toString();\n\t\tLocalTime myOb...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string mapImgName = 3;
boolean hasMapImgName();
[ "String getNameImg();", "public String getImageName() { return _imageName; }", "public File getMapFileFromName(String mapName) {\n/* 66 */ return null;\n/* */ }", "public String getImgname() {\r\n return imgName;\r\n }", "private static ImageIcon getImageFromMap( String name )\r\n {\r\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: packageprivate
public void clearValues(boolean z) { if (z) { this.mStartValues.viewValues.clear(); this.mStartValues.idValues.clear(); this.mStartValues.itemIdValues.clear(); return; } this.mEndValues.viewValues.clear(); this.mEndValues.idValues.clear(); ...
[ "protected void method_5557() {}", "@Override\n }", "@Override\n public void extornar() {\n \n }", "public void mo28221a() {\n }", "protected void mo4791d() {\n }", "protected void method_2117() {\n }", "@Override\r\n public void publicando() {\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
change stage to toDoList menu
@FXML private void toDoListScene(ActionEvent event) { }
[ "public void getToScheduleMenu () {\n // Drop downs all need to be empty\n primaryStage.hide();\n primaryStage.setScene(sceneForScheduleMenu);\n primaryStage.setTitle(\"Create Schedule - City Move\");\n primaryStage.show();\n }", "@Override\r\n\tpublic void start(Stage primar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ PreparedStatementDeleteTest obj = new PreparedStatementDeleteTest();
public static void main(String[] args) { MemberDAO dao = new MemberDAO(); Scanner key = new Scanner(System.in); System.out.print("삭제할아이디:"); String id = key.next(); dao.Delete(id); }
[ "@Test\r\n public void testEliminar() {\r\n System.out.println(\"Eliminar\");\r\n String id = \"50\";\r\n MetodosBD instance = new MetodosBD();\r\n\r\n PreparedStatement ps = null;\r\n try {\r\n String sql = \"DELETE FROM rafalee_bd.estudiante WHERE idEstudiante=?\";...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility method to set the display flag for displaying internal operations of the heap bubble and trickle operations
public void setDisplayFlag(boolean setState) { displayFlag = setState; }
[ "boolean shouldDisplay();", "public void print() {\n for (int i = 1; i <= heapSize / 2; i++) {\n System.out.print(\" PARENT : \" + heap[i]\n + \" LEFT CHILD : \" + heap[2 * i]\n + \" RIGHT CHILD :\" + heap[2 * i + 1]);\n System.out.println();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a column to the list of this table expression columns.
public void addColumn(String name, SQLiteType type, boolean primaryKey) { Column column = new Column(this, name, type, primaryKey); this.addColumn(column); }
[ "public void addColumn(LPColumn column) {\n int index = getNumColumns();\n newColumns.add(column);\n if (column.getName() != null) columnNames.put(index, column.getName());\n else columnNames.put(index, \"x\" + index);\n if (column.isArtificial()) artificials.put(index,true);\n updated = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
KeywordName: productQuantityValue Usage: WebElement productQuantityValue(WebDriver driver) Description: Product quantity to select Author: Automators Dated: 08May2015 Notes:
public WebElement productQuantityValue(WebDriver driver,String quanVal) { WebElement element=driver.findElement(By.name(quanVal)); return element; }
[ "@Given(\"selects the required features and quantity for item\")\n\tpublic void selects_the_required_features_and_quantity_for_item() {\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"product_attribute_71_10_16\\\"]\")).sendKeys(\"15\");\n\t}", "@Test\n\n public void Test13(){\n\n clickOnElement(\"//*[@i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the argument value should be passed into the wrapper at run time
@ApiModelProperty(required = true, value = "Whether the argument value should be passed into the wrapper at run time") public Boolean getShowArgument() { return showArgument; }
[ "public Conditional getArg(){\r\n return arg;\r\n }", "boolean hasArg2();", "boolean hasFuncArg();", "public void handle(ArgumentProcessor proc) {\n\t\tproc.setValue(m_value ? Boolean.TRUE : Boolean.FALSE, m_field);\n\t}", "protected boolean isArgumentRequired() {\n\t\treturn true;\n\t}", "boolean has...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Open and set server
private boolean openSocket(){ try { Main.logger.info("Начинаю запуск сервера"); socketChannel = ServerSocketChannel.open(); socketChannel.socket().bind(new InetSocketAddress(port)); socketChannel.socket().setSoTimeout(timeout); Main.logger.info("Сервер...
[ "private void openConnection() {\n\t\tif (server == null || !server.isConnected())\n\t\t\tserver = new ClientConsole(this.host, this.port);\n\t}", "public void setServer (Server s) {\r\n\t\tthis.server = s;\r\n\t}", "public static void setServer(ServerMain server) {\r\n\t\tServerMain.server = server;\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .CDOTAUserMsg_UnitEvent.FadeGesture fade_gesture = 8;
public Builder setFadeGesture(skadistats.clarity.wire.common.proto.DotaUserMessages.CDOTAUserMsg_UnitEvent.FadeGesture value) { if (fadeGestureBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fadeGesture_ = value; onChanged(); ...
[ "public void mo68725g() {\n this.f45419t = false;\n MixtapeGestureControlView mixtapeGestureControlView = this.f45401B;\n if (mixtapeGestureControlView == null) {\n C32569u.m150520b(C6969H.m41409d(\"G7F8AD00D\"));\n }\n ZHShapeDrawableRelativeLayout zHShapeDrawableRelat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new POI filesystem around the given stream.
public void initialize(RandomAccessInputStream stream) throws IOException;
[ "Document create(Document entity, InputStream stream)\n throws WorkspaceException;", "public static IStream create(IStream stream) {\n return stream;\n }", "SeekableInputStream newInputStream(Path path) throws IOException;", "public TOSFileInputStream(TOSFile tosfile, InputStream stream)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This object can't be instantiated directly.
private Session() { }
[ "private O()\r\n {\r\n super();\r\n }", "protected ExampleObject() {\n super();\n }", "private Engine() {\n\t\tthrow new UnsupportedOperationException(\n\t\t\t\"This utility class should not be instantiated\");\n\t}", "protected GeometricObject() {\r\n\r\n\t}", "private Si...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets (as xml) the "requires" element
public void xsetRequires(org.apache.geronimo.corba.xbeans.csiv2.css.CSSAssociationOptionList requires) { synchronized (monitor()) { check_orphaned(); org.apache.geronimo.corba.xbeans.csiv2.css.CSSAssociationOptionList target = null; target = (org.apache.geronimo.c...
[ "private void addXMLRequirements()\r\n \t{\r\n \t\tEnumeration<Requirement> reqs = requirements.elements();\r\n \t\twhile (reqs.hasMoreElements())\r\n \t\t{\r\n \t\t\tRequirement req = (Requirement) reqs.nextElement();\r\n \t\t\treq.toDatabase(0, RationaleElementType.NONE);\r\n \t\t}\r\n \t}", "public void setReq...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
call this first because loadDocument calls this
public boolean documentHasChanged(String documentName, String version) { ensureDatabaseExists(); // no version so always load if(version==null) return true; // no change so do not upload String currentVersion = getCurrentDocumentVersion(documentName); return((currentVersion == null) ||...
[ "private void LoadPage(){\n String[] newDocuments = controller.getDocumentAtPage();\n this.documents.clear();\n for(String doc : newDocuments){\n this.documents.addElement(doc);\n }\n }", "@Override\n public void parseDocument() {\n\n }", "public void buildDocumen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the class name.
public String getClassName() { return className; }
[ "public java.lang.String getClassname() {\r\n return classname;\r\n }", "private String getClassName() {\r\n\t\tString s = getClass().getName();\r\n\t\treturn s.substring(s.lastIndexOf(\".\"));\r\n\t}", "public String getClassName()\n {\n\tString className = getClass().getName();\n\treturn classNam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ invalid configuration > exception
@Test(expected = FlocogeException.class) public void testInvalidConfiguration() throws FlocogeException { Configuration config = mock(Configuration.class); when(inspector.inspect(eq(model))).thenReturn(true); new Flocoge(log, config, model, diagramLoader, inspector, generator).generate(); ...
[ "public ConfigParseException() {\n this(\"Failed to parse configuration file!\");\n }", "public ConfigException() {\n\n\t}", "public void verifyConfig() {\r\n if (getAnchorColumnName() == null)\r\n throw new ConfigurationException(\"The required property 'anchorColumnName' is missing...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assert that the log_date is correct.
public void assertLogDate( Date aExpected ) { MxAssert.assertEquals( "LOG_DT", aExpected, iActual.getDateAt( 1, "LOG_DT" ) ); }
[ "public void testDB_Delivery004() {\n try {\n assertEquals(new Date(System.currentTimeMillis()),delivery.validateDevDate(new Date(System.currentTimeMillis())));\n } catch (DB_DeliveryExceptionHandler e){\n e.printStackTrace();\n fail(\"Exception not expected.\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Left outer join, merge, nullable col. ordered inputs, DESC vs. ASC, NULLS LAST (nulls low vs. nulls high).
@Test public void testMergeLOJNullableBothInputsOrderedDescNullsLastVsAscNullsLast() throws Exception { String query = "SELECT * " + "from ( SELECT key, data " + " FROM cp.`jsoninput/nullableOrdered1.json` " + " ORDER BY 1 DESC NULLS LAST ) t1 " ...
[ "@Test\n public void testLeftJoinWithNullFilterInRightSide() {\n util.verifyRelPlan(\"SELECT * FROM MyTable1 LEFT JOIN MyTable2 ON a1 = a2 WHERE a2 IS NULL\");\n }", "@Test\n public void originalFirstNull(){\n int [] arr1 = null;\n int [] arr2 = {2,1};\n int [] result = progra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
end of method generateSimulatedData
public Individual randomEgo(Context ctxt, ArrayList<Object> priorEgos, String priorSex) throws KinshipSystemException { // Development code only. No translation. // Pick 2 new individuals to be used as Ego: 1 with gender = priorSex to go in the front of the egoBag, // and ano...
[ "private void generateRandomData() {\n generateRandomLatitude(dataGenTaskObjectHolder.getMode(LATITUDE));\n generateRandomLongitude(dataGenTaskObjectHolder.getMode(LONGITUDE));\n generateRandomAltitude(dataGenTaskObjectHolder.getMode(ALTITUDE));\n generateRandomVelocity(dataGenTaskObject...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provide Intent for other activities to open this activity
public static Intent getIntent(Context context) { return new Intent(context, Login.class); }
[ "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n @Override\n public void onClick(View v) {\n\n startActivity(intent);\n }", "@Override\n\tpublic void startActivity(Intent intent, Bundle options) {\n\t\tsuper.startActivity(intent, options);\n\t}", "@Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
opens and loads an image when the browse button is pressed
private void browseButtonAction() { browseJB.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { loadBrowseImage(); } }); }
[ "private void pickImage() {\n\t\ttheImageFile = OpenOrSave.open();\n\t\tif (theImageFile != null)\n\t\t\ttheImagePath.setText(theImageFile.getName());\n\t\tcheckGoButton();\n\t}", "public void onFileOpen() {\r\n\t\tFileDialog fileChooser = new FileDialog(Display.getCurrent()\r\n\t\t\t\t.getActiveShell(), SWT.MULT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: b
public long mo14538b(long j, int i) { C19314d.m69091a((C19305b) this, i, this.f61419c, mo14555h()); if (i <= this.f61418b) { i--; } return super.mo14538b(j, i); }
[ "public abstract T zzs(B b2);", "public void b(ByteOrder bo) {\n/* 72 */ if (this.i != bo) {\n/* 73 */ this.i = bo;\n/* 74 */ this.h = a(bo);\n/* */ } \n/* */ }", "public void doSth(B b){\n\n }", "public abstract void mo14156a(B b, int i, int i2);", "@Override\n\tpublic v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Read number as a choice that will be used to pick menu.
private void chose() { try { System.out.print(">> "); choice = in.nextInt(); in.nextLine(); } catch (InputMismatchException e) { choice = -1; inputWarning(); } }
[ "private int getChoice(){\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(menu);\n System.out.print(\">>\");\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(Sy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onProgressClick(float x, View v) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onNothingSelected(AdapterView<?> arg0) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
room / object tabs
private void initComponents() { JTabbedPane controlPane = new JTabbedPane(); int tabWidth = 960; int tabHeight = 600; dateFormat = new SimpleDateFormat("MM/dd/yyyy"); // Setup Tab with BoxLayout (top to bottom) JPanel setupPanel = initSetupPanel(tabWidth...
[ "public void doTabs()\n { \t\n \ttabSimpleBlocks = new SimpleTab(\"tabSimpleBlocks\"); \t\n \t \n \tif(Settings.enableSeparateTabs)\n \t{\n \ttabSimpleDecorations = new SimpleTab(\"tabSimpleDecorations\");\n \ttabSimpleTools = new SimpleTab(\"tabSimpleTools\");\n \ttabSimpleCombat = new Simpl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
access the player form combo box
@Override public void actionPerformed(ActionEvent e) { Profile profile = (Profile) TheToolBar.getSelection().getSelectedItem(); //remove connection first. try { MiniNetModel.getModel().getConnectionManager().removeConnections(profile.getName()); MiniNetModel.getModel().getProfileManager().removePr...
[ "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n cmbPlayer = new javax.swing.JComboBox<Object>();\n jLabel3 = new javax.swing.JLabel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a column at the end of the table.
public void addColumn(String colName, Class<?> type) { this.cyTable.createColumn(colName, type, false); this.tableModel.addColumnName(colName); int modelIndex = this.tableColumnModel.getColumnCount(); TableColumn tableColumn = new TableColumn(modelIndex); tableColumn.setHeaderValue(this.tableModel.getCo...
[ "public void addCol() {\n try {\n if (this.cols==0) {\n addColAfter(0);\n } else {\n addColAfter(this.cols-1);\n }\n } catch (Exception ignored) {};\n }", "public void insertColumn() {\n\t\tColumn column = new Column(rows,width);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replaces all instances of oldString with newString in line. The count Integer is updated with number of replaces.
public static String replace(String line, String oldString,String newString, int[] count) { if (line == null) { return null; } int i = 0; if ((i = line.indexOf(oldString, i)) >= 0) { int counter = 1; char[] line2 = line.toCharArray(); char[...
[ "public static final String replaceIgnoreCase(String line,\n String oldString,\n String newString,\n int[] count)\n {\n if (line == null)\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Record the variables for the provided query
public void recordVariables(Query q) { synchronized( this ){ Collection<QueryIdentifier> trackOwnerId = recordQueryMap.get(q.getId()); for ( QueryIdentifier id: trackOwnerId ){ TrackingQuery tq = trackQueryBasePoint.get(id); log.trace("Recording \"{}\" for base query {}", q.getParams(), id.g...
[ "public void newQuery(){\n \t\ttriplestoreVariableStart = triplestoreVariableEnd;\n \t\ttriplestoreVariableStart++;\n \t\ttriplestoreVariable = triplestoreVariableEnd;\n \t\ttriplestoreVariable++;\n \t}", "private static Collection<Var> varsOfQuery(Query query) {\n Collection<Var> vars = PatternVars.vars(q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Nashorn extension: String.prototype.trimLeft ( )
@Function(attributes = Attribute.NOT_ENUMERABLE) public static String trimLeft(final Object self) { final String str = checkObjectToString(self); int start = 0; final int end = str.length() - 1; while (start <= end && ScriptRuntime.isJSWhitespace(str.charAt(start))) { ...
[ "public static String ltrim(String source) {\n\t\tif (source == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint from = 0;\n\t\twhile (from < source.length() && isSpace(source.charAt(from))) {\n\t\t\tfrom++;\n\t\t}\n\n\t\treturn source.substring(from);\n\t}", "static String leftTrim(String line) {\n if (line ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method records a passed ball to the catcher's stats.
public void recordPassedBall() { currentCatcherStats().incrementPassedBalls(); recordGameState(); }
[ "public void recordCollision(){\n\t\t\n\t\t//add a hit\n\t\tnumberOfTimesHit++;\n\t\t\n\t\t//recalculate hit difference\n\t\tcalculateHitsDifference();\n\t\t\n\t\t//if hit sufficient times then the ball is destroyed\n\t\tif(numberOfTimesHit>= numberOfHitsTillGone){\n\t\t\t\n\t\t\tdestroyed = true;\n\t\t\t\n\t\t}\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if there is a jump available during this turn
public boolean isJumpPossible(){ return currentTurn.isJumpPossible(); }
[ "public void checkJump() {\n\t\tif (!isDestroy()) {\n\t\t\tif (InputUtility.getKeyTriggered(KeyCode.SPACE) && isJump && djump) {\n\t\t\t\tInputUtility.setKeyTriggered(KeyCode.SPACE, false);\n\t\t\t}\n\t\t\tif (!isJump && InputUtility.getKeyTriggered(KeyCode.SPACE)) {\n\t\t\t\tsetjump(true);\n\t\t\t\tAudioUtility.pl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Overrided from java.util.ListIterator has previous method returns false if no prevItem otherwise return true
@Override public boolean hasPrevious() { return position!=0; }
[ "@Override\n\t\tpublic boolean hasPrevious()\n\t\t{\n\t\t\treturn (nextItem == null && size != 0) || nextItem.prev != null;\n\t\t}", "private boolean hasPrevious(ListElement currentelement) {\r\n\t// TODO Auto-generated method stub\r\n\tListElement previous = currentelement.getPrevious();\r\n\tif (previous ==null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
revise function of AC3 algorithm (arc consistency)
private Set<Integer> revise(Set<Integer> domain1, int var1, Set<Integer> domain2, int var2, ClauseE e, int literal) { Set<Integer> filtered = new LinkedHashSet<Integer>(); if (groundedValues[var1] == -1 && groundedValues[var2] == -1) { for (Integer d1 : domain1) { ...
[ "private int rebalnceDelete(AVLNode node)\n {\n\t int counter = 0; // count the number of demote and rotate\n \t int balanceFactorLeft = 0;\n \t int balanceFactorRight = 0;\n \t if (node != null)\n \t {\n \t\t balanceFactorLeft = node.rank - node.left.rank;\n \t\t balanceFactorRight = node.rank - no...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws the body based on default pen size
public void draw() { StdDraw.setPenColor(this.color); StdDraw.point(this.position[0], this.position[1]); }
[ "public void setPenWidth(float pw) {penWidth = pw; }", "abstract void drawPen(Graphics g, int startX, int startY, int width, int height);", "public void draw(DrawingTool pen)\r\n \r\n {\r\n pen.forward(length); \r\n pen.turnRight(90);\r\n pen.forward(width);\r\n pen.forward(len...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get the node channels
public ArrayList<Channel> getChannels() { return channels; }
[ "List<Channel> getChannels();", "public int getChannels() {\n return info.channels;\n }", "public List<Segment> getChannel() {\n return channels;\n }", "public Collection<Channel> getLiveRFDesignChannels( final AcceleratorNode node );", "public String GetChannels(){\r\n\t\tif (Channels!=...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
URL > CHARACTER_LITERAL | STRING_LITERAL.
final public Token url() throws ParseException { /*@bgen(jjtree) URL */ SimpleNode jjtn000 = new SimpleNode(JJTURL); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);Token oToken; try { if (jj_2_16(2)) { oToken = jj_consume_token(CHARACTER_LITERAL); } else if (jj_2_...
[ "AnyURILiteral getUri();", "@Test\n public void testToLiteral() {\n assertEquals(\"Convert plain\", \"\\\"a\\\" \", sink.toLiteral(\"a\", null, null));\n assertEquals(\"Convert lang\", \"\\\"a\\\"@en \", sink.toLiteral(\"a\", \"en\", null));\n assertEquals(\"Convert no lang\", \"\\\"a\\\" ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new alert dialog.
public AlertDialog(String headerText, String contextText, AlertType alertType) { Alert alert = new Alert(alertType); alert.setContentText(contextText); alert.setTitle(""); alert.setHeaderText(headerText); alert.setContentText(contextText); alert.setResizable(true); alert.getDialogPane().setMinHeight(Re...
[ "public void openDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomAlertDialog);\n View view2 = LayoutInflater.from(this).inflate(R.layout.alert_dialog, null);\n TextView textView = (TextView) view2.findViewById(R.id.Quitprompt);\n\n textView.setText(R...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate short name for a given class.
protected String calculateShortName(Class clazz) { String name = clazz.getName(); int beginIndex = name.lastIndexOf('.'); if (beginIndex > 0) { return name.substring(beginIndex + 1); } else { return name; } }
[ "public static String getShortName(Class<?> clazz) {\n\t\treturn getShortName(getQualifiedName(clazz));\n\t}", "public String getClassNameShort()\n {\n String clName = getClass().getName();\n int dot = clName.lastIndexOf(\".\");\n if (dot > 0)\n clName = clName.substring(dot + 1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
accept token from either query param (recovery) or cookie (account settings)
@POST @Path("pw") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.APPLICATION_JSON) public Response changePassword(@FormParam(OLD) String oldPassword, @FormParam("new") String newPassword, @FormParam(TokenSessionService.COOKIE_NAME) String authToken, @CookieParam(TokenSessionService.COOKI...
[ "public void askForToken(String code);", "public String AuthToken(String token);", "@PostMapping(value = \"/validate\")\n public ResponseEntity<Token> validateToken(@CookieValue(value = \"token\", required = false) String token) {\n if(Tokens.verify(token)){\n return new ResponseEntity<>(Ht...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prints a nodes position tag. The yfile (Visone) tag for a circular position of a node.
private void printNodeLabel(PrintStream PS, String label){ printlnStartEndTag(PS,"y:Geometry",label); }
[ "void printPosition();", "public static void displayPosition() {\n\t\t\n\t\tSystem.out.println(\"x = \" + xpos + \", y = \" + ypos + \", direction = \" + directions[direction]);\n\t}", "public void show () {\n System.out.println(\"Node: [\" + id + \"] (\" + x + \", y: \" + y + \")\");\n }", "@Override\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String getServices() Method getTagMode
public Integer getTagMode() { return this.m_TagMode; }
[ "public String ServiceTag() {\n return AbstractDlcService.serviceTag;\n }", "public boolean getUseTags() {\r\n\treturn useTags;\r\n}", "public String serviceName();", "int getServices();", "private boolean isServiceTaggable(AWSService serviceType) {\r\n try {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public TypeEntree find(String uuid) { return super.find(uuid); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inflates the row layout from xml when needed
@Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == 0) { View itemview = LayoutInflater.from(parent.getContext()) .inflate(R.layout.child_admin_header_listuser, parent, false); return new HeaderViewHolder(i...
[ "public void inflateLayout() {\n View.inflate(getContext(), C4558R.layout.zm_pbx_sms_text_item, this);\n }", "private final void inflateLayout() {\n LayoutInflater inflater = LayoutInflater.from(context);\n this.layout = inflater.inflate(R.layout.sms_dialog_selectnumber, null, false);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
popup a choice list of possible voices to use
private void popupVoiceList() { AlertDialog.Builder builderSingle = new AlertDialog.Builder(ScopeSpeakerActivity.this); //builderSingle.setIcon(R.drawable.ic_launcher); builderSingle.setTitle("Current Voice:" + currentVoice); final ArrayAdapter<String> arrayAdapter = new ArrayAdapter<St...
[ "ArrayList<String> loadChoice() {\n return speechView.loadChoice();\n }", "public void askChoices(){\n\t\tArrayList<String> tempResponses = new ArrayList<String>();\n\t\tfor (int i=responses.size() ; i>0 ; i--){\n\t\t\ttempResponses.add(responses.remove((int)(Math.random()*i)));\n\t\t}\n\t\tresponses=te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Vrati objekt na indexe
public SongModel get(int index) { return queue.get(index); }
[ "@VTID(15)\r\n int index();", "Object getIndex();", "public interface Index {\n\n public class Entry implements Comparable<Entry> {\n public String id;\n public double score;\n public Entry(String id, double score) {\n this.id = id;\n this.score = score;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor for the ObjectEnvironmentGroup.
public ObjectEnvironmentGroup() { this(DEFAULT_NAME); }
[ "public Environment() {\t\t\n\t\tenvParams = new EnvironmentParams();\n\t}", "private Environment() {}", "Environment() {\n }", "public Environment() {\n\n }", "public EntityGroup() {}", "private Environment() {\n\t\t// avoid instantiation\n\t}", "public GcpProjectEnvironmentData() {\n }", "pu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Write the contents of the temp file to a zip file at the proper location.
public String createCachedFile() throws IOException { logInfo("Creating cached file from temp file."); String zipFileName = null; String baseFileName = getFileNamePrefix() + cleanedSampleName() + "_" + formattedNow(); zipFileName = getDirectoryPath() + "/" + baseFileName + ".zip"; ...
[ "@Test\n @Order(1)\n public void zipDirectoryTest() throws IOException {\n System.out.println(\"=== ZIPPING ===\");\n File dir = Files.createTempDirectory(\"\").toFile();\n System.out.println(\"dir: \" + dir.getCanonicalPath());\n if (!dir.exists() && !dir.mkdir()) {\n A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds all the Integers represented by collection to joints.
public boolean addAll(Collection<Integer> c){ return joints.addAll(c); }
[ "public Builder addAllJoints(\n java.lang.Iterable<? extends java.lang.Integer> values) {\n ensureJointsIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, joints_);\n onChanged();\n return this;\n }", "private void addAllInts(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reference to the link: / [1,2,3,4] t1[1, 1, 2, 6] t2[24, 12, 4, 1]
public int[] productExceptSelf2(int[] nums) { int[] result = new int[nums.length]; int[] t1 = new int[nums.length]; int[] t2 = new int[nums.length]; t1[0]=1; t2[nums.length-1]=1; //scan from left to right for(int i=0; i<nums.length-1; i++){ t1[i+1] = nums[i] * t1[i];...
[ "private void transferLinks(Entry<K, V> paramEntry1, Entry<K, V> paramEntry2) {\n/* 236 */ Entry<K, V> entry1 = paramEntry2.before = paramEntry1.before;\n/* 237 */ Entry<K, V> entry2 = paramEntry2.after = paramEntry1.after;\n/* 238 */ if (entry1 == null) {\n/* 239 */ this.head = paramEntry2;\n/* ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public LinkedHashSet<String> getAllColumns() { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column idv_roster_batch_detail.contract_type
public String getContractType() { return contractType; }
[ "public java.lang.String getContractType() {\n return contractType;\n }", "public String saveContractType() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\tString messageLog = \"message_registro_modificar\";\r\n\t\ttry {\r\n\t\t\tif (contractType.getId() != 0) {\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Initialize a new Grid with the specified Tiles
public Grid(boolean[][] tiles){ this.tiles = new Tile[tiles[0].length][tiles.length]; this.location = new Point2D(0, 0); System.out.println(tiles.length + " " + tiles[0].length); double w = Math.sqrt(3) * 50; double h = 2 * 50; for(int y = 0; y < tiles.length; y ++){ System.out.println(); for...
[ "public Tiles(int new_x,int new_y){\n x = new_x;\n y = new_y;\n ID=-1;\n }", "public Grid(int xSize, int ySize) {\n\t\t_xSize = xSize;\n\t\t_ySize = ySize;\n\t\t_tiles = new Tile[xSize][ySize];\n\t\t/* FIXME the grid tiles should be initialized to a default value to\n\t\t * prevent null po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ON CLICK METHODS FOR LETTER QUIZ
public void onClickD(View v) { changeCurrentScore(((LetterQuiz) myFrags[0]).onClickD(v)); }
[ "@Override\n public void getClick() {\n }", "private static void click() {\n\t\t\n\t}", "@Override\n\tpublic void click() {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\n\n\n\n\t}", "@Override\r\n\tpublic void runOnClick(JComponent comp) {\n\t\t\r\n\t}", "@Override\r\n \tpublic vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
static boolean m5731a(Context context) { boolean z = true; if (context == null) { return false; } ContentResolver contentResolver = context.getContentResolver(); if (C1269v.m5740c() < 17) { try { if (System.getInt(contentResolver, "airplane...
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Setter of the ImageOverLayComponent.btnText attribute.
public void setAllBtnText(final SessionContext ctx, final Map<Language,String> value) { setAllLocalizedProperties(ctx,BTNTEXT,value); }
[ "public void setText(String text){\n this.text=text;\n this.textColor=setTextSizeForWidth(getButtonWidth(),text, getButtonHeight());\n //Log.d(\"Button.java\",\"textSize: \"+textColor.getTextSize()+\" buttonWidth: \"+getButtonWidth());\n }", "public void setBtnText(String text) {\n\t\tbtnC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get Scope object list from ScopeDTO List response received from authorization server.
private Map<String, Scope> fromDTOListToScopeListMapping(ScopeDTO[] scopeDTOS) { Map<String, Scope> scopeListMapping = new HashMap<>(); for (ScopeDTO scopeDTO : scopeDTOS) { scopeListMapping.put(scopeDTO.getName(), fromDTOToScope(scopeDTO)); } return scopeListMapping; }
[ "public java.util.List<io.opencannabis.schema.oauth.AuthorizationScope> getScopeList() {\n if (scopeBuilder_ == null) {\n return java.util.Collections.unmodifiableList(scope_);\n } else {\n return scopeBuilder_.getMessageList();\n }\n }", "public java.util.List<? extends io.opencan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add list cell renderer.
private void addListCellRender() { imagePanelList.setCellRenderer(new ListCellRenderer<PreviewImagePanel>() { @Override public Component getListCellRendererComponent(final JList<? extends PreviewImagePanel> list, final PreviewImagePanel value, final int index, final boolean isSelected, final boolean ...
[ "public DefaultListCellRenderer() {\n/* 93 */ setOpaque(true);\n/* 94 */ setBorder(getNoFocusBorder());\n/* 95 */ setName(\"List.cellRenderer\");\n/* */ }", "Component getListCellRendererComponent(\n JList list,\n Object value,\n int index,\n boolean isSelected,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If a value is present, apply the provided mapping function, returning empty if it fails with a runtime exception.
public static <T, U> Optional<U> flatMapThrowable(Optional<T> self, Function<? super T, U> mapper) { try { return self.map(mapper); } catch (RuntimeException e) { return Optional.empty(); } }
[ "default <R> R map(Function<T, R> function) {\n return function.apply(this.get());\n }", "default <T> T computeIfAbsent(String key, Function<String, T> mappingFunction) {\n Map<String, T> properties = getProperties();\n\n return properties.computeIfAbsent(key, mappingFunction);\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
used from WFLY to initiate with already known collection of extensions
ExtensionInvoker(Collection<Class<? extends BuildCompatibleExtension>> extensions) { for (Class<? extends BuildCompatibleExtension> extensionClass : extensions) { SkipIfPortableExtensionPresent skip = extensionClass.getAnnotation(SkipIfPortableExtensionPresent.class); if (skip != null) {...
[ "public abstract SeContainerInitializer addExtensions(Class<? extends Extension>... extensions);", "static public <T extends java.lang.Object> scala.collection.Seq<T> loadExtensions (java.lang.Class<T> extClass, scala.collection.Seq<java.lang.String> classes, org.apache.spark.SparkConf conf) { throw new RuntimeE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
readAgent Read an agent's description from a file, but find itself the universe the agent was into
public static IAgent readAgent(String fichier) { File fichierALire=new File(fichier+".agt"); ObjectInputStream entree; LoneAgent resultat=null; try{ entree=new ObjectInputStream(new FileInputStream(fichierALire)); resultat=(LoneAgent)entree.readObject(); entree.close(); } catch(Exception e){ S...
[ "public void readTaskFile(String fileName){\r\n\r\n BufferedReader instream = null;\r\n boolean done = false;\r\n String line = null;\r\n StringTokenizer t;\r\n Vector agnts = new Vector();\r\n MaxCOPConstraint currentConstraint = null;\r\n int temp = 0;\r\n\r\n Utility.Dprint(\" Reading co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the event where the user is trying to zoom in on the calendar
@Subscribe private void handleZoomInEvent(ZoomInEvent event) { logger.info(LogsCenter.getEventHandlingLogMessage(event)); zoomInEventRaised = true; }
[ "@Override\n\tpublic void zoom(boolean zoomin) {\n\t\t\n\t}", "public void zoomIn() {\n\t\tgetZoomManager().zoomIn();\n\t}", "public abstract void zoom(final ID sender);", "public void zoomIn() {\n\t\t\tm_zoom += m_zoomPercentage;\n\t\t}", "public abstract void performZoom(final ID sender);", "void onZoom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds the output file if this exists.
private void addOutputFileArgument(File outputFile) { if (outputFile != null) { addArgument(outputFile.toString()); } }
[ "boolean setOutputPath(File outputPath);", "protected void ensureOutputPathExists() {\n File dir = new File(outputPath);\n //LOGGER.info(\"creating directory \" + dir.getPath());\n dir.mkdirs();\n }", "protected abstract void createNewOutput(String newFilename) throws IOException;", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the fortress level.
public String getFortress() { return fortress; }
[ "public Integer getFlightLevel() {\n return location.getFlightLevel();\n }", "public int getLevel() {\n if ((Flags & PIN_NEGATIVE) == 0) {\n return Level;\n } else {\n if (Level == 0) {\n return 5;\n } else {\n return 0;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
menus imediatly hides all menus
public void cancelMenus() { for (Hideable h : menus) { h.cancel(); } }
[ "public void showAllMenuItem() {\n hideItemList.clear();\n }", "private void setMenuItemsVisible(){\n setMenuItemsVisible(!selectionMode);\n }", "@Override\r\n\t\t\t\tpublic void handle(ActionEvent event) {\r\n\t\t\t\t\thideAll();\r\n\t\t\t\t\tgetChildren().get(MENUMAIN).setVisible(true);\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ System.out.println("\n\n"); System.out.println("Etat du stop_action = " + dash.isStop_action()); System.out.println("Etat du stop_action_shoot = " + dash.isStop_action_shoot()); System.out.println("Etat du shoot = " + dash.isShoot()); System.out.println("Etat du corner = " + dash.isCorner()); System.out.println("Etat...
public void matchProcess(Dashboard dash, ChronometerGUI chronometergui) { begin = dash.isBegin(); players1 = dash.getTeam1(); players2 = dash.getTeam2(); match=new Match(players1,players2,0,0,0,dash.getBallon()); if (begin == false) { // Temps(players1, players2); match = dash.getMatch(); ...
[ "public static void test()\n {\n System.out.print(\" armUp:\"+armUpButton);\n System.out.print(\"armDown\"+armDnButton);\n System.out.print(\" Tilt:\" + armTiltSwitch);\n System.out.print(\" TubeDown:\" + spinTubeDownButton);\n System.out.print(\" TubeUp:\" + spinTubeUpButton);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint64 order_id = 1 [(.gogoproto.customname) = "ID", (.gogoproto.moretags) = "yaml:&92;"order_id&92;""];
@java.lang.Override public long getOrderId() { return orderId_; }
[ "private void setOrderIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n orderId_ = value.toStringUtf8();\n }", "public java.lang.String getOrderid() {\n java.lang.Object ref = orderid_;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets streamer stage name.
public String name();
[ "@SuppressWarnings( \"unused\" )\n public String getStageName() {\n return stageName;\n }", "protected abstract String getStageName();", "public String getStageTitle()\r\n\t{\r\n\t\treturn m_info.getStageTitle();\r\n\t}", "public abstract String getDisplayedStageName();", "public String getStage() {ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new location factory.
private LocationFactory() { throw new UnsupportedOperationException(); }
[ "public MyLocation() {\n }", "public Location() {\n }", "public LocationViewModelFactory(String bookID) {\n this.bookID = bookID;\n }", "public Location()\n {\n }", "public static BrowserLocation create()\n {\n return new Arez_BrowserLocation();\n }", "public Location() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public List<TComputroom> findByCondition(TComputroom tc) { return computroomDao.findByCondition(tc); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: method to calculate discounts application to transaction convert to string.
public String toString() { StringBuffer buff = new StringBuffer(); buff.append("<discountPolicies=" + discountPolicies + ">"); buff.append("<discountDefinitionDataService=" + discountDefinitionDataService + ">"); return buff.toString(); }
[ "public String getTransactionSummary() {\n final StringBuilder summary = new StringBuilder();\n\n adjPaymentEdges.entrySet().stream().forEach(e -> {\n e.getValue().entrySet().stream().filter(n -> n.getValue() > 0.0d)\n .forEach(n -> summary.append(String.format(\"%s pays Rs. %.2f to %s, \", n.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Min Id' attribute.
int getMinId();
[ "public int getMinId() {\n return minId;\n }", "final public int getMin() {\n\t\treturn min;\n\t}", "public int getMinID() {\r\n\treturn this.workers.getMinID();\r\n }", "public M csrIdMin(Object min){this.put(\"csrIdMin\", min);return this;}", "public int getMin() {\n return min;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
decreases the heading by amt (turns right by amt degrees)
public void turnRight (double amt){ heading -= amt; }
[ "private double fixHeading(int hd) { return (Math.toRadians(90-hd)); }", "public void left() { this.angle -= TURN_AMOUNT; }", "public void changeHeading() {\n Random rand = new Random();\n int change = rand.nextInt(2);\n switch (change) {\n case 0:\n if (this.getHe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance.
private DensityHeatmap(StatisticsContingencyTable table){ this.table = table; }
[ "public Create() {\n\t\t\tsuper();\n\t\t}", "T createNewInstance();", "public void create() { }", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject createInstance() {\n\t\tJSONObject json = new JSONObject();\n\t\ttry {\n\t\t\tjson = makeRequest(URL + \"/instance\", \"POST\");\n\t\t} catch (Excepti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the 'root' Spring application context
@Override public void onStartup(ServletContext servletContext) { AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext(); root.register(WebMvcConfig.class, SecurityConfig.class, JpaConfig.class); // Manage the lifecycle of the root application context ...
[ "public StaticApplicationContext createParentApplicationContext() throws CIAOConfigurationException {\r\n\t\tfinal StaticApplicationContext parentContext = new StaticApplicationContext();\r\n\t\t\r\n\t\tregisterEnvironmentPropertySource(parentContext);\r\n\t\tregisterPropertiesBeans(parentContext);\r\n\t\t\r\n\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); String un=request.getParameter("username"); String pw=request.getParamet...
[ "@Override\n\tpublic void handlePost(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n\n\n }", "@Override\n public void post(String path) {\n \n }", "@Override\r\n\tpub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
prepare object recovered from serialization
@Override public void wakeup(){ // wakeup // wakeup extensions if (this.mobileExtension!=null) this.mobileExtension.wakeup(); }
[ "void prepareSerialization() throws SerializerWriteException;", "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n \n }", "private void readObject(ObjectInputStream stream) throws IOException,\n\t\t\tClassNotFoundException {\n\t\tstream.defaultReadObj...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: protected
public void initShaderHandles() { super.initShaderHandles(); this.mInitHandler = GLES20.glGetUniformLocation(this.mProgramHandle, this.UNIFORM_ITIME); this.mAmountHandler = GLES20.glGetUniformLocation(this.mProgramHandle, this.UNIFORM_AMOUNT); this.mWidth = GLES20.glGetUniformLocation(th...
[ "@Override\n }", "protected void method_5557() {}", "@Override\n public void extornar() {\n \n }", "@Override\r\n public void publicando() {\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "pro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XTryCatchFinallyExpression__Group__1" $ANTLR start "rule__XTryCatchFinallyExpression__Group__1__Impl" InternalFormat.g:21135:1: rule__XTryCatchFinallyExpression__Group__1__Impl : ( 'try' ) ;
public final void rule__XTryCatchFinallyExpression__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalFormat.g:21139:1: ( ( 'try' ) ) // InternalFormat.g:21140:1: ( 'try' ) { // Interna...
[ "public final void rule__XTryCatchFinallyExpression__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalScripting.g:12241:1: ( ( 'try' ) )\n // InternalScripting.g:12242:1: ( 'try' )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }