query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
optional string regex = 1; | com.google.protobuf.ByteString
getRegexBytes(); | [
"ValidatorType(String regex) {\n\t\tthis.pattern = Pattern.compile(regex);\n\t}",
"private Tipo(String regex){\r\n this.regex = regex;\r\n }",
"String asJavaRegex();",
"public regexpert() {\n\t\tsuper();\n\t}",
"public void setRegularExpression(boolean regex) {\n\t\tthis.regex = regex;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
renvoie la case du pacgum le plus proche | public Case chercherPacgum() {
Case c = null;
int a = 0;
int b = 0;
int max = 2;
int l = Global.lfenjeu / Global.taille_bloc;
int h = Global.hfenjeu / Global.taille_bloc;
while ((max < 102) && (c == null)) {
a = 0;
while ((a < max) && (c == null)) {
b = 0;
while ((b <= max) && (c ... | [
"public void remplissagecase(Joueurs joueur) {\r\n\t\tfor(int i=0;i<joueur.getPlateau().grille.length;i++){\r\n\t\t\tfor(int j=0;j<joueur.getPlateau().grille[i].length;j++){\r\n\t\t\t\tjoueur.listcase.add(joueur.getPlateau().grille[i][j]);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int getCase()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check c is within the bounds of the slider | public void setCurrentDate(Date c) {
if (start.after(c)) c = start;
if (end.before(c)) c = end;
current = c;
callback.accept(current);
// Update slider position
long deltaSec = current.toInstant().getEpochSecond() - start.toInstant().getEpochSeco... | [
"protected boolean inBounds(int r, int c)\n {\n return (r >= 0 && c >= 0 && r < getHeight() && c < getWidth());\n }",
"public boolean isInBounds(){\n\t\tdouble X = circle.getCenterX();\n\t\tdouble Y = circle.getCenterY();\n\t\tdouble buffer = 200;\n\t\tdouble low = 0 - buffer;\n\t\tdouble xHigh = level.getCanv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prepares the edit page | public String edit() throws Exception {
loadEmployeeFromId();
setExtraInformation();
setPositionsForSelect();
return SpmActionResult.EDIT.getResult();
} | [
"public String doEditElement(){\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\n\t\tString id = fc.getExternalContext().getRequestParameterMap().get(\"id\");\n\t\tString edition = fc.getExternalContext().getRequestParameterMap().get(\"edition\");\n\t\tthis.clear();\n\n\t\tif (id != null){\n\t\t\tstatusPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Abstraction function: add a target connection to the vertex | public boolean addTarget(final L target, final int weight) {
checkInputLabel(target);
assert weight >0;
if( targets.putIfAbsent(target, weight) == null ) {
checkRep();
return true;
}
return false;
} | [
"public void connect(Port source, Port target) {\r\n\t\t// Construct Edge with no label\r\n\t\tDefaultEdge edge = createDefaultEdge();\r\n\t\tif (graph.getModel().acceptsSource(edge, source) && graph.getModel().acceptsTarget(edge, target)) {\r\n\t\t\t// Create a Map thath holds the attributes for the edge\r\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .dzhyun.QuoteMinSingle Results = 1; | public Builder addResults(
int index, com.dzhyun.proto.Dzhoutput.QuoteMinSingle value) {
if (resultsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResultsIsMutable();
results_.add(index, value);
onChanged... | [
"com.dzhyun.proto.Dzhoutput.QuoteMinSingle getRepDataQuoteMinSingle(int index);",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n StringReader stringReader0 = new StringReader(\"=*2qQc`*n[f}R\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n strea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the id the last log. | LogId getLastLogId(final boolean isFlush); | [
"public static int getLastid()\n {\n return lastid;\n }",
"public static int getLastId(){\r\n return lastId;\r\n }",
"public String getLastID(){\r\n\t\treturn this.scope.lastElement();\r\n\t}",
"public static int getLastID() {\n \treturn (nextID - 1);\n }",
"public String getLas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//////////////////////////////////////////////////////////// EXTRA MEMBERS: BEGIN | @Override public NullabilityBugVisitor clone() {
return new NullabilityBugVisitor(this);
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\r\n public void publicando() {\n }",
"protected void method_5557() {}",
"public boolean extra() { // subclasses override this method if something special needs to be done\r\n // TO DO\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to execute a RunQueriesEx object which is really a query consisting of multiple queries, returns an arraylist of Record_Sets... | public ArrayList<Record_Set> executeQueryEx(RunQueriesEx gqf) {
return executeQueryEx(gqf, true);
} | [
"DataSetList execute(String queryId, DataSet dataSet) throws QueryException;",
"public static int[] executeBatch(ArrayList<String> sqlQuerys) throws SQLException {\n\t\tcheckConnection();\n\t\tStatement statement = connection.createStatement();\n\t\tfor (String sqlQuery : sqlQuerys) {\n\t\t\tstatement.addBatch(sq... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crea lista de beanes a partir de lista de dtoses | @SuppressWarnings("unchecked")
public static List<DistribucionTipoProyectoDTO> buildListDtos(List<DistribucionTipoProyectoBean> beanes) {
List<DistribucionTipoProyectoDTO> dtoses = new ArrayList();
if (beanes == null) {
return null;
}
for (DistribucionTipoProyectoBean bean : beanes) {
dtoses.add(buildD... | [
"private List<DemoBean> getBeans() {\n List<DemoBean> demoBeans = new ArrayList<>();\n for (int i = 0; i < 10; i++) {\n DemoBean b = new DemoBean();\n b.setName(\"DemoBean \" + i);\n b.setAge(i);\n demoBeans.add(b);\n }\n return demoBeans;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the redirection URL with the appended SAML2 Request message | public String buildRequestMessage(HttpServletRequest request) {
RequestAbstractType requestMessage;
// time to build the authentication request message
if (request.getParameter("logout") == null) {
requestMessage = buildAuthnRequestObject();
} else { // ok, user needs to be single logged out
requestMes... | [
"String getRedirectUrl(HttpServletRequest request);",
"public abstract String getRedirectUrl(HttpServletRequest request) throws JahiaException;",
"public String getUserRedirectUrl();",
"String getRedirectURI();",
"public String getRedirectUrl( HttpServletRequest request )\n {\n if ( StringUtils.is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void comportListener(String data) {
} | [
"@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"
]
]
}
} |
To be really accurate we have to start the circle on the furthest corner of the view | private int getEnclosingCircleRadius(View v, int cx, int cy) {
int realCenterX = cx + v.getLeft();
int realCenterY = cy + v.getTop();
int distanceTopLeft = (int) Math.hypot(realCenterX - v.getLeft(), realCenterY - v.getTop());
int distanceTopRight = (int) Math.hypot(v.getRight() - realCe... | [
"private void OuterCircle(){\n\n\t\tdouble GrapWinMidPtX = getWidth() / 2;\n\t\tdouble GrapWinMidPtY = getHeight() / 2;\n\t\t\n\t\tdouble centreX = GrapWinMidPtX - OUTER_RAD / 2;\t//\tWant the circle to be at the centre of the window so, coordinate of centre minus the radius of the circle \n\t\tdouble centreY = Gra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private static final int > Constantes | public static void main(String[] args) {
System.out.println("Hello world!");
//Arithmetic operators
int resultado = 45 + 12;
resultado = 45 - 12;
resultado = 45 * 12;
resultado = 45 / 12;
resultado = 45 % 12;
//Unary operators
resultado++;... | [
"public interface Constants {\n\tpublic static final int NUMBER_OF_ROWS = 10;\n\tpublic static final int NUMBER_OF_COLOMNS = 10;\n}",
"public Map<Integer, String> getConstants();",
"public interface GlobalConstantsForCars {\n Integer NUMBER_OF_PLACES_IN_CAFE_CAR = 18;\n Integer NUMBER_OF_PLACES_IN_CAFE_ZO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Collect data from sensors and store to a file | private void launchCollectingInformation() {
t = getCollectionInformationThreadInstance();
t.start();
} | [
"private void writeEvent(SensorEvent event) {\n BufferedWriter writer = null;\n String sensor = \"\";\n\n String row = getValuesAsCsvRow(event.values, event.timestamp);\n\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n writer = accelOutputStream;\n se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: b | public EventMessage redact(EventMessage abVar) {
C27947a a = abVar.newBuilder();
a.f96694c = C28082z.f97371a.redact(a.f96694c);
a.clearUnknownFields();
return a.build();
} | [
"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"
]
]
}
} |
Convert byte to long | public static long byteToLong(byte input) {
return (long) input;
} | [
"public static long parseLong(byte[] b, int off, int len)\n throws NumberFormatException\n {\n int c;\n\n if (b == null || len <= 0 || !isDigit(c = b[off++])) {\n throw new NumberFormatException();\n }\n\n long n = c - '0';\n long m;\n\n while (--len > ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MacroDef__Group__0__Impl" $ANTLR start "rule__MacroDef__Group__1" ../com.euclideanspace.macro.ui/srcgen/com/euclideanspace/macro/ui/contentassist/antlr/internal/InternalDemo.g:371:1: rule__MacroDef__Group__1 : rule__MacroDef__Group__1__Impl rule__MacroDef__Group__2 ; | public final void rule__MacroDef__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.euclideanspace.macro.ui/src-gen/com/euclideanspace/macro/ui/contentassist/antlr/internal/InternalDemo.g:375:1: ( rule__MacroDef__Group__1__Impl rule__Ma... | [
"public final void rule__Define__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.mydsl2.ui/src-gen/org/xtext/example/mydsl2/ui/contentassist/antlr/internal/InternalMyDsl.g:738:1: ( rule__Define__Grou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets the board state. | private void resetBoard()
{
for (Node node : board.getChildren())
{
TextField cell = (TextField) node;
cell.setStyle(
"-fx-border-color:black;-fx-border-width:1;" +
"-fx-border-style:solid;");
cell.setText("");
}
... | [
"public void resetBoard(){\n\t\tsetSquares();\n\t\tsetWhitePieces();\n\t\tsetBlackPieces();\n\t}",
"public void reset(){\r\n\t\tcreateBoard();\r\n\t\t\r\n\t}",
"public static void resetBoard() {\n\t\tstate.board = new Piece[8][8];\n\t\tstate.whiteTeam = new Team();\n\t\tstate.blackTeam = new Team();\n\n\t\tsetD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtiene una lista por id proveedor | public List<ChoferProveedor> findByProveedor(Proveedor proveedor); | [
"@Override\r\n\tpublic String listarId() {\r\n\t\tStringBuilder listado = new StringBuilder();\r\n\t\tObjectSet<Simulacion> result = null;\r\n\t\tQuery consulta = db.query();\r\n\t\tconsulta.constrain(Simulacion.class);\t\r\n\t\tresult = consulta.execute();\r\n\t\tif (result.size() > 0) {\r\n\t\t\tfor (Simulacion s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this method to show a view in your layout with a fade effect | public static void showFadeView(float from, float to, long duration, long delay, final View view) {
ObjectAnimator fade = ObjectAnimator.ofFloat(view, "alpha", from, to);
AnimatorSet animSet = new AnimatorSet();
animSet.playTogether(fade);
animSet.setDuration(duration);
animSet.... | [
"public static void fadeIn(View view) {\n fadeIn(view, null);\n }",
"@SuppressLint(\"InlinedApi\")\n private void show() {\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n //mHideHandler.removeCallbacks(mHidePart2Runnable);\n //mHideHand... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
day so chua so am | @Test
public void test3() {
MaxTwoNumbers testnumbers=new MaxTwoNumbers();
int a[]={1,-3,-4,-1,-4,-6};
String result= testnumbers.TwoMax(a,6);
assertEquals("1 -1", result);
} | [
"private String Day() {\n\t\tswitch(day){\n\t\tcase 1:return \"周一\";\n\t\tcase 2:return \"周二\";\n\t\tcase 3:return \"周三\";\n\t\tcase 4:return \"周四\";\n\t\tcase 5:return \"周五\";\n\t\tcase 6:return \"周六\";\n\t\tdefault:return \"周日\";\n\t\t}\n\t}",
"private String getTestCycle() {\n Date date = new Date();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Return 0 if success. If failure, return 1 | @Override
public synchronized int AddRobotStatus(RobotStatus robotStatus) {
logger.entry();
System.out.println("DAL:AddRobotStatus:orderNo: " + robotStatus.getOrderNo());
try {
int executeUpdateVal; // Return value from execute indicating effected rows
... | [
"boolean hasSuccessful();",
"int errorCount();",
"public int getSuccess() {\n return success;\n }",
"public boolean isSuccess() {\n\t\treturn exitVal == 0;\n\t}",
"public int getRet() {\n\t\treturn 0;\n\t}",
"@Override\n final public int returnStatus() {\n return returnStatus == 0 ? ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onPageScrolled(int arg0, float arg1, int arg2) {
} | [
"@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 Optional<Danhmuc> findById(Integer id) {
return danhMucRepository.findById(id);
} | [
"@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"
]
]
}
} |
Created by brunolemgruber on 14/12/16. | public interface RetrofitService {
@Headers("Authorization:Basic " + BuildConfig.IUGU_KEY)
@FormUrlEncoded
@POST("customers")
Call<Client> clientRegister(@Field("email") String email, @Field("name") String name);
@Headers("Authorization:Basic " + BuildConfig.IUGU_KEY)
@FormUrlEncoded
@POST... | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates hook position and keeps it within frame bounds | public void checkBounds() {
if (hook.getYPos() + hook.getYSpeed() < WATER_TOP
|| hook.getYPos() + hook.getYSpeed() + FishingGameView.HOOK_HEIGHT > WATER_BOTTOM) {
// don't change y
} else {
hook.setYPos(hook.getYPos() + hook.getYSpeed());
hook.setHitbox(hook.getXPos(), hook.getYPos());
}
if (hook.g... | [
"public void onPositionUpdate();",
"private void adjustPosition()\n {\n Rectangle bounds = getBounds();\n\n if(bounds.x + bounds.width > GameSettings.WIDTH)\n {\n xPos -= (bounds.x + bounds.width - GameSettings.WIDTH);\n }\n else if(bounds.x < 0)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert the method's description here. Creation date: (30.1.2001 11:47:54) | public int getInX() {
if (isRight())
return getX()+getWidth()+(tailSizeOfR+3)*Constants.LINK_RADIOUS;
else
return getX()-(tailSizeOfR+3)*Constants.LINK_RADIOUS;
} | [
"public void mo5201a() {\n }",
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"protected void method_5557() {}",
"public void mo9609a() {\n }",
"public void mo12155e() {\n }",
"public void mo15109c() {\n }",
"@Ov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The location of the kerb5.conf file ( | public void setKerberosConfigFileLocation(String kerberosConfigFileLocation) {
this.kerberosConfigFileLocation = kerberosConfigFileLocation;
} | [
"public static String getConfDir() {\n return getHomeDir() + \"/conf\";\n }",
"public static String getConfigDir()\n\t{\t\t\n\t\treturn System.getProperty(\"user.dir\") + \"/../../configs/mockserver\";\n\t}",
"private static String getConfigurationFilePath() {\r\n\t\ttry {\r\n\t\t\tContext envCtx = (C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes current screen active Each class inherited from BaseScreen has a displayable associated. When this method is called the displayble is made visiable and active | public void makeActive() {
try {
Display d = Display.getDisplay(midlet);
if (d.getCurrent() != displayable) { // this prevents from
// bringing application to
// foreground in case is
// application is in
// background and the
// current displayable is
// the same as the one
... | [
"@Override\r\n\tpublic void show() {\n\t\tgame.setCurrentScreen(this);\r\n\r\n\t}",
"private void screen() {\n final PreferenceScreen screen_pref = (PreferenceScreen) findPreference(\"screen\");\n if (Aware.getSetting(awareContext, Aware_Preferences.STATUS_SCREEN).equals(\"true\")) {\n sc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by liuxiaolong on 2017/5/30. | public interface ShopcarService {
public void addCar(ShopcarEntity car);
public List<ShopcarEntity> qureyCar();
public void deleteCar(int scid);
public List<ShopcarEntity> qureyCarByUid(int uId);
public ShopcarEntity qureyCarByScid(int scId);
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\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}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overloaded method originally called to pick random direction | private void placeWord(String word, int index) {
Random rnd = new Random();
int direction = rnd.nextInt(8);
placeWord(word, index, direction);
} | [
"private static Direction randomDirection() {\n\t\treturn Direction.values()[rand.nextInt(8)];\n\t}",
"private float randomDirection()\n {\n Random direction = new Random();\n float magnitude = (float) (direction.nextGaussian()*0.5);\n \n return (magnitude < 0) ? magnitude - 3f : magnitude +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
double num=1100000;
if (num>0)
{
if(num<1) {
System.out.println("Positive Small");
}
else if(num>1000000)
{
System.out.println("positive large");
}
else
{
System.out.println("Positive");
}
}
else if(num<0)
{
System.out.println("... | [
"@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"
]
]
}
} |
string creator = 1; | public Builder setCreator(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
creator_ = value;
onChanged();
return this;
} | [
"public void setCreator(String aStr)\n {\n addInfoDictValue(\"Creator\", aStr);\n }",
"public String getCreator() {\n return creator;\n }",
"@DISPID(149) //= 0x95. The runtime will prefer the VTID if present\r\n @VTID(20)\r\n int creator();",
"Crime(String creatorName){\n\t\tthis.cr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/now retrive the modelAttribute from Model.class | @RequestMapping(value = "/processStudentForm")
public String processStudentForm(@Valid @ModelAttribute Student student,BindingResult binding) {
if(!binding.hasErrors()) {
System.out.println("Student data : " + student.getFirstName() + " " + student.getLastName());
return "process-student-form";}
else {
ret... | [
"Object buildAttribute(Object model, Object type);",
"public Class getModelType() {\n return this.modelType;\n }",
"public Classify getModel() {\n\t\treturn c;\n\t}",
"public Class getDataClassOfAttribute (Integer attribute)\n{\n DomainInfo domainInfo = (DomainInfo) attributeControllers.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Marks build as failed with the given Throwable. If keepGoing == false, any pending steps will be terminated before starting. | void terminateBuildWithFailure(Throwable failure); | [
"public synchronized void markFailed(final Throwable cause) {\n Preconditions.checkNotNull(cause, \"cause\");\n if (Status.finished(status)) {\n LOGGER.warn(\"Ignoring markFailed({}) because already finished: status {}, message {}\", cause, status, message);\n return;\n }\n status = Status.ERR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public List<TagModel> getSubTagModel(String parentTagXpath) {
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"
]
]
}
} |
TODO: Ideally we want to create this once per IDE instance. Thus we need to add a FileSystemWatcher whether the file was modified or not for better caching. | public IdeaWorkspace(File xmlFile) throws FileNotFoundException
{
if (xmlFile == null || !xmlFile.exists())
throw new FileNotFoundException();
_xmlFile = xmlFile;
_outputManager = new IdeaWorkspaceOutputManager(this);
Invalidate();
} | [
"void fileNotModified();",
"boolean detectContentChanged() {\n File targetFile = new File(filePath);\n if (!targetFile.exists()) {\n if (lastModifiedTimestamp == 0) {\n //File doesn't exist before, no change detected.\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value (as a int) of the field 'header.last_hop' | public int get_header_last_hop() {
return (int)getUIntElement(offsetBits_header_last_hop(), 16);
} | [
"public int get_log_msg_receive_root_beacon_last_hop() {\n return (int)getUIntElement(offsetBits_log_msg_receive_root_beacon_last_hop(), 16);\n }",
"public final byte getHopCount()\r\n\t{\r\n\t\treturn (byte) ((ctrl2 & 0x70) >> 4);\r\n\t}",
"public int getLastPacketIndex()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
board obtained by exchanging any pair of blocks | public Board twin() {
Random rn = new Random();
// generate random indices (i,j) where broad[i,j] != null
int p1rI = rn.nextInt(N); //StdRandom.uniform(N);
int p1rJ = rn.nextInt(N); //StdRandom.uniform(N);
int p2rI = rn.nextInt(N); //StdRandom.uniform(N);
int p2rJ = rn.... | [
"BoardBlock(){}",
"public Board twin() {\n // copy our board\n int[][] blocks = copyBoard();\n // if neither of the first two blocks are blank,\n if (blocks[0][0] != 0 && blocks[0][1] != 0) {\n // switch first two blocks\n blocks[0][0] = board[0][1];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the TabManager. | public TabManager() {
super();
sptabs = new ArrayList<SpreadSheet>();
add("",null);
setTabComponentAt(0, new InsertTabComponent(this));
final SpreadSheet panel0 = new SpreadSheet();
sptabs.add(panel0);
add("SpreadSheet #" + getTabCount(),panel0);
setSelect... | [
"private CustomTabs() {\n }",
"public Tab(Main controller, InfoManager infoManager) {\n this.controller = controller;\n this.infoManager = infoManager;\n\n }",
"protected TabInfo() {\r\n\r\n // nothing to do\r\n }",
"@Override\r\n public void initTabs() {\n }",
"public Ta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We also provide back the specific matched annotation for the above input. We do this in order to support more complex Annotation queries in the And message below. For example if we match the search results to a region in your input, or a frame in a video input, this annotation field will be that matched annotation info... | private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Annotation, com.clarifai.grpc.api.Annotation.Builder, com.clarifai.grpc.api.AnnotationOrBuilder>
getAnnotationFieldBuilder() {
if (annotationBuilder_ == null) {
annotationBuilder_ = new com.google.protobuf.SingleField... | [
"public ForAnnotation(Annotation... annotation) {\n this.annotation = annotation;\n }",
"Annotation getAnnotation(String AnnotationId);",
"public void setAnnotation(final org.chartacaeli.model.Annotation annotation) {\n this.annotation = annotation;\n }",
"@Override // kotlin.jvm.f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required uint32 main_version = 3; | public int getMainVersion() {
return mainVersion_;
} | [
"public int getVersion() {\n/* 627 */ return this.version + 1;\n/* */ }",
"public static int\n intVersion()\n {\n return 30401; // AABBCC, with AA=major, BB=minor, CC=patch\n }",
"io.bloombox.schema.struct.VersionSpec getVersion();",
"abstract int getVersion();",
"public abstract... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The modification time of the object metadata. .google.protobuf.Timestamp updated = 15; | com.google.protobuf.TimestampOrBuilder getUpdatedOrBuilder(); | [
"public com.google.protobuf.TimestampOrBuilder getModifiedOrBuilder() {\n return getModified();\n }",
"Date getModifiedTimestamp();",
"long getModifiedTime() {\n Preconditions.checkState(size == 0, \"%s %s %s\", digest, mtime, size);\n return mtime;\n }",
"public long getModifiedAt()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
number of points in the set | public int size() {
return (this.size);
} | [
"public int size() {return pointSet.size();}",
"public int getPointCount() { return _points.size(); }",
"public int size() {\n return points.size() / 3;\n }",
"public int size() {\n return points.size();\n }",
"public int getPointCount() {\n return point_.size();\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates default mustache factory or returns existing | private static MustacheFactory getFactory() {
if (factory == null) {
factory = ThreadLocal.withInitial(DefaultMustacheFactory::new);
}
return factory.get();
} | [
"private MustacheRenderer(String folderName) {\n\t\tfactory = new DefaultMustacheFactory(folderName);\n\t\t\n\t}",
"protected Mustache getTemplate(String templateName) {\n MustacheFactory mf = new DefaultMustacheFactory();\n return mf.compile(templateName);\n }",
"public interface CacheFactory ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tag.tag_name | public void setTagName(String tagName) {
this.tagName = tagName == null ? null : tagName.trim();
} | [
"Tag(final String name)\n {\n this.name = name;\n }",
"void add_tag(String tag){\n this.rename(name.split(\"\\\\.\")[0]+\" @\"+tag+\".\"+name.split(\"\\\\.\")[1]);\n directory.addTagtoDirectory(tag);\n }",
"public void setTag(Object Tag) {\r\n \tthis.mTag = Tag;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Manually releases a button at the given id. If the button is not pressed, it will be pushed instead. | public void releaseButton(int no) {
LOGGER.debug(String.format("Virtual button released: Key-ID: %d", no));
this.pushButton(no);
} | [
"public void sendButtonPressed(int id) {\n\t\tsendActionPacket(new PacketButtonPress(id));\n\t}",
"public void onRelease(int button) {\r\n\r\n\t}",
"public void removeButton(int id){\n Button butt = (Button) findViewById(id);\n ViewGroup layout = (ViewGroup) butt.getParent();\n layout.remov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/======================================================================================== / C O N S T R U C T O R S Contructor | public Meta(int current_page, int from, int last_page, String path, int per_page, int to, int total) {
this.current_page = current_page;
this.from = from;
this.last_page = last_page;
this.path = path;
this.per_page = per_page;
this.to = to;
this.total = total;
... | [
"public Cachorro() {\r\n }",
"private O()\r\n {\r\n super();\r\n }",
"private CSCreator() {\n }",
"public Tanh() {\n\t}",
"protected CA() {}",
"public HeteroAST() { ; }",
"Cokolady()\t{\r\n\t\tsuper();\r\n\t}",
"public Copome() {\r\n\t}",
"public CEL_Chauffage()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s = in.nextLine();
in.nextLine();
in.close();
int vowels =0;
int consonants = 0;
int space = 0;
for(int i=0; i < s.length();i++) {
char ch = s.charAt(i);
if (ch =='a' || ch =='e' || ch =='i' || ch ... | [
"@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"
]
]
}
} |
Initializes GUI components and displays dialog. | private void init() {
JPanel imagePanel;
setForeground(Color.black);
setTitle("Show pixel similarity cost function values");
if (firstImage.getNDims() > 2) {
tMatrix = new TransMatrix(4);
} else {
tMatrix = new TransMatrix(3);
}
... | [
"public void initGUI() {\n\t\ttry {\n\t\t\t\n\t\t\tsetDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\t\t\tthis.setTitle(\"iHungry Vendor\");\n\t\t\tsetSize(800, 600);\n\t\t\t\n\t\t\tloginGui = new LoginGui(getContentPane());\n\t\t\tsignupGui = new SignupGui(getContentPane());\n\t\t\torderGui = new Order... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Intent intent = new Intent(this, SettingActivity.class); startActivity(intent); | private void setting() {
} | [
"public void startSettingsActivity(){\n Intent intent = new Intent(this, SettingsActivity.class);\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, SettingsActivity.class);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the imap port. | public String getImapPort() {
return imapPort;
} | [
"public int getPort() {\n\t\treturn adapt.getPort();\r\n\t}",
"public int getPort() {\n return u.getPort();\n }",
"public static String getPort() {\n\t\treturn port;\n\t}",
"public int getPort() {\n int port = this.mUrl.getPort();\n if (port == -1) {\n port = this.mUrl.getDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void setIngredientItemId(String ingredientItemId) {
} | [
"@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 is called after closing the popup. | void cancel(@NotNull Function<? super String, String> onHide); | [
"void popupClosed();",
"public void closePopup()\r\n {\r\n notifications.clear();\r\n super.closePopup();\r\n\r\n // Fire Event\r\n if (null != callbackHandler)\r\n {\r\n callbackHandler.handleEvent(EventType.APPLY);\r\n }\r\n callbackHandler = null;\r\n }",
"prote... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
funcion que segun el tipo de pago le dispone un imagen personalizada | private int seleccionarImagenPago(){
if(pedido.getTipoPago().equalsIgnoreCase("money")){
return R.drawable.euro;
}else if (pedido.getTipoPago().equalsIgnoreCase("favor")){
return R.drawable.logo2;
}
return 0;
} | [
"public abstract void pintarimagen();",
"private void DiseImagenPublicada(){\n\n if (dim.getHeigth()>=620){//asigna el valor de pantalla mayor con incremento *2\n view.iPublicada.getLayoutParams().height=Integer.parseInt(lista.get(Potition).Get(6))*2;//Largo\n }\n else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an uptodate fingerprint hash in order to update or change labe... | public Builder setLabelFingerprint(String labelFingerprint) {
this.labelFingerprint = labelFingerprint;
return this;
} | [
"@java.lang.Override\n @java.lang.Deprecated public java.lang.String getFingerprint() {\n java.lang.Object ref = fingerprint_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public Object getItem(int position) {
return data.get(position);
} | [
"@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"
]
]
}
} |
Pour suivre depuis le logout en cas d'erreur | @Override
public void onChartGestureStart(MotionEvent me, ChartTouchListener.ChartGesture lastPerformedGesture) {
Log.i(TAG,"onChartGestureStart: X" + me.getX() +"Y: "+ me.getY());
} | [
"public void logout(){}",
"@Override\n public void onLogoutFailure() {\n }",
"public String doLogout() {\n loggedIn = false;\n HttpSession session = (HttpSession)\n \n FacesContext.getCurrentInstance().getExternalContext().getSession(false);\n //FacesContext.getCurrentI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if a base URL has been defined | public boolean hasDefaultBaseURL()
{
return !StringTools.isBlank(this.defaultBaseURL);
} | [
"public boolean hasImageBaseUrl() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean isFullUrl() {\n return fullUrl;\n }",
"boolean hasLocalUrl();",
"public boolean isSetURL()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /jobadvertisments : get all the jobadvertisments. | @GetMapping("/jobadvertisments")
@Timed
public List<Jobadvertisment> getAllJobadvertisments() {
log.debug("REST request to get all Jobadvertisments");
List<Jobadvertisment> jobadvertisments = jobadvertismentRepository.findAll();
return jobadvertisments;
} | [
"public ArrayList<Job> findAll() {\n return jobs;\n }",
"List<PbcsJobDefinition> getJobs();",
"List<JobPostings> getByCompany_Id(int companyId);",
"List<Job> getAllJobsOfContext(JobContext context);",
"public List<Job> getJobs() {\n return jobList;\n }",
"@Transactional\r\n\tpublic All... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
As this is a a longlived object, please pass application context only (don't pass activity or service context). | public static FormsDao getInstance(Context applicationContext) {
if (instance == null) {
instance = new FormsDao(applicationContext);
}
return instance;
} | [
"public Object get_context() { return this.context; }",
"Context getContext() {return context;}",
"LibGDXReciever(Context context){\n myContext = context;\n }",
"@Override\n public void onAppContextOwnershipLoss(int context) {\n }",
"public Context getContex (){ return getApp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void start(Stage arg0) throws Exception {
} | [
"@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"
]
]
}
} |
Adds a new row to the Order table. | public void add(String cartId, Date orderDt, Date shipDt, String trackNm) {
fetcher.addOrder(cartId, orderDt, shipDt, trackNm);
} | [
"public void addToRow(TableRow row);",
"public void addRow();",
"public void addRow(_RowType addedRow);",
"public void addRow(Object[] rowData){\n\t\tmodel.addRow(rowData);\n\t\tmodel.fireTableDataChanged();\n\t}",
"void addOrder(OrderEntity order) throws DAOException;",
"public void insertRow() {}",
"@... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Birthday. Birthday or Anniversary day | public Timestamp getBirthday(); | [
"String getBirthDay();",
"public LocalDate getBirthday() {\n logger.debug(\"get date of Birthday of person\");\n return birthday;\n }",
"public Date getBirthDay() {\n\t\treturn this.birthDay;\n\t}",
"String getDateBirth();",
"public LocalDate getBirthday() {\n\t\treturn birthday;\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes a given command. After the command is executed, the redo stack will be made empty | public void executeCommand(Command command) {
if (getUndoStack().contains(command) || getRedoStack().contains(command))
throw new IllegalArgumentException("You cannot run the same command twice");
emptyRedoStack();
getUndoStack().add(command);
command.execute();
} | [
"public void invokeCommand(Command command){\n command.execute();\n\n if(command.canUndo()){\n historyList.add(command);\n } else {\n historyList.clear();\n }\n }",
"@Override\n public void redo() {\n this.mCommandHistory.redo();\n }",
"MoveComma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new object of this class, or null if it fails. | abstract Object newInstance(); | [
"private T createObject()\n {\n T newRef = null;\n\n try\n {\n //newRef = ((Class<T>)defaults.getClass()).newInstance();\n newRef = cls.newInstance();\n setDefaultValues(newRef);\n }\n catch(Exception e)\n {\n Tools.printLog(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns String representation of skip list | @Override
public String toString() {
StringBuilder sList = new StringBuilder();
for (int i = 0; i < maxLevel; i++) {
SLNode<E> list = head.links[i];
sList.append("Level " + i + ":");
while (list != null) {
if (list.data != null)
sList.append(list.data + ", ");
list = list.links[i];
}
sL... | [
"public String calcSkip() {\n\t\tif (genoj == null) return calcSkipSingle(); // Single variant\n\n\t\tcalcSkipPair(); // Pair of variants\n\t\treturn null;\n\t}",
"public Vector getSkipVector() {\n\t\tVector outVector = new Vector(mPatternLength);\n\n\t\tfor (int i = 0; i < mPatternLength; i++) {\n\t\t\toutVector... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check for enough armies | public boolean hasEnoughArmies(Territory attackerTerr, Territory opponentTerr, int numAttackerArmies,
int numOpponentArmies) {
logger.log(Level.INFO, "");
if (attackerTerr.getNumberOfArmies() <= numAttackerArmies) {
return false;
} else if (opponentTerr.getNumberOfArmies() < numOpponentArmies) {
re... | [
"boolean hasArmys();",
"private int calculateTurnArmies() {\n int armies = 0;\n armies += currentPlayer.getTerritories().size() / 3;\n\n if (armies < 3) {//minimum 3 armies\n armies = 3;\n }\n\n //code to check if the player gets bonuses from having an entire\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
accedi al nome del locale | public String getNome() {
return nome;
} | [
"Locale locale();",
"public abstract String getDisplayName(java.util.Locale locale_p);",
"String mo318a(Locale locale);",
"public static String getName(Locale l) {\n Locale english = Locale.ENGLISH;\n String name = l.getDisplayLanguage(english) + ' ' + l.getDisplayCountry(english) + ' ' + l.getV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constraint: (realvalue=REAL_LIT | symboliclabel=[Property|QEMREF] | others?='others') | protected void sequence_BranchValue(EObject context, BranchValue semanticObject) {
genericSequencer.createSequence(context, semanticObject);
} | [
"public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .hadoop.yarn.PlacementConstraintProto childConstraints = 2; | public Builder addChildConstraints(org.apache.hadoop.yarn.proto.YarnProtos.PlacementConstraintProto value) {
if (childConstraintsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildConstraintsIsMutable();
childConstraints_.a... | [
"yandex.cloud.api.k8s.v1.NodeOuterClass.PlacementPolicyOrBuilder getPlacementPolicyOrBuilder();",
"yandex.cloud.api.k8s.v1.NodeOuterClass.PlacementPolicy getPlacementPolicy();",
"protected void\n testPriorityPreemptionFromHighestPriorityQueueAndOldestContainer(String[]\n queues, String[] users) throws Exc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wait until no regions in transition. | boolean waitUntilNoRegionsInTransition(final long timeout)
throws InterruptedException {
// Blocks until there are no regions in transition. It is possible that
// there
// are regions in transition immediately after this returns but guarantees
// that if it returns without an exception that there was... | [
"public void blockUntilNoRegionsInTransition()\n throws KeeperException, InterruptedException {\n while (!recoverableZK.getChildren(rgnsInTransitZNode, false).isEmpty()) {\n Thread.sleep(100);\n }\n }",
"private void waitForAllRegionsAssigned() {\n while (getRegionCount() < 22) {\n // while... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Erzeugt das JLabel, das zu einem entsprechenden Fahrplaneintrag angezeigt werden soll. | public Component getListCellRendererComponent(
final JList<? extends Fahrplaneintrag> list,
final Fahrplaneintrag zug,
final int index, final boolean isSelected, final boolean cellHasFocus) {
JLabel result = new JLabel();
result.setFont(new Font("Monospaced", Font.PLAIN, 12));
if (this.gleisanzeige... | [
"private void initLabel(){\n label = new JLabel(\"X: \" + 0 + \" Y: \" + 0);\n label.setBounds(10, 600, 100, 100);\n label.setBackground(Color.red);\n label.setVisible(true);\n }",
"private void displayLabel() {\r\n this.processing.fill(0); // specify font color: black\r\n th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The maximum allowed recommitting time for a Pulsar transaction. | public int getMaxRecommitTimes() {
return maxRecommitTimes;
} | [
"public int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return 16;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }",
"public int getRefreshTimeMax() {\n return refreshTimeMax.get();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected byte[] doInBackground(Void... params) {
Bitmap bMap = imgDisplay.getCroppedImage();
return helper.getScaledPhoto(bMap, bMap.getHeight(),
bMap.getWidth());
} | [
"@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"
]
]
}
} |
In Util or Helper classes which have only static fields and methods, they should always have private constructors to enforce Noninstantiability. | private NonInstantiableUtilHelper() {
throw new AssertionError();
} | [
"private Utils() {\n // Prevent initialization\n }",
"private UtilityClass() {\r\n\t\tthrow new AssertionError(\"noninstant class!\");\r\n\t}",
"private Util() {\r\n throw new AssertionError();\r\n }",
"private Utils() {\n throw new IllegalStateException(\"Utility Class cannot be instan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the id for the chart. | public void setId(String id)
{
this.id = id;
} | [
"void setId(int id) {\n\t\t\n\t\tthis.id = id;\n\t}",
"private void setID(String path) {\n int p1 = Utils.getFormattedPath(path).lastIndexOf(File.separator);\n int p2 = Utils.getFormattedPath(path).lastIndexOf(\".\");\n String id = Utils.getFormattedPath(path).substring(p1 + 1, p2);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by Administrator on 2016/7/18 0018. | public interface Iservice {
public void callPlayMusic();
public void callPauseMusic();
public void callRePlayMusic();
public void callSeekToPosition(int position);
} | [
"@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}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"public void mo5201a() {\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ 1. Iterate through the length of array 2. Initialize an output variable 3. Perform XOR operation between the output and the input array values a) If both values are same, XOR will return 0 b) Else will return the sum. Time ==> O(n) Space ==> O(1) | private int findSingleNumber(int[] input) {
int output = 0;
for (int i = 0; i < input.length; i++) {
output ^= input[i];
}
return output;
} | [
"public int solution(int[] A) {\n int totalXor = 0;\n for (int i = 1; i <= A.length + 1; i++) {\n totalXor ^= i;\n }\n\n int missingTotalXor = 0;\n for (int i = 0; i < A.length; i++) {\n missingTotalXor ^= A[i];\n }\n\n return totalXor ^ missing... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the graph as distributed in the lab and returns all its edges. Presumes that the graph is on the classpath. | Iterable<Triple> fileFromClassPath(String name) throws IOException; | [
"Graph getGraph() throws Exception;",
"public static Graph readGraph(String filename) { return readGraph(filename, null) ; }",
"abstract protected Vector readEdges();",
"public void loadGraphFromFile() {\n\t\t// FIXME!\n\t}",
"private void readGraph() throws IOException {\r\n System.out.println(\"Ple... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor initializes the field. | AirportListControllerAsync() {
mAirportList = DataFactory
// Initialize the list of AirportInfo objects from the
// AirportList.txt file.
.getAirportInfoList("airport-list.txt");
} | [
"public Field()\n {\n super(\"field\");\n }",
"public FieldValue() {\n }",
"public Field() {\n\t\tthis(NONE, NONE);\n\t}",
"private FieldView() {\n }",
"public Field() {\n this(Level.MEDIUM);\n }",
"public DSTextField() {\n\t\tthis(0);\n\t}",
"public Composit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifying Current URL and Title of the page | public String landingPageRedirection() {
String url = driver.getCurrentUrl();
return url;
} | [
"public static void verifyPageTitle(){\n\t\t\n\t\tLogger logger=Logger.getLogger(\"Verify_Home_Page\");\n\t\tPropertyConfigurator.configure(\"Log4j.properties\");\n\t\t\n\t/*\tString currentTitle = driver.getTitle();\n\t\tString ExpectedTitle = \"WholeSaleHats: Home\";\n\t\t\n\t\tif(currentTitle.equalsIgnoreCase(Ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formulates one solr query connected with AND's and OR's ready to be used directly for retrieval from solr. | public String createSolrQuery() {
String solrQuery = "";
String query = "";
if(mikeywords.isEmpty() && mientities.isEmpty() && hashtags.isEmpty())
return solrQuery;
boolean first = true;
if(!mientities.isEmpty()) {
for(Entity entity : mientities) {
for(Keyword key : mikeywords)... | [
"public CombinedQuery getSolrQueryRecord()\n\t{\n\n\t\tCombinedQuery solrQuery = null;\n\t\t\n\t\tPattern p = Pattern.compile(\"url=http://([^/]*)/([^\\\\?]*\\\\?)(.*$)\");\n\t\tMatcher m = p.matcher(url);\n\t\tif (m.matches()) \n\t\t{\n\t\t\t//String host = m.group(1);\n\t\t\t//String path = m.group(2);\n\t\t\tStr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Places the data in this container and innitializes it. Complex tests are performed to detect existing datasources, while the remainder only include simplistic id checks. | public synchronized void load(DataDTO config) {
if (config == null) {
throw new NullPointerException("Non null DataDTO required for load");
}
// Step 0: dispose datastore and readers as needed
catalog.dispose();
//DataStoreCache.getInstance()... | [
"public void populateDS() {\n initCatalog();\n initCustomers();\n }",
"@Before\n public void initData() throws Exception {\n JndiDatabaseTester databaseTester = new JndiDatabaseTester(\"DBTodoList\");\n IDataSet initialDataSet = new FlatXmlDataSetBuilder().build(new FileInputStre... | {
"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.bodytracking_details_fragment, container, false);
addButton = view.findViewById(R.id.buttonAddWeight);
measureEdit... | [
"@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"
]
]
}
} |
Initialize your data structure here. | public TwoSum() {
this.map = new HashMap<>();
} | [
"@Override\n\tpublic void initData() {\n\n\t\t\n\t}",
"private void initializeData() {\n employees.put(1, \"Amos Burton\");\r\n employees.put(2, \"Julie Mao\");\r\n employees.put(3, \"Alex Kamal\");\r\n employees.put(4, \"James Holden\");\r\n employees.put(5, \"Josephus Miller\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches for equal elements in list1 and list2. It iterates through elements of source list (list1) and tries to find equal element in list2 with order saving. In each iteration it will iterate through elements of target list (list2) and its current list (list1), starting from the next index after the index of the prev... | public static int searchEqualLinesInOrder(List<String> list1, List<String> list2,
AtomicInteger nonMatchingSequencesCountOut) {
int firstPosition = 0;
int secondPosition = 0;
int lineMatchesCount = 0;
int lastMatchedSecondIndex = 0;
... | [
"public static int find(Node<Integer> list1, Node<Integer> list2) {\n Node<Integer> startPoint1 = list1;\n Node<Integer> startPoint2 = list2;\n\n Result res1 = getListLength(list1);\n Result res2 = getListLength(list2);\n if (res1.lastNode != res2.lastNode) {\n throw ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pide el menu comerciar. | public MenuComerciar getM1() {
return m1;
} | [
"public static void VypisMenu () {\n\t\t\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1. Scitani\");\n\t\tSystem.out.println(\"2. Odecitani\");\n\t\tSystem.out.println(\"3. Nasobeni\");\n\t\tSystem.out.println(\"4. Deleni\");\n\t\t\t\t\n\t}",
"public static void afficherMenu() {\n\n\t\tSystem.out... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//////////////////////////////////////////////////////////////////////////// BEGIN: DB Dispatch ////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// | public com.globalsight.cxe.entity.dbconnection.DBDispatch createDBDispatch(com.globalsight.cxe.entity.dbconnection.DBDispatch param1) throws com.globalsight.cxe.persistence.dbconnection.DBConnectionEntityException,java.rmi.RemoteException
{
return m_localReference.createDBDispatch(param1);
} | [
"public interface DBMain {\n\n /**\n * Reads a record from the database file.\n * \n * @param recNo The number for the record to be read.\n *\n * @return Returns an array where each element is a record value.\n *\n * @throws RecordNotFoundException If the record does not exist or had ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to ask the user if they want a balcony | public static boolean getUserHasBalcony() {
boolean userHasBalcony = false;
do {
try {
System.out.printf("Would you like a Balcony? True or False\n");
System.out.printf("Choice: ");
userHasBalcony = console.nextBoolean();
break;
} catch (InputMismatchException ime) {
System.out.print("Plea... | [
"public static boolean contPrompt() {\n \tSystem.out.println(\"If you want to solve another equation, type \\'y\\'\");\n \tString userInput = input.next();\n \treturn userInput.equalsIgnoreCase(\"y\");\n }",
"protected boolean customerWantsExtra(){\n String answer = getUserInput();\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set memory content internally | private void setMem(double val) {
memInUse = true;
memValue = val;
setMemLabel();
} | [
"protected void setContent(Buffer content) {\n this.content = content;\n }",
"void setMemoryInput(byte[] data);",
"public void setContent(java.nio.ByteBuffer value) {\n this.content = value;\n setDirty(4);\n }",
"@Override\n protected void moveDataToMem() {\n\n }",
"public void setMem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a integer, which length not bigger than 99, if the input of user is empty, use the default value | public static int readInt(int defaultValue) {
int input;
while (true) {
String str = readKeyBoard(2, true);
try {
input = str.length() == 0 ? defaultValue : Integer.parseInt(str);
break;
} catch (Exception e) {
System.ou... | [
"private int getInt(String value, int defaultValue) {\r\n \t\ttry {\r\n \t\t\treturn value.length() > 0 ? Integer.parseInt(value.trim()) : defaultValue;\r\n \t\t} catch (NumberFormatException e) {\r\n \t\t\treturn 0;\r\n \t\t}\r\n \t}",
"public int convertStringInputToInt() {\n\n int numb = -999;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true iff this record is a UI event by sniffing the 'duration' field. | public static final native boolean isUiEvent(EventRecord data) /*-{
return data.hasOwnProperty('duration');
}-*/; | [
"boolean hasEventDurationMs();",
"public boolean hasDuration() {\n return ((bitField0_ & 0x00000800) == 0x00000800);\n }",
"boolean hasFrameDurationInSeconds();",
"public boolean hasDurationSeconds() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"boolean hasTimeStepDura... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the offsetWidth element property. | static final int getOffsetWidth(Element elem) {
return elem.getPropertyInt("offsetWidth");
} | [
"public int width() {\n\t\tObject o = valueForBinding( \"width\" );\n\t\treturn USUtilities.integerFromObject( o );\n\t}",
"int getWidthOffsetCount();",
"public int getWidth() {\n return width_;\n }",
"public double get_Width() {\n\t\treturn width;\r\n\t}",
"public String getWidth() {\n return th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onClick(View v)
{
dialog.dismiss();
} | [
"@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"
]
]
}
} |
Create a new StatsD client communicating with a StatsD instance on the specified host and port. All messages send via this client will have their keys prefixed with the specified string. The new client will attempt to open a connection to the StatsD server immediately upon instantiation, and may throw an exception if t... | public DisruptorStatsDClient(final String prefix, final String hostname, final int port, final String... constantTags) throws StatsDClientException {
this(prefix, hostname, port, Integer.MAX_VALUE, constantTags, null);
} | [
"public StatsDClientBase(String prefix, String hostname, int port, Map<String, String> defaultDimensions,\n StatsDClientErrorHandler errorHandler) throws StatsDClientException {\n if(prefix != null && prefix.length() > 0) {\n this.prefix = String.format(\"%s.\", prefix);\n } else... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
devuelve true si ya se ha agregado al ultimo vehiculo | public boolean agregarVehiculo(){
return (capacidadMaxima == ++totalEspacioOcupado);
} | [
"public Boolean esGroso() {\n return (this.habilidadJugador() > equipo.promedioEquipo()) && velocidadDeJugador() > escoba.getVelocidadPorDefecto();\n }",
"public boolean estaVacia(){\n\t\treturn (cant==0);\n\t\t\n\t}",
"public boolean filaVazia(){\n\n return primeiro -1 == ultimo;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Time constructor with just start time | public Time(int startHour, int startMinute, int startSecond) {
this.startHour = startHour;
this.startMinute = startMinute;
this.startSecond = startSecond;
seconds = 1;
shiftNum = 0;
} | [
"public Time (Time time)\n {\n this(time.hour, time.minute, time.second);\n }",
"public Time() {\r\n\t\t\r\n\t}",
"public Time() {\n this.hours = 0;\n this.minutes = 0;\n this.seconds = 0;\n }",
"public Task(int time, int start) {\n this.time = time;\n this.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks if the currentStudent has a value and if removing the currentStudent is successful or gives an error of 1. It then sets the currentStudent to null and returns either 0 or 1. | public int Unenroll()
{
if(currentStudent != null && sList.remove(currentStudent) == 0)
{
currentStudent = null;
return 0;
}
else
{
currentStudent = null;
return -1;
}
} | [
"@Override\n\tpublic boolean removeStudentByStudentID(String student_id) throws Exception {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void deleteStudent() {\n\t\tstu = null;\r\n\t}",
"public boolean unplaceStudent(Student student) {\n informHeadMaster(student);\n \treturn studentsList.remove(st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |