query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/ Gets the current date in DDMMYYYY format. | public String getCurrentDate() {
Calendar c = Calendar.getInstance();
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
return df.format(c.getTime());
} | [
"public String getNowAsMMddyyyy() {\n \tjava.util.Date rightNow = Calendar.getInstance().getTime();\n \tSimpleDateFormat dateFormat = new SimpleDateFormat(\"MMddyyyy\");\n \treturn dateFormat.format(rightNow);\n\t}",
"public String getCurrentDate() {\n SimpleDateFormat sf = new SimpleD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a terrainElement for the given terrain and append it to the specified tileElement | private void appendTerrain (Terrain terrain, Element tileElement) {
Element terrainElement = myXmlDocument.createElement(TERRAIN);
terrainElement.setAttribute(ID, terrain.getID());
appendStat(terrain.getStat(MAGNITUDE), terrainElement);
tileElement.appendChild(terrainElement);
} | [
"public void addTerrain(GameTerrain gameTerrain){\r\n\t\t\tgameTerrains.add(gameTerrain);\r\n\t\t}",
"public void addTile(Tile tile) {\n }",
"private void generateTerrain(){\n for(int i = 0; i < height/80 +1; i++){\n for(int j = 0; j < width/80 +1; j++){\n \tterrains[i][j] = 0;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | private void initView() {
countTimer = new CountTimer(60000, 1000);
bills_bg_img = (ImageView) findViewById(R.id.back);
phone_number = (EditText) findViewById(R.id.phone_number);
password = (EditText) findViewById(R.id.password);
phone_number.setSelection(phone_number.length());
reset_password = (EditText) ... | [
"@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"
]
]
}
} |
After async call is completed, triggers listener with response Precondition: valid API response received | protected void onPostExecute(ArrayList<Object> objResponse){
Log.d("thingy",(String)objResponse.get(1));
listener.ResponseReceived((String)objResponse.get(0), objResponse.get(1));
} | [
"public void testVerifyEndpointResponse() {\n final CountDownLatch signal = new CountDownLatch(1);//help to wait for AsyncTask result\n final Long startTime = new Date().getTime();\n\n new EndpointsAsyncTask().execute(new EndpointsAsyncTask.IEndpointsCallback() {\n @Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formation de l'adresse Ip du SR | private AdresseIp formationIpDesSR(int nb, int nbBitsEmpruntes) throws ValeurHorsDePorteeException{
String ipBin = ip.formeBinaire.substring(0, masque.nbBitsA1DansLeMasque()) + intToBinSurNOctets(nb, nbBitsEmpruntes);
int nb0AAjouter = 32 - ipBin.length();
for(int i=0; i<nb0AAjouter; i++){ipBin ... | [
"public abstract InetAddress getIpAdress();",
"public abstract String getIpAddr();",
"public String myIpAddressEx();",
"public String getIpAdress() {\n return ipAdress;\n }",
"public void saisirAdresse(){\n\t\tSystem.out.println(\"Saisir la nouvelle adresse du client : \");\n\t\tthis.adrClient = L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/========================================================== Abstract Methods ========================================================= | public abstract double getArea(); | [
"@Override\n }",
"@Override\n public void extornar() {\n \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}",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\tpublic void kayit1() {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an adapter for the target. | @Override
public Adapter createAdapter(Notifier target)
{
return modelSwitch.doSwitch((EObject)target);
} | [
"@Override\n public Adapter createAdapter(final Notifier target) {\n return modelSwitch.doSwitch((EObject) target);\n }",
"protected abstract T getAdapter();",
"public JsonService addAdapter(String name, Class target, Object mixin) throws Exception;",
"public IModelToProviderAdapter(IModel adapte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructs an instance. | public FragmentItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
supportedTypes.add(IItemLabelProvider.class);
supportedTypes.add(IItemPropertySource.class);
... | [
"private T newInstance() {\r\n T result;\r\n try {\r\n result = constructor.newInstance();\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n }\r\n if (isConfigurable && configuration != null) {\r\n ((Configurable) result).setConf(c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Names This function is run when the robot is first started up and should be used for any initialization code. | @Override
public void robotInit() {
chooser.addDefault("Default Auto", defaultAuto);
chooser.addObject("My Auto", customAuto);
SmartDashboard.putData("Auto choices", chooser);
leftBR = new VictorSP(0);
leftM3 = new VictorSP(4);
rightBR = new VictorSP(2);
rightM3 = new VictorSP(3);
intake = new Victor... | [
"@Override\n public void robotInit() {\n DriveTrain.getInstance();\n TeleOp.getInstance();\n Climber.getInstance();\n Intake.getInstance();\n Shooter.getInstance();\n Diagnostics.getInstance();\n LEDs.getInstance();\n Initializations.getInstance();\n Initializations.init();\n\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
flush out any residual data and reset the buffer state | public int flush(char[] output, int outStart, int outEnd)
throws MalformedInputException {
if (state != G0) {
reset();
badInputLength = 0;
throw new MalformedInputException();
}
reset();
return 0;
} | [
"public void flush() { // TODO cannot clear buffer while in use\r\n\t\t\tif(tmpBuffer != null) {\r\n\t\t\t\tsynchronized (tmpBuffer) {\r\n\t\t\t\t\ttmpBuffer.clear();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public void flush() {\n in = new ByteArrayInputStream(out.toByteArray());\n clearBuffer()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'eventId' field has been set. | public boolean hasEventId() {
return fieldSetFlags()[13];
} | [
"public boolean hasEventId() {\n return result.hasEventId();\n }",
"public void eventIdInvalid() {\n System.out.println(\"---------------------------------------------------------------------------------\"+\n \"\\n\"+\"This event id is invalid, please enter again.\");\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements the business logic for processing the incoming request. Retrieves the list of Digital Run tracks available for payment generation and binds it to request to make accessible to subseuquent view. | protected void businessProcessing() throws TCWebException {
try {
ResultSetContainer tracks = getAllTracks();
getRequest().setAttribute("tracks" , tracks);
setNextPage(INTERNAL_VIEW_GENERATE_DR_PAYMENTS);
setIsNextPageInContext(true);
} catch (Exception e)... | [
"@Override\n protected void processRequest() throws Exception {\n\n FormProcessor fp = new FormProcessor(request);\n // the fileName contains any subject id and study unique protocol id;\n // see: chooseDownloadFormat.jsp\n String fileName = request.getParameter(\"fileName\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Valor' attribute. If the meaning of the 'Valor' attribute isn't clear, there really should be more of a description here... | double getValor(); | [
"public String getValor() {\r\n\t\treturn this.valor;\r\n\t}",
"public String getValor()\n {\n return valor;\n }",
"public double getValor() {\r\n return valor;\r\n }",
"public Double getValor() {\n return valor;\n }",
"public double getValor(){\n return this.valor;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for objects of class PrikazDej | public PrikazDej(HerniPlan plan) {
this.plan = plan;
} | [
"public Prova() {\r\n }",
"public Produto() {\r\n\t}",
"public Pepe() {\n }",
"public Pintor(String pnombre, String pseudonimo, String pnacionalidad,String ppaisNacimiento, String pciudadNacimiento,\n \t\t String pfechaNacimiento, String pfechaFallecimiento, int pidMaestro, int pidEscuela) {\n \t\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
=========== FUNGSI UMUM ============= | public double generateNilaiPosisiHari(){
double hasil = 0;
hasil = 1 + Math.random()*(5);
if(hasil < 1 || hasil >= 6){
generateNilaiPosisiHari();
}
return hasil;
} | [
"protected double umfang() {\n\t\tumfang = 2*einheit1+2*einheit2;\r\n\t\treturn umfang;\r\n\t}",
"public float calculerIGR(){\nreturn calculeIgr.calculerIGR(this.salaireBrutMensuel);\n}",
"float getGENUL33();",
"static int luasPersegi(int sisi){\r\n return sisi*sisi;\r\n }",
"public int uguale(Lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
You need to close the resultSet | private void close() {
try {
if (resultSet != null) {
resultSet.close();
}
if (statement != null) {
statement.close();
}
if (connect != null) {
connect.close();
}
if (preparedStatement != null) {
preparedStatement.close();
}
} catch (Exception e) {
}
} | [
"private void close() {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n if (statement != null) {\n statement.close();\n }\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public String getURL() {
return "Url:";
} | [
"@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"
]
]
}
} |
Sets the typeReference value for this VAppPropertyInfo. | public void setTypeReference(java.lang.String typeReference) {
this.typeReference = typeReference;
} | [
"public void setRefType(RefType refType) {\n this.refType = refType;\n }",
"public void setReferencedType(short refType) {\n\t\treferencedType = refType;\n\t}",
"public Builder setReferenceType(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Steven Chambers on 10/24/2015. | public interface IngredientRepository
{
void addIngredientToCollection(IIngredient ingredient);
void removeIngredientFromCollection(IIngredient ingredient);
List<IIngredient> getCollectionAsList();
Stream<IIngredient> getCollectionAsStream();
void saveChanges();
void refreshData();
} | [
"@Override\n public void extornar() {\n \n }",
"private static void EX5() {\n\t\t\r\n\t}",
"protected void method_5557() {}",
"@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 }",
"public void mo28221a() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default freeResources is generated. $Section=DefaultFreeResourcesJavadoc$ID=40F6C2940000$Preserve=no Default freeResources. $Section=DefaultFreeResourcesJavadoc$ID=40F6C2940000$Preserve=no | public void freeResources() {
//$Section=DefaultFreeResources$ID=40F6C2940000$Preserve=yes
iScript = null;
iSymbolTable = null;
iOutputManager = null;
iPropertyHelper = null;
iLog = null;
//$Section=DefaultFreeResources$ID=40F6C2940000$Preserve=no
} | [
"public void freeResources() {\n//$Section=DefaultFreeResources$ID=417A49EE01E4$Preserve=yes\n//$Section=DefaultFreeResources$ID=417A49EE01E4$Preserve=no\n }",
"@Override\r\n public void markFree(int resourceId) {\n }",
"protected void setFree() {\n isFree = true;\n }",
"public void updateResourc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the outstanding amount of resources. (Which are needed in order to finish the process.) | int[] getPendingRes(); | [
"int getAllocatedResourcesCount();",
"@Override\n public int getNumWaiters() {\n if (getBlockWhenExhausted()) {\n return idleObjects.getTakeQueueLength();\n }\n return 0;\n }",
"public int numOutstandingRequests() {\n return outstandingFetches.size() + outstandingRpcs.si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Is it necessary to send updated info to front? | public UserDTO changeBannedStatus(String username, boolean banned) {
User user = usersClient.changeBanStatus(username, banned);
List<Group> foundedGroups = groupsClient.getFoundedGroups(username);
List<Group> joinedGroups = groupsClient.getJoinedGroups(username);
List<Event> organizedEve... | [
"@Override\r\n\tpublic void updateInfo() {\n\t\t\r\n\t}",
"@Override\n public void updateInfo() {\n\n }",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"oberser A receives nofication\");\r\n\t}",
"public void sendRenderingInfoToClient();",
"private void updateInfo() {\n update... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Nome do emissor string sender = 1; | java.lang.String getSender(); | [
"public String askForPlayerName(int playerNumber);",
"public String namePlayer(int i) {\n i += 1;\n System.out.println(\"Player number \" + i + \" enter your name\");\n return clavier.nextLine();\n }",
"public static void namefuction() {\n String name = JOptionPane.showInputDialog... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Procesa el evento del boton "aceptar" de la interfaz alta profesor | private void fixAcceptButtonListener() {
acceptButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
Personal profesor = null;
boolean correct = true;
String messageError = "";
if(!camposVacios() && camposNumCorrectos()){
i... | [
"public void procesarEvento() {\n\t\t\t\n\t\t\tInteger poscur= (Integer)this.getSesion().getAttribute(\"posCurso\");\n\t\t\tListaObjetoBean\tlistacurso=(ListaObjetoBean)this.getSesion().getAttribute(\"listacurso\");\n\t\t\tint posc= poscur.intValue();\n\t\t\tObjetoBean curso=(ObjetoBean)listacurso.dameObjeto(posc);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check that the activity is still around since the decoding task started. | @Override
public void onBitmapDecoded(Bitmap pageBitmap) {
if (getActivity() == null) {
return;
}
// Some of these may be null depending on if the Fragment is paused, stopped,
... | [
"boolean isWaitingActivityAppear() {\n return !mIsFinished && (mInfo == null || mAppearEmptyTimeout != null);\n }",
"public void hasNoActivity(){\n\t\t\tisComposing = false;\n\t\t}",
"public boolean hasActivity() {\n return ((bitField0_ & 0x00000040) != 0);\n }",
"protected boolean hasDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string cdn_address = 3; | com.google.protobuf.ByteString
getCdnAddressBytes(); | [
"Sdn createSdn();",
"private String buildProvisioningAddress() {\n String mnc = String.format(Locale.US, \"%03d\", mRcsSettings.getMobileNetworkCode());\n String mcc = String.format(Locale.US, \"%03d\", mRcsSettings.getMobileCountryCode());\n return \"config.rcs.mnc\" + mnc + \".mcc\" + mcc +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inbound handler configurations. Must have at least one item. repeated .v2ray.core.InboundHandlerConfig inbound = 1; | public com.v2ray.core.InboundHandlerConfig.Builder addInboundBuilder(
int index) {
return getInboundFieldBuilder().addBuilder(
index, com.v2ray.core.InboundHandlerConfig.getDefaultInstance());
} | [
"@Override\r\n\tpublic void configHandler(Handlers arg0) {\n\r\n\t}",
"protected SimpleChannelInboundHandler(Class<? extends I> inboundMessageType) {\n/* 68 */ this(inboundMessageType, true);\n/* */ }",
"@Bean\n IntegrationFlow route(MessageHandlerClient client) {\n return f -> f\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds value x or o to board in array | public void addtoBoardUser(int xoro) {
boardArray[xoro] = xoroUser;
} | [
"public void addMove(int row, int col) {\n\n if (counter % 2 == 0) { //even 0,2,4,6,8}\n board[row][col] = \"X\";\n } else {//Odd 1,3,5,7\n board[row][col] = \"O\";\n }\n }",
"private void board(int x, int y, int status) {\n board[y][x] = status;\n }",
"vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a tree of semantic concepts | public static final Concept createConceptTree(final int numConcepts) {
final Concept c;
int i;
i = computeChildCount(numConcepts);
c = new Concept(null, i > 0);
if (i > 0) {
fillIn(c, i, numConcepts - i);
Utils.invokeGC();
}
// if (!(new File("e:\\x.xml").exists())... | [
"private static void createSomeConceptTypesAndInstances(){\n ResourceType<String> name = graknGraph.putResourceType(\"name\", ResourceType.DataType.STRING);\n //Create a concept type to represent people\n EntityType person = graknGraph.putEntityType(\"person\");\n person.hasResource(name... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
void display() {
System.out.println("Look like a mallard");
} | [
"@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"
]
]
}
} |
Vedo se la app ha i permessi di Archiviazione e, in caso positivo, avvio Camera_Gallery_Activity con una variabile ausiliaria negli extra (mi serve per uno switch case: "activity": 0 serve per marcare l'azione di Pick_Image nell'altra activity) | public void gallery(View view)
{
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},MY_PERMISSIONS_REQUEST_WRITE_EXTERNAL_... | [
"@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);//\n startActivityForResult(Intent.createChooser(intent, \"Selecionar foto grafia del perrito... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method adds a listener that needs to be notified if this task is cancelled. | public final void addListener(CancellationListener listener) {
synchronized (this) {
if (this.isCancelled == false) {
listeners.add(listener);
}
}
if (isCancelled) {
listener.onCancelled();
}
} | [
"@Override\n protected void onCancelled() {\n if (this.mTaskListener != null) {\n mError = new InterruptedException(\"AsyncTask cancelled\");\n this.mTaskListener.finishedTask(null, mError);\n }\n }",
"public void onCancelled() {\n super.onCancelled();\n thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A directed relationship between two value expression nodes | public interface ExpressionRelBI extends ExpressionComponentBI {
/**
*
* @return the origin of the relationship
*/
ExpressionNodeBI<?> getOrigin();
/**
*
* @return a concept representing the type of the relationship
*/
ConceptVersionBI getType();
/**
*
* @re... | [
"public abstract Object nodeValue();",
"public interface AndNode extends Node\n{\n}",
"private ASTNODE relationExpression() {\n ASTNODE relationExpressionAstNode = new ASTNODE();\n relationExpressionAstNode.setAstNodeType(ASTNODE_TYPE.RelationExpression);\n relationExpressionAstNode.setVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onAttach(Activity activity) {
super.onAttach(activity);
checkToReturnCallerApp();
} | [
"@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"
]
]
}
} |
Returns a list of evaluated cases to the client | @Override
public List<Case> getEvaluatetList() throws IOException, ClassNotFoundException {
return client.getEvaluatetList();
} | [
"public List getSomeCases() {\n return getCases();\n }",
"private List<TestCase> getTestCases() {\n return this.testCases;\n }",
"private List<Stmt.Case> parseSwitchCases(Context context) {\r\n\t\tArrayList<Stmt.Case> cases = new ArrayList<Stmt.Case>();\r\n\t\tHashSet<Object> values = new HashSet<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When searching by director, the movies should be sorted into separate data structures by MPAA rating. | List<DVD> findAllMoviesByDirector(String Director)
throws LiberaryDaoException; | [
"public void listMovies() {\n this.directorMovies.clear();\r\n //populate with new entries\r\n try {\r\n this.directorMovies = (ArrayList<String>) findDirectorMovies(selectedDirector);\r\n } catch (IOException_Exception ex) {\r\n Logger.getLogger(ActorRetriever.clas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Rename and change types and number of parameters | public static DriverProfileFragment newInstance(String param1, String param2) {
DriverProfileFragment fragment = new DriverProfileFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
r... | [
"protected void method_5557() {}",
"@Override\n }",
"@Override\n\tpublic void use(byte[] parameters) {\n\t\t\n\t}",
"public abstract String processParameters();",
"@Override\n public void extornar() {\n \n }",
"@Override\n\tpublic int getNumParameters() {\n return 2;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether there really are any resources left. | public boolean reallyHasNext()
{
return index < resources.size();
} | [
"public boolean canTakeResource() \n {\n return (m_resources.size() < m_members.size());\n }",
"public boolean isEmpty() {\n\t\t// Proto.println(Proto.getId(this) + \".isEmpty()\");\n\t\treturn this.resources.isEmpty();\n\t}",
"public boolean isResourceReadyToLaunchs() {\r\n return !readyToL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ """ Prints the chars arg0 arg1 arg2 arg3 arg4 arg5 arg6 arg7 arg8 arg9 arg10 arg11 arg12 arg13 arg14 arg15 arg16 arg17 Args: arg0 (char): char to be printed. arg1 (char): char to be printed. arg2 (char): char to be printed. arg3 (char): char to be printed. arg4 (char): char to be printed. arg5 (char): char to be prin... | public static void print(
char arg0,
char arg1,
char arg2,
char arg3,
char arg4,
char arg5,
char arg6,
char arg7,
char arg8,
char arg9,
char arg10,
char arg11,
char arg12,
char arg13,
char arg14,
char arg15,
char arg16,
char arg17
) {
System.out.print(arg0) ;
S... | [
"public static void main(String[] args)\n\t{\n//\t\tprintString(27);\n//\t\tprintString(51);\n//\t\tprintString(52);\n//\t\tprintString(80);\n//\t\tprintString(676);\n//\t\tprintString(702);\n\t\tprintString(705);\n\t}",
"public static void print(String arg0) {\n System.out.println(arg0);\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ ============================================================ Helper methods ============================================================ | private static String[] getNames(String prefix, int count) {
String[] names = new String[count];
for(int i=0;i<count;i++) {
names[i] = prefix + i;
}
return names;
} | [
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\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\t\tprotected void swop() {\n\n\t\t}",
"void mo37715E_()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to insert element in bt | static void insert(Node temp,int key)
{
if(temp==null){
root=new Node(key);
return;
}
Queue<Node> q=new LinkedList<Node>();
q.add(temp);
System.out.println(temp.key);
while (!q.isEmpty()){
temp=q.peek();
q.remove();
... | [
"public void insert(Object theElement);",
"public void insert(Object elemento);",
"private static void insert() {\n\t\t\n\t}",
"public void insert(Widget w, int beforeIndex) { \n\t\tsuper.insert(w, getElement(), beforeIndex, true); \n\t}",
"void insert(int position, int element);",
"void insertChildElemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check for user and read authorization on table | @RequestMapping(value = "/selectWorker", method = RequestMethod.POST)
public ModelAndView selectWorkerPost(HttpServletRequest request) throws IOException {
HttpSession session = request.getSession(true);
String username = (String) session.getAttribute(Labels.USERNAME);
if (Utils.emptyStr(username)) return new... | [
"void checkUserRead ( NsaApiKey user ) throws AccessDeniedException;",
"@Override\n public boolean checkAccess(User user) {\n return true;\n }",
"private Access authorizationCheck(final HttpServletRequest req, Action action)\n {\n return IndexTaskUtils.datasourceAuthorizationCheck(req, actio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Required. The parent resource whose sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" | public java.lang.String getParent() {
return parent;
} | [
"interface WithParentResource {\n /**\n * Specifies resourceGroupName, workspaceName, ruleId.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Solves the n queens problem | private void solveQueensProblem(final boolean[][] array, int x, int y, final boolean set, int queensCount) {
array[y][x] = set;
// queen could be attacked
if (set && !checkConsistency(array, x, y)) {
return;
}
// set the queen
if (set) {
queensCoun... | [
"static int queensAttack(int n, int k, int r_q, int c_q, int[][] obstacles) {\n int count = 0;\n //construct obstacles\n Set<String> obsSet = new HashSet<>();\n if (obstacles != null && obstacles.length > 0) {\n for (int i = 0; i < obstacles.length; i++) {\n obs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
handle creation of a new contact | private void processCreateContact() {
// create the intent
Intent editItemIntent = new Intent(this, AddressbookEntryActivity.class);
startActivityForResult(editItemIntent, REQUEST_CREATE_ENTRY);
} | [
"private void newContact() {\n\t\trequestNewContactDetails();\n\t\t\t\t\n\t\ttry {\t\n\t\t\t// create new contact\n//\t\t\tContact contact = new Contact(firstname, lastname, phone);\n\t\t\tJSONObject contact = new JSONObject();\n\t\t\tcontact.put(\"firstname\", firstname);\n\t\t\tcontact.put(\"lastname\", lastname)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a given state is valid. | public void isValid(pathserver.Pathserver.State request,
io.grpc.stub.StreamObserver<com.google.protobuf.BoolValue> responseObserver) {
asyncUnimplementedUnaryCall(getIsValidMethod(), responseObserver);
} | [
"public boolean isValid(){\r\n\t\treturn state;\r\n\t}",
"public boolean validState(int p) {\n return (p >= 0 && p < numberOfStates);\n }",
"public static boolean isStateValid(String[] state) {\n List<String> usedNodes = new ArrayList<>();\n List<String> usedConnections = new ArrayList<>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Reversing the letters for hi | @Test
public void TestcountHi8() {
assertEquals(1, Recursion.countHi("ihih"));
} | [
"public static void main(String[] args) {\n\r\n\t\tString str=\"Welcome\";\r\n\t\tchar ch[]=str.toCharArray(); \r\n\t\tString reverse=\"\";\r\n\t\tfor(int i=ch.length-1; i>=0; i--)\r\n\t\t{\r\n\t\t\treverse=reverse+ch[i];\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"The Reversed String is:\"+\"\"+revers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the contents of the file in a byte array | public static byte[] getBytesFromFile(File file) throws IOException {
BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
long length = file.length();
// Create the byte array to hold the data
byte[] bytes = new byte[(int) length];
// Read in the bytes
... | [
"@Override\n\tpublic byte[] getFileContent() throws IOException {\n\t\treturn FileUtil.readBytes(file);\n\t}",
"protected static byte[] getFileByteContent(File file) throws IOException {\n \t\tInputStream stream = null;\n \t\ttry {\n \t\t\tstream = new BufferedInputStream(new FileInputStream(file));\n \t\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lets me peek at the top of the stack to evaluate and compare it. | public String peek() {
if(top==null) {
}
else;
return top.key_val;
} | [
"public void testPeek()\r\n {\r\n assertEquals(\"test2\", lstack.peek());\r\n }",
"public static boolean peek1()\n\t{\n\t\t\treturn stack(top1);\n\t}",
"private static boolean testPeek1() throws EmptyStackException {\n MazeRunnerStack testStack= new MazeRunnerStack();\n Position item1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Incrementa la cantidad de productos en un detalle de transaccion. | public void incrementarCantidad(float incremento) {
cantidad += incremento;
this.cantidad = (float)MathUtil.roundDouble(this.cantidad);
//ACTUALIZACION BECO: 06/08/2008
this.cantidadCambiada = true;
this.variacion = incremento;
} | [
"public void incProductCount()\n {\n ProductCount++;\n }",
"public void increaseQuantity()\n\t{\n\t\tthis.quantity=this.quantity+1;\n\t}",
"public void incrementar()\n {\n this.contador++;\n dibujar();\n }",
"@FXML\n private void increment(MouseEvent event) {\n quantityOfPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the transaction that operations are performed upon. | protected EntityTransaction getTransaction()
{
return entityTransaction;
} | [
"@java.lang.Override\n public long getTransaction() {\n return transaction_;\n }",
"com.nicktate.storm.TransactionProto.Transaction getTransaction();",
"public Transaction getTransaction() {\n return getEntity();\n }",
"public final native Transaction transaction() /*-{\n\t\treturn ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decreases the occupancy of the given session on the Main server. | void decreaseSessionOccupancy(IGameServerForMainServer gameServer, String roomName) throws RemoteException; | [
"public void removeSession() {\n createSession(-1);\n }",
"public void sessionDestroyed(HttpSessionEvent se) {\n userNumber--;\n se.getSession().getServletContext().setAttribute(\"count\",userNumber);\n }",
"private void removeSession()\n\t{\n\n\t\t\tSystem.out.println(\"@MainAppContr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if prepRelation has been called | public boolean isRelationPrepared(String relation) {
return terms.get(relation) != null;
} | [
"@Override\r\n\tpublic void doPrepare() {\n\t\t\r\n\t}",
"protected Relation transformInitialRelationWithoutCheck(Relation r) {\n if (generateDebugInfo) {\n System.out.println(\"LazyPropagationID: transformInitialRelationWithoutCheck ----- BEGIN\");\n System.out.println(\"LazyPropagationID: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience function for add(). Returns the result of adding (pixelwise) two images together. Does not modify either argument. Returns a new image which is the sum of the two arguments. | public static PGMImage applyAdd(PGMImage a, PGMImage b) {
return new PGMImage(a.getWhiteValue(), PGMTransform.add(a.getPixels(), b.getPixels(), a.getWhiteValue()));
} | [
"private void add(BufferedImage image2) {\n\t\t\n\t}",
"public static void add(GrayF64 imgA , GrayF64 imgB , GrayF64 output, InputSanityCheck ISC) { \n\t\tISC.checkSameShape(imgA,imgB,output);\n\t\t\n\t\tfinal int h = imgA.getHeight();\n\t\tfinal int w = imgA.getWidth();\n\n\t\tfor (int y = 0; y < h; y++) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a CommunicationRequest object, with extra data field for user that may be relevant to the given request. Used more for logging in, sending whispers. | public CommunicationRequest(CommType type, E data, String relevantUser){
this.type = type;
this.data = data;
this.relevantUser = relevantUser;
} | [
"private Request createRequest() {\n try {\n CallIdHeader callIdHeader = LeakAudit.sipProvider.getNewCallId();\n CSeqHeader cseqHeader = headerFactory.createCSeqHeader(++cseq, Request.INVITE);\n SipURI requestURI = addressFactory.createSipURI(\"to-user\", \"127.0.0.1\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub IProducer p = new Producer(); // Upcasting IProducer p = new EnhanceProducer(); | public static void main(String[] args) {
IProducer p = Factory.getObject();
p.callMe();
//p.dontCallMe();
} | [
"public void producer() {}",
"public interface ProducerInterface {\n \t/**\n \t * callback for creating the producers\n \t * @param chicken\n \t * @param eggs\n \t * @param choco\n \t * @param chocoRabbits\n \t */\n \tpublic void createProducers(int chicken, int eggs, int choco, int chocoRabbits);\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column market_activity_report_week_advertisement.create_time | public Date getCreateTime() {
return createTime;
} | [
"public Long getWcreateTime() {\n return wcreateTime;\n }",
"public Date getTimecreate() {\r\n return timecreate;\r\n }",
"public Date getCREATE_TIME() {\r\n\t\treturn CREATE_TIME;\r\n\t}",
"@Temporal(value = TemporalType.TIMESTAMP)\n\t@Column(columnDefinition = \"timestamp NULL default NU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Add this to Settings somewhere | public static void clearEverything(MainActivity a) {
clearCache(a);
PreferenceManager.getDefaultSharedPreferences(a).edit().clear().apply();
logout(a);
} | [
"private Settings() {\r\n\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\n\tprotected void config() {\n\t\t\n\t}",
"public void onSettingSetup() {\n\n }",
"public abstract String getSettings();",
"public SimplyVanish(){\r\n \t\tdefaults = Settings.getDefaultConfig();\r\n \t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo responsavel por consultar despesas por periodo | @POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Path("/consultar/{inicio}/{fim}")
@SuppressWarnings("unchecked")
public List<Parcela> consultaDespesasPeriodo(@PathParam("inicio")Date dataIncial, @PathParam("fim")Date dataFinal){
try{
StringB... | [
"public List<Aula> consultaPeriodica2(Date dia, Date horaInicio, Date horaFin, int capacidad, TipoAula tipoAula, PeriodoEnum periodo){\n java.sql.Time sqlHoraInicio = new java.sql.Time(horaInicio.getTime());\r\n java.sql.Time sqlHoraFin = new java.sql.Time(horaFin.getTime());\r\n \r\n //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: this method is not implemented in Android | @Override
public void run() {
callbackContext.success();
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\nint nooftyres() {\nreturn 0;\n}",
"@Override\n public int utilite() {\n return 0;\n }",
"protected void onCreate() {}",
"@Override\n public void onCompleted() {\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update node recovery status to ZK | private void setRecoveryStatus(RecoveryStatus.Status status) {
if (!isLeader.get()) {
log.warn("This node is not the recovery leader");
throw new IllegalStateException("This node is not the recovery leader");
}
RecoveryStatus recoveryStatus = queryNodeRecoveryStatus();
... | [
"public abstract void setFirmwareStatusNode(String firmwareStatusNode);",
"private void checkStatus() {\n\t\t// if a node is offline, report it as offline and update finger tables\n\t\tboolean deltas = false;\n\t\tSystem.out.println(\"Checking status of nodes..\");\n\t\ttry {\n\t\t\tfor (Integer nodeId : ipMap.ke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
Homework_Lab5_2 load = new Homework_Lab5_2();
load.input = JOptionPane.showInputDialog(null,"Enter number : ");
load.number = Long.parseLong(load.input);
JOptionPane.showMessageDialog(null,"Number digit of "+load.number+" is " + countDigit(load.number));
} | [
"@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"
]
]
}
} |
Sets the PointsPublishQuestion property | public void setPointsPublishQuestion(int value)
{
getSemanticObject().setIntProperty(forumCat_pointsPublishQuestion, value);
} | [
"public void setQuestion(String question) {\n this.question.setText(question);\n\n }",
"public void AssignQuestion( String question )\n {\n this.question = question;\n }",
"public void setQuestions(Questions questions) {\r\n\t\tthis.questions = questions;\r\n\t\tif (questions != null) {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This writes to a text file using an ArrayList of Strings. The path to the file has to be added. Use appDir if the files are in the application directory. Use fileSeperator if the app may be running under a different OS. Change the contents of text file in its entirety, overwriting any existing text. | public void writeTextFile(String fn, ArrayList aContents, Boolean show) throws FileNotFoundException, IOException {
File fileName = new File(fn);
if (show) {
System.out.println(aContents.size());
}
Writer output = new BufferedWriter(new FileWriter(fileName))... | [
"public static void write(List<String> text, String outputPath) {\n StringBuilder sb = new StringBuilder();\n Writer output = null;\n try {\n output = new BufferedWriter(new FileWriter(outputPath, true));\n for (String x : text) {\n sb.append(x + '\\n');\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is more or less copied from BundleArchiveImpl It should rather be moved to the Util class | private Collection<String> getNativeCode(String bnc) {
if (bnc != null) {
Hashtable<String, String> fwprops = new Hashtable<String, String>();
fwprops.put(Constants.FRAMEWORK_PROCESSOR,
bc.getProperty(Constants.FRAMEWORK_PROCESSOR));
fwprops.put(Constants.FRAMEWORK_OS_NAME,
... | [
"private JavaArchive getBundleX() {\n final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, \"jbosgi38-bundleX\");\n archive.addClasses(SomePojo.class);\n archive.setManifest(new Asset() {\n public InputStream openStream() {\n OSGiManifestBuilder builder = O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public int updateTableOwner(String username, int platenum) {
int key = 0;
log.trace("adding a car to the ownership table "+username);
log.trace(username);
Connection conn = cu.getConnection();
try{
conn.setAutoCommit(false);
String sql = "insert into ownercars (username,carplate) value... | [
"@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"
]
]
}
} |
The doGet method of the servlet. This method is called when a form has its tag value method equals to get. | public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
} | [
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(request, response); //susing doPost方法执行 对应jsp页面中的form表单中的method\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
run runImpl catching and logging Throwable. | @Override
public final void run() {
try {
runImpl();
} catch (Throwable e) {
log.warn("error handling gs (" + getConnection().getIP() + ") message " + this, e);
}
} | [
"@Override\r\n @Transactional\r\n public void run()\r\n {\r\n try\r\n {\r\n runInternal();\r\n }\r\n catch ( RuntimeException ex )\r\n {\r\n log.error( DebugUtils.getStackTrace( ex ) );\r\n\r\n throw ex;\r\n }\r\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Driver program to test above functions | public static void main(String args[])
{
int V = 5;
GraphAdjacencyList graph = new GraphAdjacencyList(V);
graph.addEdge(0, 1);
graph.addEdge(0, 4);
graph.addEdge(1, 2);
graph.addEdge(1, 3);
graph.addEdge(1, 4);
graph.addEdge(2, 3);
grap... | [
"private void testing() {\n\t}",
"public void testSample(){\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\n\t\t// Each function here should test a different class.\n\n\t\t// CharLinkedList\n\t\ttestCharLinkedList();\n\n\t\t// SuffixTreeNode\n\t\ttestSuffixTreeNode(); \n/*\n\t\t// longestRepeatedSuf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the property 'propIndexCleanerIntervalInSecs' | @Test
public void propIndexCleanerIntervalInSecsTest() {
// TODO: test propIndexCleanerIntervalInSecs
} | [
"public boolean setPropertyUpdateCount(long aValue);",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n DBCopyPreferenceBean dBCopyPreferenceBean0 = new DBCopyPreferenceBean();\n DBUtil.setPreferences(dBCopyPreferenceBean0);\n assertEquals(0L, dBCopyPreferenceBean0.getRecordDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The class holding records for this type | @Override
public Class<Record> getRecordType() {
return Record.class;
} | [
"@Override\n public Class<ClazzRecord> getRecordType() {\n return ClazzRecord.class;\n }",
"@Override\r\n\tpublic Collection<RecordType> getRecords() {\r\n\t\treturn records.values();\r\n\t}",
"public ProviderRecords(){\n\t\tproviderDetails = new ArrayList<Provider>();\n\t}",
"@Override\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
also "LoginBackground.image" String ca = StringTools.trim(privLabel.getStringProperty(PrivateLabel.PROP_AccountLogin_contentAlign,"")); | public String getContentAlign() {
String ca = StringTools.trim(reqState.getKeyValue(PrivateLabel.PROP_AccountLogin_contentAlign,null,null));
if (ca.equalsIgnoreCase("left") ||
ca.equalsIgnoreCase("center") ||
ca.equalsIgnoreCase("right") ) {
... | [
"@Source(\"text_align_left.png\")\n\tImageResource textAlignLeft();",
"String getFromUserLogo();",
"public void verifyLoginCaption() {\n shortWait.until(ExpectedConditions.visibilityOf(login.getWebElement()));\n verifyLoginCaption(LOGIN_CAPTION);\n }",
"LoginMenue(){\n login = new MenueBut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configuration.setSharedPrefrenceValue(getApplicationContext(),Constant.PREFS_NAME,Constant.srvicename,svname); Configuration.setSharedPrefrenceValue(getApplicationContext(),Constant.PREFS_NAME,Constant.serviceamount,seprice); Intent intent = new Intent(PlatinamWash.this,appointment.class); intent.putExtra("stetus","1")... | @Override
public void onClick(View v) {
Configuration.setSharedPrefrenceValue(getApplicationContext(),Constant.PREFS_NAME,Constant.srvicename,svname);
Configuration.setSharedPrefrenceValue(getApplicationContext(),Constant.PREFS_NAME,Constant.serviceamount,seprice);
... | [
"@Override\n public void onClick(View view) {\n\n\n Intent intent1=getIntent();\n String mobile_num=intent1.getStringExtra(\"mob\");\n SharedPreferences sharedPreferences=getSharedPreferences(\"mypref\",OtpVerification.this.MODE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string userName = 1; | public Builder setUserName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userName_ = value;
onChanged();
return this;
} | [
"public String getUserName(int userid);",
"public void setUsername(String str) {\n\tthis.username=str;\n}",
"public void getUser(String input) {\n getUsername = input;\n }",
"public void setUserName(String user);",
"String getUser_nm();",
"public String getUser_name() { return user_name; }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get details of an API Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it. &x60;XWSO2Tenant&x60; header can be used to retrive an API of a different tenant domain. If not specified super tenant will be used. If Authorization header is present in t... | @Test
public void apisApiIdGetTest() throws ApiException {
String apiId = null;
String accept = null;
String ifNoneMatch = null;
String ifModifiedSince = null;
String xWSO2Tenant = null;
API response = api.apisApiIdGet(apiId, accept, ifNoneMatch, ifModifiedSince, xWSO... | [
"private ApiInfo apiDetails() {\n\t\treturn new ApiInfo(\n\t\t\t\t\"Address Book API\",\n\t\t\t\t\"Sample API for Demo\",\n\t\t\t\t\"1.0\",\n\t\t\t\t\"Free to use\",\n\t\t\t\tnew springfox.documentation.service.Contact(\"Rushabh Jain\", \"https://github.com/rushabh-jain-452\", \"rushabhjain452@gmail.com\"),\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated int32 visitingAppointmentIDs = 7; | public Builder addAllVisitingAppointmentIDs(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureVisitingAppointmentIDsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, visitingAppointmentIDs_);
onChanged();
return this;
... | [
"static private int getUnusedIID(){\r\n\t\tint i=0;\r\n\t\twhile(usedIIDs.contains(i)) i=i+1;\r\n\t\treturn i;\r\n\t}",
"public long[] getFlowIdArray(){\r\n return localFlowIdArray;\r\n }",
"public void loadPatientsAppointment() {\n\t\tlog.info(\"loading ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string reservation_name = 4; | java.lang.String getReservationName(); | [
"public void setReservation(Reservation reservation)\n {\n this.reservation = reservation;\n }",
"public java.lang.String getReservation() {\n return reservation;\n }",
"public java.lang.String getReservationId();",
"public void setNum_reservation(String Num_reservation) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the name of the tarball resource. E.g. return resource.tar | public static String getTarballResourceNameFromUrl(String url) {
String resourceName = url.substring(url.lastIndexOf('/') + 1);
return resourceName;
} | [
"public static String pathResourcesName(URL resource) {\n\t\treturn resource.getPath();\n\t}",
"@NotNull\n public String getName() {\n return resourceUrl.substring(nameStart);\n }",
"protected String getResourceBaseName()\r\n\t{\r\n\t\treturn this.getClass().getCanonicalName();\r\n\t}",
"public String ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Extracts the contents of a file into a single string which is returned. | private String extractFileContents(String filepath) {
StringBuilder output = new StringBuilder();
// Attempt to open the file and read the data
try (FileReader fr = new FileReader(filepath); BufferedReader br = new BufferedReader(fr)) {
String nextLine;
// Add the next... | [
"public static String getFileContents(String filename) {\n BufferedReader reader = null;\n String source = null;\n try {\n reader = new BufferedReader(new FileReader(filename));\n source = \"\";\n String line;\n while((line = reader.readLine()) != nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
// TBD Only Test purpose, to be deleted
TextView textViewHomeName = view.findVie... | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }",
"@Override\n\tprotected View initView(LayoutInflater inflate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public Employee addEmployee(Employee emp) {
return dao.addEmployee(emp);
} | [
"@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 | public void setData(LinkedList<ApprovalBean> agson) {
ApprovalBeans = agson;
} | [
"@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"
]
]
}
} |
get the server port number the user entered | public String getPortTextField(){
return portTextField.getText();
} | [
"public int getServerPort() {\n\t\treturn Integer.parseInt(port.getText());\n\t}",
"java.lang.String getServerPort();",
"int getPortnum();",
"public int getPortNumber() {\n int portNumberInt = 0;\n\t\t\t\t\t \n String portNumber = input[3].toString();\n\t\t \n portNumberInt = Intege... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
przesuwanie po wspomnianym wektorze | public void przelicz()
{
if(czyIstnieje()==0) return;
x+=vx;
y+=vy;
if(y<minimalneY() || x<minimalneX() || x> maksymalneX() || y > maksymalneY()) zniszcz();
} | [
"private void przesunSamochody(Pas pas) {\n int dlugoscPasa = pas.getDlugosc();\n for (int komorka = dlugoscPasa - 1; komorka >= 0; komorka--) {\n// Pojazd pojazd = pas.getZawartosc(i);\n Pojazd pojazd = pas.getZawartoscFast(komorka);\n if (pojazd != null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if you don't wanna immediate change your database configuration,set the param singleCaseDatasource true. that's mean you can't switch your database in different [action]. set false or don't give a param the datasource can imediate change,meanwhile the little more system resource. [action] Controller Method. | public BasicPersistenceHandler(boolean singleCaseDatasource) {
this(singleCaseDatasource ? DataSourceLocale.getInstance()
.getDatasource() : DataSourceStrategy.getDataSource(),
TransactionIsolationLevel.REPEATABLE_READ, (Boolean) conf
.C("AUTOCOMMIT"));
} | [
"public void setDatabase(java.lang.String param){\n \n this.localDatabase=param;\n \n\n }",
"public void setDb(java.lang.String param){\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Expr' attribute. If the meaning of the 'Expr' attribute isn't clear, there really should be more of a description here... | String getExpr(); | [
"PrimaryExpr getExpr();",
"ExpressionEvaluatorDefinition getExpr() {\n return expr;\n }",
"XExpression getValueExpression();",
"public String getExpression() {\n if(this.expression != null) {\n \treturn this.expression.getValue();\n }\n \n return null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table t_cpy_landinfo | public Criteria andLandUseStatusLessThanColumn(TCpyLandinfo.Column column) {
addCriterion(new StringBuilder("land_use_status < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
} | [
"public List<LandInfo> getLandInfoData(LandSearchCriteria criteria) {\n\t\tList<Object> preparedStmtList = new ArrayList<>();\n\t\tString query = queryBuilder.getLandInfoSearchQuery(criteria, preparedStmtList);\n\t\tList<LandInfo> landInfoData = jdbcTemplate.query(query, preparedStmtList.toArray(), rowMapper);\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
NN chess board we need place N queens in position such that they cant kill each other | public static void main(String[]args){
int[][] chess = new int[4][4];
printNQueen(chess, "", 0);
} | [
"public static void main(String args[])\n{\n\tchess_board[0][4]=-1;\n\tchess_board[0][5]=-1;\n\tfor(int k=1;k<9;k++)\n\t{\n\tchess_board[1][k]=-1;\n\tchess_board[8][k]=-1;\n\t}\n\tchess_board[4][0]=-1;\n\tchess_board[4][5]=-1;\n\tchess_board[5][0]=-1;\n\tchess_board[0][5]=-1;\n\tchess_board[4][4]=-1;\n\tchess_board... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Get the mass of the hole. / \return the mass of the black hole. | public float getMass() {
return mMass;
} | [
"public double getMass()\r\n\t{\r\n\t\treturn mass;\r\n\t}",
"public Double getMass() {\r\n return mass;\r\n }",
"@Override\r\n\tpublic double get_mass() {\r\n\t\treturn mass;\r\n\t}",
"public double getMolarMass();",
"@Basic @Immutable\n\tpublic double getMass() {\n\t\treturn this.mass;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called with the data in the database to decide whether to fetch potentially updated data from the network. | @MainThread
protected abstract boolean shouldFetch(@Nullable CacheObject data); | [
"public boolean fetchDBData(){\n this.isNew = false;\n this.isChanged = false;\n return true;\n }",
"private Boolean checkChanged() {\n\n if (!DataManager.isNetworkAvailable(this)) {\n return false;\n }\n\n load(true);\n if(changeTask.getStatus().equa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create By mtianyan 2019/12/27 13:55 | public interface ItemsMapperCustom {
public List<ItemCommentVO> queryItemComments(@Param("paramsMap") Map<String, Object> map);
// FIXME 将搜索划分到主搜food-search模块
// public List<SearchItemsVO> searchItems(@Param("paramsMap") Map<String, Object> map);
//
// public List<SearchItemsVO> searchItemsByThirdCat(@P... | [
"public Create() {\n\t\t\tsuper();\n\t\t}",
"public void create() {\n\t\tmCreated = true;\n\t}",
"private String createCreationTimeAsString() {\n\t\tfinal SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'hh:mm:ss\");\n\t\tfinal Date date = new Date(); \n\t\treturn simpleDateFormat.format... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the hero to the cell located at the respective height and width. | public void addHeroToCell(final Hero hero, final int x, final int y) {
if (isHeroInCell(hero, x, y)) {
return;
}
map[x][y].addHeroToCell(hero);
} | [
"private void addHero()\n {\n // Initial horizontal position\n int initialX = TILE_SIZE * 3;\n\n // Instantiate the hero object\n theHero = new Taizo(initialX);\n\n // Add hero in bottom left corner of screen\n addObject(theHero, initialX, getHeight() / 4 * 3);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ dynamic '(' memberReference '(' argumentList ')' ')' | public static boolean dynamicExecutionPointcut(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "dynamicExecutionPointcut")) return false;
if (!nextTokenIs(b, DYNAMIC)) return false;
boolean r;
Marker m = enter_section_(b);
r = consumeToken(b, DYNAMIC);
r = r && consumeToken(b, T_LEFT_PAREN);
... | [
"protected void gotMemberCall(LocatableToken token, List<LocatableToken> typeArgs) { }",
"List<Member> getMemberChildren(List<Member> members, Evaluator context);",
"private void generateInvokeDynamicLambdaMetaFactoryInvocation(final InvokeDynamicExpression node, final ResolveCallsite resolveCallsite) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles shopping cart charge using credit card as payment method. Returns an instance of for this transaction, if successful. | public static PaymentResponse authorizeCreditCard(PaymentRequest paymentRequest )
throws CreditCardValidationException,
CreditCardAuthorizationException
{
if( paymentRequest == null )
{
throw new IllegalArgumentException( "chargeCard method was provided with a null paymentRequest" );
}
PaymentResponse ... | [
"public void cashPayment(){\n\t\tSystem.out.println(\"\\n ================== Pay with Cash ==================\\n \");\n\t\tSystem.out.println (\"Pick up the product at Solbjerg Pl.3 2000 Fredriksberg. Remember to bring cash.\");\n\t\tSystem.out.println(\"Amount to pay: \" + ShoppingCart.calculateTotalPrice() + \"DK... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Eingabe in der Console | public static void main(String[] args) throws IOException {
System.out.println("Geben Sie Bitte einen Wert für a ein:");
double a = IO.readDouble();
System.out.println("Geben Sie bitte einen Wert für b ein:");
double b = IO.readDouble();
System.out.println("Geben Sie bitte einen Wert für c e... | [
"String getConsole();",
"public interface Console {\n\n enum Level {\n NORMAL, DEBUG;\n }\n\n /**\n * Define o nivel de saida no console.\n *\n * @param level\n */\n void setLevel(Level level);\n\n /**\n * Retorna o nivel de saida no console.\n *\n * @return\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs a deep copy on other. | public reqTSledCommodityChange_result(reqTSledCommodityChange_result other) {
if (other.isSetSuccess()) {
this.success = new TSledCommodityChangePage(other.success);
}
if (other.isSetErr()) {
this.err = new org.soldier.platform.svr_platform.comm.ErrorInfo(other.err);
}
} | [
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n private void copyFrom(final _BeanImpl other, final boolean immutably) {\r\n if (other == null) {\r\n throw new IllegalArgumentException(\"other cannot be null\");\r\n }\r\n if (other.getClass() != getClass()) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.. Purpose ======= applies a plane rotation. Further Details =============== jack dongarra, linpack, 3/11/78. modified 12/3/93, array(1) declarations changed to array() .. Local Scalars .. | public abstract void srot(int n, float[] sx, int incx, float[] sy, int incy, float c, float s); | [
"public int[] RPiont(int x,int y,int cx,int cy,int cz,int az,int el,int w,int h)\n{\ncx+=px;cy+=py;cz+=pz;\n\ndouble Rx=Math.PI*(az)/180.0;\ndouble Ry=Math.PI*(el)/180.0;\n\ndouble CX=Math.cos(Rx);\ndouble SX=Math.sin(Rx);\ndouble CY=Math.cos(Ry);\ndouble SY=Math.sin(Ry);\n\n//convert plane to 2 halfs of left and r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a unique 6digit ID number. Scalability: O(n) | private int assignID()
{
int n = 0;
do {
n = random.nextInt(899999);
} while (matchIDNo(n + 100000));
return n + 100000;
} | [
"private long generateUniqueDigits() {\n\t\tGenerator g = idGeneratorRepo.save(new Generator());\n\t\tlong number = g.getGeneratedId();\n\t\treturn number;\n\t}",
"public static String idGen(){\n\t\tString id=\"\";\n\t\tRandom rgen = new Random();\n\t\tfor(int i=0;i<11;i++){\n\t\t\tid=id+Integer.toString(rgen.nex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise | public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
throw new java.lang.IllegalStateException();
} | [
"public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case DATA:\n return isSetData();\n }\n throw new IllegalStateException();\n }",
"public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the Condition matches the given state. | public boolean doesMatch(StateDescriptor state) {
return this.condition.doesMatch(state.getConditionInput());
} | [
"public boolean matches(SushiEvent event) {\n\t\tif (!hasCondition()) return true;\n\t\treturn condition.matches(event);\n\t}",
"boolean hasState(State state);",
"boolean hasState(GemState state);",
"public boolean checkCondition () {\n boolean condMet = true;\n for (Expression expr : conditions... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |