query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Set up a new game by putting all the pieces on the view | private void setupNewGame() {
gui.setMessage("New Game");
endGame();
// set up the black pieces
for (int ii = 0; ii < STARTING_ROW.length; ii++) {
chessBoardSquares[0][ii].setIcon(new ImageIcon(
GUI.chessPieceImages[BLACK][STARTING_ROW[ii]]));
}
... | [
"public void newGame(){\n\t\tPlayer1 = false;\n\t\tfor (int i = 0; i < 3; i++){\n\t\t\tfor (int j= 0; j < 3; j++){\n\t\t\t\ttttArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tfl.removeAllViews();\n\t\tfl.addView(new Grid(fl.getContext()));\n\t}",
"private void newGame() {\n try {\n hideCompletion();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the page no. | public int getPageNo() {
return pageNo;
} | [
"public String getPageNo() {\n\t\treturn pageNo;\n\t}",
"public int getPageNumber() {\n return this.pageNum;\n }",
"public Integer getPageNum() {\n return pageNum;\n }",
"public java.lang.Integer getPageNumber() {\n return PageNumber;\n }",
"public int getPage() {\n return pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
startActivity(new Intent(getBaseContext(), LogActivity.class));
} | [
"@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"
]
]
}
} |
Return the arguments for the embedded connection. | public Map<String, Object> getArguments()
{
if (arguments == null)
{
return null;
}
else if (arguments.isEmpty())
{
return null;
}
else
{
return new HashMap<>(arguments);
}
} | [
"public Map<String, Object> getConnectionArguments() {\n URL url = getUrl();\n Map<String, Object> arguments = new HashMap<>();\n arguments.put(\"host\", url.getHost());\n arguments.put(\"port\", url.getPort());\n arguments.put(\"scheme\", url.getProtocol());\n arguments.put(\"SSLSecurityProtocol\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Coordinate__Group_0__3" $ANTLR start "rule__Coordinate__Group_0__3__Impl" InternalLevelDesign.g:2153:1: rule__Coordinate__Group_0__3__Impl : ( ( rule__Coordinate__RowAssignment_0_3 ) ) ; | public final void rule__Coordinate__Group_0__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalLevelDesign.g:2157:1: ( ( ( rule__Coordinate__RowAssignment_0_3 ) ) )
// InternalLevelDesign.g:2158:1: ( ( rule__Coordinate__RowAssi... | [
"public final void rule__XAssignment__Group_0__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:10131:1: ( rule__XAssignment__Group_0__3__Impl )\n // InternalOcelet.g:10132:2: rule__XAssignment__Group_0__3__Impl\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by on 15/12/7. | public interface PasswordValidator {
/**
* 验证密码是否有效
*
* @param password
* @return true如果有效,否则false
*/
boolean isValid(String password);
} | [
"@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\n }",
"protected void method_5557() {}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
First create a graph that starts with a single parent, and expands out 2x each layer. | @Test
public void testWritable() throws Exception {
int curId = 0;
CategoryGraph graph = new CategoryGraph();
Category headCat = new Category("cat-" + curId++);
graph.add(headCat);
for (int depth = 1; depth < 4; depth++) {
for (Category terminal : graph.f... | [
"private void setParent(){\n head.setParent(this);\n forelimb.setParent(this);\n hindLimb.setParent(this);\n tail.setParent(this);\n }",
"private void make(int[][] grid, TreeNode parent) {\n\t\t try {\r\n\t\t grid[parent.row][parent.column] = -1;\r\n\t\t }\r\n\t\t catch(ArrayIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public PageNation selctUsersCheckIn(PageNation pageNation) {
Integer row =Integer.parseInt((String)pageNation.getRows().get(0)) ;
pageNation.setPage((pageNation.getPage()-1)*row);
pageNation.setRow(row);
pageNation.setTotal(checkInMapper.selectAllCheckInByUsersIdCount(pageNation));
pageNation.setRo... | [
"@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"
]
]
}
} |
Two missions: 1) Creates and returns the xmof configuration model (ie configuration objects + parameter values) 2) Also prepares the configuration map (later accessed using "getConfigurationMap") | public XMOFBasedModel loadXMOFBasedModel() {
// Get the provided model to execute
Collection<EObject> inputModelElements = loadInputModelElements();
// Get the parameters (with refs to provided model)
List<ParameterValue> inputParameterValues = loadInputParameterValueElements();
// Gets all objects referen... | [
"protected void autoConfigure() {\n try {\n boolean mpp = getProperties().getPropertyBoolean(\"General.MPP\", false);\n \n String terminationConditionClassName = getProperties().getProperty(\"Termination.Class\",(mpp?\"net.sf.cpsolver.ifs.termination.MPPTerminationConditi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute the thickness of a single layer, ignoring the repeat attribute. | public static double computeSingleLayerThickness(Element node) throws JDOMException
{
if ( node.getName() != "layer" )
{
throw new JDOMException("LayerCompactCnv.computeLayerThickness() takes layer element, not " + node.getName() );
}
double thickness = 0.0;
... | [
"public int getThickness() {\n\t\treturn thickness;\n\t}",
"public int getLayerWidth() throws YAPI_Exception\n {\n return get_layerWidth();\n }",
"@Override\r\n\tpublic final int getWidth() {\n\t\tint maxWidth = 0, maxOff = 0;\r\n\t\tfor (final FontLayer layer : layers) {\r\n\t\t\tmaxWidth = Math.m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deposit a certain amount on an account | AccountResponse deposit(final Long id, final Double amount); | [
"void deposit(String accountType, String amount, Principal principal);",
"public void deposit( double amount )\r\n {\r\n balance += amount;\r\n }",
"public void deposit(double amt){\n this.balance = this.balance + amt;\n }",
"public void deposit(double amount){\n balance += amount;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use AreaMapLatestVersionLine.newBuilder() to construct. | private AreaMapLatestVersionLine(com.google.protobuf.GeneratedMessageLite.Builder builder) {
super(builder);
} | [
"public MyBusinessUnitAssociateDraftBuilder version(final Long version) {\n this.version = version;\n return this;\n }",
"public List<OmKeyLocationInfo> getBlocksLatestVersionOnly() {\n return new ArrayList<>(locationVersionMap.get(version));\n }",
"public com.google.protobuf.ByteString\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CAMBIO DE CODIGO ////////////////// M E T O D O S //////////// | public void setListaClientes(ArrayList<Cliente> listaClientes) {
this.listaClientes = listaClientes;
} | [
"void codCursoCapes();",
"public synchronized String getCode() {\n\n int len = 4;\n int max4Reset = 9999;\n String df;\n String aux;\n\n df = sdf.format(new Date());\n\n /* Armamos codigo */\n aux = ccode + df + lpad(\"\" + conta, \"0\", len);\n\n /* Increme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to set the number of scoops | @Override
public void setNumberOfScoops(int n){
this.numberOfScoops = n;
} | [
"public void setNumberOfSessions(jprime.variable.SymbolVariable value);",
"public void setCount(int count);",
"public void setNumStars() {\r\n\t\tint roll = GlobalManager.d100Roll();\r\n\r\n\t\tif (roll > THRESHOLD3) {\r\n\t\t\tthis.numStars = 3;\r\n\t\t\tthis.levelUp.update(2, 1);\r\n\t\t\tthis.notifyStarAttri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Just a constructor to call super. | protected ListController(Pane pane) {
super(pane);
} | [
"public Jeroo() {super();}",
"public MyClass(){\n\t\tsuper();\n\t}",
"private O()\r\n {\r\n super();\r\n }",
"Cokolady()\t{\r\n\t\tsuper();\r\n\t}",
"public sundae() {\n\t\tsuper(); // calls the super default constructor\n\t}",
"public Curso() {\n\t\tsuper();\n\t}",
"public lend... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
finds all of the quadnominal x variables. called after multiplication | public static double countX4(String s)
{
String equation[]= s.split("\\s*\\+\\s*");
double toReturn=0;
for(String varName: equation)//yay enhanced for loop
{
if((varName.contains("x^4"))) //if it does not contain an x
{
if(varName.equals("x^4")... | [
"public void findVariablesExtrema() {\n\t\tGlpkSolver solver = (GlpkSolver)rationalCSP.cspSolver; \n\t\tGlpkVarBlock vars = (GlpkVarBlock)rationalCSP.varBlock;\n\t\tint[] ind = new int[1];\n\t\tdouble[] val = new double[1];\n\t\t\n\t\trationalCSP.startSearch();\n\n\t\t//Find min and max for each variable\n\t\tfor (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A setter for freezes | public void setFreezes(ArrayList<String> freezes) {
this.freezes = freezes;
} | [
"public void freeze() {\n mFrozen = true;\n }",
"public final void setAsync(final boolean value)\n {\n asyncValue = value;\n }",
"public synchronized void setBlocking(boolean isit)\n\t{\n\t\tblocking=isit;\n\t}",
"void bombsetter(){\n\t\tthis.bombpresnet=true;\n\t}",
"public void freeze() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the value defined for a variable.Throws invalid parameter exception if no matching variable found. | public String getVariable(String varName) {
String varValue = myBean.getVarValue(varName);
if (varValue == null) {
throw new RuntimeException("Input variable \"" + varName + notFound);
}
return varValue;
} | [
"Integer getVarValue(Object name, Integer def);",
"Object getVarValue(Object name);",
"public Object getVariable(String param) {\n\t\treturn variables.get(param);\n\t}",
"@Test\n public void testCaseTaskGetVariableTyped() {\n // given\n testRule.createCaseInstanceByKey(CASE_KEY, getVariables());\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize all the components and variables required for the measurement | private void initEnvironmentComponents() throws IOException{
testDownloadFileURL = new URL(fileUrl);
httpConn = (HttpURLConnection) testDownloadFileURL.openConnection();
bis = null;
fos = null;
testDownloadFile = new File(context.getFilesDir() + "/tmp/testfile");
if (te... | [
"public void initialize() {\n updateHumedad();\n updateAC();\n updateHumidificador();\n updateEstufa();\n updateTemperatura();\n }",
"private void init() {\n\t\tinitDisplay();\n\t\tinitGL();\n\t\tinitVars();\n\t}",
"protected void initialize() {\r\n currentAccelerati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used a solution from Geeks for Geeks | @RequestMapping("/reverse")
public String reverse(@RequestParam String sentence){
StringBuilder stringBuilder = new StringBuilder();
// append a string into StringBuilder input1
stringBuilder.append(sentence);
// reverse StringBuilder input1
stringBuilder = stringBuilder.r... | [
"private static void EX5() {\n\t\t\r\n\t}",
"public void mo28221a() {\n }",
"protected void mo4791d() {\n }",
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"public static void Q22()\r\n\t{\r\n\t}",
"public void mo17751g() {\n }",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Intent intent = new Intent(this.parent, homepage.class); for now, we know parent is a 'homepage', so its ok to cast as such | @Override
protected void responseAction(){
final homepage current = (homepage)parent;
if (jsonResponse!=null){
System.out.println("jsonResponse: not null");
}
else{
System.out.println("Null Response");
}
... | [
"private void homeAluno(){\n Intent intent = new Intent(this,AlunoHomeActivity.class);\n super.startActivity(intent);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, HomeScreenActivity.class);\n startActi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This gets the power usage of a application. | protected double getTotalPowerUsage(String applicationName, String deploymentId) {
double answer = 0.0;
List<ApplicationOnHost> tasks = modeller.getApplication(applicationName, Integer.parseInt(deploymentId));
if (tasks == null) {
return answer;
}
for (CurrentUsageRec... | [
"public double powerUsage() {\n double scale = (getCPUUsed() / capacityCPU);\n if (scale <= Progress.EPSILON) {\n return idle;\n }\n else {\n return ((capacityCPU-idle) * scale) + idle;\n }\n }",
"public Float getAppCpuUsed() {\n return appCpuUsed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the actual timestamp that the transaction was entered on. | public Date getTimestamp() {
return timestamp;
} | [
"public long getTransactionTimestamp() {\n return transactionTimestamp;\n }",
"public long getTransactionTimestamp() {\n return transactionTimestamp;\n }",
"public final long getTimestamp() {\r\n\t\treturn this.timestamp;\r\n\t}",
"public long getTimestamp() {\r\n return timestamp;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void init(FilterConfig filterConfig) throws ServletException {
} | [
"@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 the 'Ifc Document Status Enum' literal with the specified literal value. | public static IfcDocumentStatusEnum get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
IfcDocumentStatusEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
} | [
"IfcDocumentStatusEnumType createIfcDocumentStatusEnumType();",
"String asEnumConstant();",
"public BoundCodeDt<DiagnosticReportStatusEnum> getStatusElement() { \n\t\tif (myStatus == null) {\n\t\t\tmyStatus = new BoundCodeDt<DiagnosticReportStatusEnum>(DiagnosticReportStatusEnum.VALUESET_BINDER);\n\t\t}\n\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
binding = FragmentIncomingProductionOverviewDoneBinding.inflate(inflater, container, false);
return binding.getRoot();
} | [
"@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"
]
]
}
} |
List of Subject Alternate names. repeated .envoy.admin.v3.SubjectAlternateName subject_alt_names = 3; | public Builder addSubjectAltNames(
io.envoyproxy.envoy.admin.v3.SubjectAlternateName.Builder builderForValue) {
if (subjectAltNamesBuilder_ == null) {
ensureSubjectAltNamesIsMutable();
subjectAltNames_.add(builderForValue.build());
onChanged();
} else {
subjectAltName... | [
"java.util.List<? extends io.envoyproxy.envoy.admin.v3.SubjectAlternateNameOrBuilder> \n getSubjectAltNamesOrBuilderList();",
"io.envoyproxy.envoy.admin.v3.SubjectAlternateNameOrBuilder getSubjectAltNamesOrBuilder(\n int index);",
"private static Collection<String> getSubjectAltNames(\n Col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configs class, which is no need to be instance. | private Configs() {
} | [
"private Config() {\r\n\t}",
"private Config() {\n init();\n }",
"protected Config()\r\n\t{\r\n\t}",
"public Config() {\n }",
"public Config()\r\n\t{\r\n\t}",
"public ConfigManage() {\r\n\t\tsuper();\r\n\t}",
"public RegelConfig() {\r\n\t\tself = this;\r\n\t}",
"public Class configCla... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scans characters in the source file for a String literal. Escaped characters are converted; e.g., '\t' is converted to the tab character. Assumes that source.getChar() is the opening quote (") of the String literal. | private String scanStringLiteral() throws ScannerException, IOException
{
InternalAssertion.check(((char) source.getChar()) == '\"',
"scanStringLiteral(): check for opening" + " quote (\") at position"
+ getPosition());
clearScanBuffer();
do
{
... | [
"@Override\r\n\tpublic Object visitSource_StringLiteral(Source_StringLiteral source_StringLiteral, Object arg) throws Exception {\n\t\tmv.visitLdcInsn(source_StringLiteral.fileOrUrl);\t\r\n\t\treturn null;\r\n\t}",
"private void tokenize() throws CableException\n\t{\n\t\tint length = mSource.length();\n\t\tint in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets all image metadata of a specific product. Use this to get all image URLs of a product. | public static ProductImage[] getProductImages(PLYRestClient client, String gtin) {
String url = "/product/" + gtin + "/images";
ResponseEntity<ProductImage[]> response = client.exchange(url, HttpMethod.GET, ProductImage[].class,
null);
return response.getBody();
} | [
"@Override\r\n\tpublic List<Product> getAllProductDetails() throws ProductException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn (List<Product>) dao.findAll();\r\n\t}",
"public List<Product> getAllProduct(){\n\t\treturn productRepository.findAll();\n\t}",
"public static Map<String, ArrayList<String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is to fill city dropdown and is called in onCreate | public void fillCityDropDown() {
// ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.select_dialog_item,
// cities){
// @SuppressLint("ResourceAsColor")
// @Override
// public View getView(int position, View convertV... | [
"public void startSelectCity() {\n BigwinerApplication.mApp.startSelectView(mUserInfoActivity, BigwinerApplication.mApp.ports, mUserInfoActivity.getString(R.string.company_edit_city_hit), UserInfoActivity.ACTION_CITY_SELECT, true, true,1);\n }",
"private void fillCityChoiceBox() throws SQLException, Exc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("Key " + k); System.out.println("Value " + v); | private static void mapAvroSchemas(String node, Triplet transformedTuple) {
} | [
"public String toString() { return \"(\" + k + \",\" + v + \")\"; }",
"@Override\r\n public String toString(){\r\n return \"Key: \" + key + \" Value: \" + value;\r\n }",
"private void printKV(String key, String val) {\n\t\t\tif (key.startsWith(\"<http://www.rdfabout.com/rdf/usgov/sec/i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/////////////////////////////////////////////////////////////// / / Overrides paintComponent to add our custom shape / /////////////////////////////////////////////////////////////// | public void paintComponent(Graphics g)
{
super.paintComponent(g);
Graphics2D graphic = (Graphics2D) g;
//Draw side of cylinder
int[] rectValues = compute.sideOfCylinderDim();
// 0: x value
// 1: y value
// 2: width
//... | [
"@Override\n\tpublic void drawShape() {\n\t\t\n\t}",
"@Override\r\n\tpublic void addShape(Shape shape) {\n\t\t\r\n\t}",
"public void drawThisShape()\n {\n this.layer.beginDraw();\n this.layer.colorMode(HSB);\n if (isDrawing)\n {\n this.layer.beginShape();\n this.layer.strokeWeight(this.sW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get how much the map should move down based on the player's speed | public int getMapDown(){
return (int)(speed/divideBy);
} | [
"private int getSpeed()\n {\n if (getY() < 132 || (getY() > 220 && getY() < 308))\n {\n if (MyWorld.level == 1) return Math.abs(speed);\n if (MyWorld.level == 2) return -(Math.abs(speed));\n }\n else\n {\n if (MyWorld.level == 1) return -(Math.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string accept = 5; | public boolean hasAccept() {
return ((bitField0_ & 0x00000008) == 0x00000008);
} | [
"public void setAccept(String accept);",
"public String getAccept();",
"java.lang.String getAccept();",
"public String getAccept() {\n return accept;\n }",
"public void setAccept(ArrayList<String> accept) {\n\t\tthis.accept = accept;\n\t}",
"boolean canAccept(int length);",
"public void accept... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an element from array | @Override
public T get(int index)
{
Object value;
if(index <= 0 || index > size()) value = null;
value = values[index];
return (T)value;
} | [
"@SuppressWarnings(\"unchecked\")\n public static <E> E getElement(E[] arr, long offset) {\n return (E) UNSAFE.getObject(arr, offset);\n }",
"public E get(int i) {\n return array[i];\n }",
"public final native int getElement(int[] arr, int index);",
"Object getElementAt(int index);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a reference to a class element definition. As3: Button Java: Button.class ObjC: [Button class] | Expression createElementTypeReferenceExpression(TypeToken type); | [
"OntoUML.Class createClass();",
"public String clearButtonClass() {\n\t\tif (_clearButtonClass == null) {\n\t\t\t_clearButtonClass = valueForStringBinding(Keys.clearButtonClass, \"Button ObjButton ClearUploadObjButton\");\n\t\t}\n\t\treturn _clearButtonClass;\n\t}",
"public static _class of( String classDef){\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ noarg constructor is not terribly interesting | @Test(enabled = true) // groups = "functional")
public void test1()
{
Range r0a = new Range(5, 5);
Range r0b = new Range(6, 8);
Range r0c = new Range(5, 7);
Range r0d = new Range(5, 8);
Range r0e = new Range(5, 6);
Range r1 = new Range(10, 80);
Range r1a = new Range(10, 100);
Range... | [
"public abstract T constructor();",
"public Constructor_Concept(){\n System.out.println(\"This is constructor with no argument\");\n\n }",
"ThisConstructor(){\n\t\tSystem.out.println(\"I am not argument constructor\");\n\t}",
"T construct();",
"public ConstructorEmpty() {}",
"private O()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Throw exception if paragraph embedding level is invalid. Special allowance for 1 so that default processing can still be performed when using this API. | private static void validateParagraphEmbeddingLevel(byte paragraphEmbeddingLevel) {
if (paragraphEmbeddingLevel != -1 &&
paragraphEmbeddingLevel != 0 &&
paragraphEmbeddingLevel != 1) {
throw new IllegalArgumentException("illegal paragraph embedding level: " + paragraphEmbeddingLevel)... | [
"private void validate(int p) {\n int n = parent.length;\n if (p < 0 || p > n) {\n throw new IllegalArgumentException(\"Index \" + p + \"is not between 0 and \" + (n-1));\n }\n }",
"public InvalidParticleException(String err)\r\n\t\t {\r\n\t\t super(err);\r\n\t\t }",
"@T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to register an arena if not registered, just adds it to the list | public static CPlayer getCrackedPlayer(Player player) {
for(CPlayer p : players){
if(p.name.equalsIgnoreCase(player.getName()))
return p;
}
return null;
} | [
"public void addArena(@NotNull Arena arena) {\n arenas.add(arena);\n }",
"public void register(){\n\t\tmap.addUnit(this);\n\t\towner.addUnit(this);\n\t}",
"private void loadArenas() {\n\t\tif(instance.getArenaManager() == null) {\n\t\t\tinstance.setArenaManager(this);\n\t\t}\n\t\t\n\t\tfor(String aren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public String getTableName(int column) throws SQLException {
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"
]
]
}
} |
Returns whether the two mobs share ANY common clans, even nonrivalrous ones. | public boolean isAnyCommonClan(MOB M1, MOB M2); | [
"private boolean containSameCars(State startState, State endState) {\r\n\tList<Car> startCars = startState.getAllCars();\r\n\tList<Car> endCars = endState.getAllCars();\r\n\t// the lists startCars/endCars will never contain duplicates (condition imposed by the HashBiMap)\r\n\treturn startCars.size() == endCars.size... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void applyShape(Region shape)
{
log();
} | [
"@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"
]
]
}
} |
$ANTLR end "entryRuleOperator" $ANTLR start "ruleOperator" InternalMyDsl.g:1562:1: ruleOperator returns [EObject current=null] : ( ( (lv_equalTo_0_0= '==' ) ) | ( (lv_largerThan_1_0= '>' ) ) | ( (lv_smallerThan_2_0= '=' ) ) | ( (lv_smallerOrEqualTo_4_0= '<=' ) ) | ( (lv_notEqualTo_5_0= '!=' ) ) ) ; | public final EObject ruleOperator() throws RecognitionException {
EObject current = null;
Token lv_equalTo_0_0=null;
Token lv_largerThan_1_0=null;
Token lv_smallerThan_2_0=null;
Token lv_largerOrEqualTo_3_0=null;
Token lv_smallerOrEqualTo_4_0=null;
Token ... | [
"public final String entryRulecomparison_operator() throws RecognitionException {\r\n String current = null;\r\n\r\n AntlrDatatypeRuleToken iv_rulecomparison_operator = null;\r\n\r\n\r\n try {\r\n // ../org.xtuml.bp.xtext.oal/src-gen/org/xtuml/bp/xtext/oal/parser/antlr/internal/Inter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method sets the value of the database column dwpas_c_prd_dim.dim5_in_value | public void setDim5InValue(BigDecimal dim5InValue) {
this.dim5InValue = dim5InValue;
} | [
"public void setINDIMD(BigDecimal newvalue) {\n fieldINDIMD.setBigDecimal(newvalue);\n }",
"public void setValue(int dimension, double newValue);",
"public void setValue(double value_in){\n\t\tvalue = value_in;\n\t}",
"public void setLocationValueAt(int dim, int value){\n\t\tvalue = Math.max(Math.mi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retorna el id de la succursal a la que corresponde la bodega | public long getSucursal(); | [
"public Integer seguridadId() {\r\n\t\tInteger id = 0;\r\n\t\ttry {\r\n\t\t\tList<SegRegistroEmergencia> ls = this.findAllseguridad();\r\n\t\t\tif (ls == null || ls.size() == 0) {\r\n\t\t\t\tid = 1;\r\n\t\t\t} else {\r\n\t\t\t\tid = ls.size() + 1;\r\n\t\t\t}\r\n\t\t\treturn id;\r\n\t\t} catch (Exception e) {\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Process a message with goods offer | private void processOffer(Message msg) throws JMSException {
// TO-DONE (for the REGEX CHECK LATER)
// parse the message, obtaining sender's name and list of offered goods
MapMessage offerMessage = (MapMessage)msg;
String senderName = offerMessage.getStringProperty(SELLER_NAME);
@SuppressWarnings("unchecke... | [
"@Override\n public void processMessage(AuctionMessage auctionMessage) {\n if(auctionMessage.getHeader().equals(\"auction_round\")){\n\n\n String winningOffer = auctionMessage.getValueForContext(\"winning_offer\");\n\n String offer = getAuctionOffer(winningOffer);\n\n Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the object, not a Node | public int size(); | [
"public Node getObject() { return object ; }",
"public Node getObject() {\n\t\treturn object;\n\t}",
"public Object getObject()\n {\n if (currentNode == null)\n \t return null;\n else\n return currentNode.getObject();\n }",
"public ObjectNode getObjectNode() {\n\t\treturn objectNode;\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of variables declaration//GENEND:variables | private boolean validateView() {
boolean validate = !(texId.getText().equals("")
|| texName.getText().equals("")
|| texIdCity.getText().equals("")
/** || (jchDate.getDate() == null)*/
|| texPrice.getText().equals("")
|| texIdProduct... | [
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initVariable() {\n\t\n\t}",
"public void mo17751g() {\n }",
"public void mo1857d() {\n }",
"public static void Q22()\r\n\t{\r\n\t}",
"public void mo28221a() {\n }",
"public void mo3914b() {\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns first element in queue | @Override
public Object peek() {
Object element = null;
if (elements.size() > 0)
element = elements.get(0);
return element;
} | [
"public QueueableItem getFirst()\n {\n synchronized (queue)\n {\n if (queue.size() > 0)\n {\n return queue.get(0);\n }\n return null;\n }\n }",
"public int getFirstQueue() {\n if(queue.isEmpty()){\n return-1;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the name of the tiff worldfile. | private void parseWorldFile() throws Exception
{
String name = worldFileName();
// Read the tags from the tiff worldfile.
List lines = FileUtil.getContents(name);
double[] tags = new double[6];
for (int i = 0; i < 6; i++)
{
String line = (String) lines.get(i);
tags[i] = ... | [
"public String getName() {\n\t\treturn file.getPath();\n\t}",
"public String getName() {\n\t\tString name = \"\";\n\n\t\tif (null != location)\n\t\t{\n\t\t\tname = Paths.get(location).getFileName().toString();\n\t\t}\n\n\t\treturn name;\n\t}",
"public String getWorldName()\n {\n return this.otgDimWorl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends the message with the jsonmessage extension to the destination indicated by the to contact. | public void sendJsonMessage(String json)
throws OperationFailedException {
MessageBuilder messageBuilder = StanzaBuilder.buildMessage()
.addExtension(new JsonMessageExtension(json));
sendMessage(messageBuilder);
} | [
"public void sendMessage(final Object toJsonify) {\r\n\t\tif (toJsonify instanceof String) {\r\n\t\t\tthis.sendMessage((String) toJsonify);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.sendMessage(this.gson.toJson(toJsonify));\r\n\t}",
"private void sendToJS(Object toSend) throws JsonProcessingException {\n Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fin del constructor por defecto | public int getFecha() {
return this.fecha;
} | [
"private Abierto(){}",
"public Cachorro() {\r\n }",
"public Levyt(){\n\t\t\t//oletus muodostaja\n\t\t}",
"Sorpresa() {\n }",
"protected Turista() {\n\t}",
"public BilletajeCajero() {\n }",
"public DeteccionCaidas() {}",
"public Direccion() {\n\t\t\n\t}",
"public Curso(){\n \n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Data retention period (at least greater than 0) | public Long getDataRetentionDays() {
return this.DataRetentionDays;
} | [
"public int getRetentionPeriod()\n {\n return (appenderConfig.getRetentionPeriod() != null)\n ? appenderConfig.getRetentionPeriod().intValue()\n : KinesisConstants.MINIMUM_RETENTION_PERIOD;\n }",
"public int getRetentionDays() {\n return this.retentionDays;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by hxz on 2016/12/8. | public interface IdbMovieBiz {
/**
获取近期热映的电影
count 单页数
start 开始个数
*/
@GET("movie/in_theaters")
Call<MovieList> getInTheaters(@Query("count") int count, @Query("start") int start);
/**
*获得即将上映电影
* @param count
* @param start
*/
@GET("movie/coming_so... | [
"@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\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for CategoryId, using the alias name CategoryId. | public Number getCategoryId() {
return (Number)getAttributeInternal(CATEGORYID);
} | [
"public BigDecimal getCatId() {\n // Add any custom logic you wish to perform in this getter here.\n return (BigDecimal) getAttributeInternal(CATID);\n }",
"public Property getProperty(int categoryId) {\r\n return properties[categoryId];\r\n }",
"public List<Attribute> findByC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to compute the best leastsquares plane that results in the smallest displacement of the vertices that resolves the overlap. Following the procedure outlined in detail in: Y. Kallus, V. Elser, and S. Gravel, "Method for dense packing discovery," Physical Review E, vol. 82, no. 5, Nov. 2010. The set S is defined... | public Vector3D[] findDisplacementsToResolve(boolean apply) {
if (r1 == null || r2 == null) throw new RuntimeException("Regular " +
"tetrahedra r1 and r2 haven't been initialized. Please " +
"initialize them by calling the appropriate constructor or " +
"setter me... | [
"@Override\n\tpublic Bounds closestIntersection( Bounds[] boundsObjects) {\n\n\tif( boundsObjects == null || boundsObjects.length <= 0 ) {\n\t return null;\n }\n\n\tif( boundsIsEmpty ) {\n\t return null;\n\t}\n\n\tdouble dis,far_dis,pdist,x,y,z,rad_sq;\n\tdouble cenX = 0.0, cenY = 0.0, cenZ = 0.0;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface to handle navigation from bookmarks fragment to Guides Page Method implementation in BookmarksFragment | public interface GuideNavigationInterface {
/**
* This method will invoke fragment manger in bookmarks fragment to navigate the user to Guides Page
*/
public void navigateToGuideFragment();
} | [
"public interface FragmentBookmarkListener {\n // TODO: Update argument type and name\n void onFragmentAddBookMark(String tab);\n }",
"public interface OnBookmarkClickListener {\n void onItemClick(Viewpoint viewpoint);\n }",
"private void onBookmarkClick() {\n BookmarksDialogFragment... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
String arr[] = data.split(" "); String tittle = LoginPage.validatepageTittle(); Assert.assertEquals(tittle, "IAGCSS Login"); | @Test(priority = 2, dataProvider = "data-provider", dataProviderClass = DataProviderClass.class)
public void AdminLogin(String data) throws InterruptedException, IOException {
loginPage LoginPage = new loginPage();
LoginPage.login(data,data); // Passing the values from exls file using POI
Thread.sleep(200... | [
"public static void verify_tittle(String str) {\r\n\t\t\ttry {\r\n\t\t\t\tString title = driver.getTitle();\r\n\t\t\t\tif (title.equalsIgnoreCase(str))\r\n\t\t\t\t\tSystem.out.println(\"login succuss\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\"login is not succuss-full\");\r\n\t\t\t} catch (Exception e) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .com.kedacom.ops.flink.etl.proto.DssNetAddr RcvAddr = 3; | public java.util.List<? extends com.kedacom.ops.flink.etl.proto.Dssevstruct.DssNetAddrOrBuilder>
getRcvAddrOrBuilderList() {
return rcvAddr_;
} | [
"public java.util.List<java.net.InetAddress> resolveInetAddresses(java.lang.String r3) {\n /*\n r2 = this;\n boolean r0 = com.bytedance.common.utility.C6319n.m19593a(r3)\n r1 = 0\n if (r0 != 0) goto L_0x003e\n boolean r0 = r2.mIsMainProcess\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Private constructor for the singleton pattern | private DoorOpenState() {
instance = this;
} | [
"private Singleton() {\r\n\r\n }",
"private Singleton() {\r\n }",
"private SingletonExample() {\n\t\tsuper();\n\t}",
"public Singleton() {\n super();\n }",
"private Singleton() {\n\n }",
"private SimpleSingleton () {\r\n }",
"private SingletonDesignDemo(){}",
"private MySingleton()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo que devuelve a la pantalla inicial | @RequestMapping(value = "/volverModificarCompania", method = { RequestMethod.GET, RequestMethod.POST })
public String cancelar(HttpSession session) {
return "redirect:/buscadorCompania";
} | [
"private void escribirEnPantalla() {\n }",
"public void met(){\n System.out.println(\"Método Interno.\");\n }",
"@Override\n public String cualquierMetodo2() {\n return \"Método implementado en la clase hija viaje familiar\";\n }",
"@Override\n\tpublic void getPuntuacio() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void go() {
System.out.println("wuwuwuwuu");
} | [
"@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 layoutManager method initializes all of the panels used by BankAppGui.java. | private void layoutManager() {
frame = new JFrame("Bank Application");
frame.setSize(900, 400);
frame.setResizable(false);
frame.getContentPane().setBackground(Color.white);
frame.setLayout(new FlowLayout());
accountInfo = new JPanel();
accountInfo.setLayout(new FlowLayout());
accountInfo.se... | [
"private void initLayout() {\n\n\t\t// Set title for application\n\t\tsetMainWindow(new Window(\"Descom - Employees\"));\n\n\t\t// Set theme\n\t\tsetTheme(\"descomtheme\");\n\n\t\t// Create vertical part of layout\n\t\tVerticalLayout layout = new VerticalLayout();\t\n\t\tlayout.setSizeFull();\n\t\tlayout.addCompone... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if external storage is available to at least read. | public boolean isExternalStorageReadable() {
String state = Environment.getExternalStorageState();
return Environment.MEDIA_MOUNTED.equals(state) ||
Environment.MEDIA_MOUNTED_READ_ONLY.equals(state);
} | [
"boolean isExternalStorageAvailable();",
"public boolean isExternalStorageAvailable() {\n\t\tcheckStorage();\n\n\t\treturn externalStorageAvailable;\n\t}",
"private void checkStorage() {\n\t\tString state = Environment.getExternalStorageState();\n\n\t\tif (state.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\texter... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove an edge from the graph | public boolean removeEdge( Vertex v1, Vertex v2 ); | [
"public void remove(Edge edge);",
"public void removeEdge(Edge<V,E> edge);",
"public void removeEdge(TreeEdgeI edge);",
"public void remove( IEdge<T,U> edge );",
"public Edge removeEdge(Edge e) {\n Log.d(\"DIO?\", \"LOL\");\n boolean rA = e.getPoiA().removeEdge(e);\n boolean rB = e.getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here, do not remove | @Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ShopSection shopSection = (ShopSection) o;
if (shopSection.getId() == null || getId() == null) {
... | [
"void addSettersAndGetters(String path, String field);",
"public interface ToolRequestUpdate extends HasId {\n\n @Override\n @PropertyName(\"uuid\")\n String getId();\n\n @PropertyName(\"uuid\")\n void setId(String id);\n\n String getStatus();\n\n void setStatus(String status);\n\n @Proper... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
formats the inputted province | public void setProvince(String province){
if (province.equalsIgnoreCase("ontario")){
provinceCode = "ON";
}
else if (province.equalsIgnoreCase("quebec")) {
provinceCode = "QC";
}
else if (province.equalsIgnoreCase("nova scotia")) {
provinceCode = "NS";
}
else if (province.equalsIgnoreCas... | [
"public void setProvince(java.lang.CharSequence value) {\n this.province = value;\n }",
"public String getProvince(){\n return this.province = province;\n }",
"String getProvinceName() {\n return this.province;\n }",
"public void setProvince_code(java.lang.String param){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to check if a data sync is already registered for this mob. | public static DataSync getData(final AttachCapabilitiesEvent<Entity> event)
{
for (final ICapabilityProvider provider : event.getCapabilities().values())
if (provider.getCapability(ThutCaps.DATASYNC).isPresent())
return provider.getCapability(ThutCaps.DATASYNC).orElse(null);
... | [
"boolean hasSyncType();",
"protected boolean isSynced() {\n return secretInformer.hasSynced() && userInformer.hasSynced();\n }",
"public boolean hasRegistered() {\n\t\treturn !this.thread.isConnecting();\n\t}",
"boolean hasLastSyncTime();",
"private boolean\n localDataExists()\n throws Torqu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
geeks for geeks Given a string of both uppercase and lowercase alphabets, the task is to print the string with alternate occurrences of any character dropped(including space and consider upper and lowercase as same). | public static void strIgnorance(String str){
boolean temp[]=new boolean[123];
String s=str.toLowerCase();
for(int i=0;i<str.length();i++){
char ch=s.charAt(i);
if(temp[ch]){
temp[ch]=false;
}else{
System.out.print(str.charAt(i... | [
"public static void main(String[] args) {\r\n String str = \"heLLo WOrLd\";\r\n String t = \"\";\r\n for (int x = 0; x < str.length(); x++)\r\n {\r\n char c = str.charAt(x);\r\n boolean check = Character.isUpperCase(c);\r\n if (check == true)\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////////////////////////////////////// GetHandlingText Method to retrieve the text represnetation of a passed numeric handling code ///////////////////////////////////////////////////////// | public String GetHandlingText(int HandCode)
{
String s_handlingText;
s_handlingText = HandlingTextGet(m_contextIndex,HandCode);
return s_handlingText;
} | [
"public String getCodedText () {\r\n \t\tif ( !isBalanced ) balanceMarkers();\r\n \t\treturn text.toString();\r\n \t}",
"public TextInfo getTextInfo();",
"@DISPID(1702)\n @PropGet\n com.exceljava.com4j.excel.TextEffectFormat getTextEffect();",
"public java.lang.Object getUilTextCaseHandling() throws G2Acces... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected List setFindAttributes() throws Exception {
MantenimientoDTODescuentoAdicionalSearchForm f = (MantenimientoDTODescuentoAdicionalSearchForm) this.formBusqueda;
MantenimientoDTODescuentoAdicionalService service = (MantenimientoDTODescuentoAdicionalService)
this.getBean("spusicc.mantenimien... | [
"@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"
]
]
}
} |
show product on PDP page (individual product at a time) | public boolean showProduct(String detailedProductImages,
int totalImagesCount,
String reviewRating,
String reviewComments,
boolean cashOnDelivery){
System.out.println("Title : " + title);
System.out.println("Categ... | [
"private void showProductDetails() {\r\n\r\n\t\ttry {\r\n\t\t\tif (productDetail != null) {\r\n\t\t\t\tMap<String, String> details = null;\r\n\t\t\t\tImageCacheManager imgCacheManager = new ImageCacheManager();\r\n\t\t\t\tfor (ProductDetail iProductDetail : productDetail) {\r\n\t\t\t\t\tproductName.setText(iProduct... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================================== Next. ========================================================================== Override next(). In creation mode, next() will create a refreshed coexpression, thread, or pipe. Otherwise, within a plain coexpression, next() will just delegate t... | public IIconAtom<T> provideNext () {
// Create refreshed co-expression, thread, or pipe.
// WARNING: Should kill off old thread, or let it fail
if (isCreateMode) {
if (getHaveDoneNext()) { // Singleton iterator
// setIsFailed(true); // nextAtom will do this on return FAIL
return FAIL;
}
if (isPipe) {
... | [
"public Object next()\r\n/* */ {\r\n/* 175 */ return getNext();\r\n/* */ }",
"public Object next() {\n Object toReturn = next;\n walkOne();\n return toReturn;\n }",
"public void next() {\n\t}",
"public void next() {\n next(nativeHandle_);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Forswitch that gets the player position for each player and assigns it to the Integers above. Then sends the player number and position to the loadPlayerOnMap function IF ELSE: if the position of a player is the same as gamestatemessage, break from switch, do nothing. If the position of a player is different than games... | private void drawPlayers(List<PlayerOtherData> players) {
int pIndex = 0;
Label usernameLabel = null;
Label playerStatus = null;
for (PlayerOtherData player : players) {
switch (pIndex) {
case 0:
usernameLabel = username1;
... | [
"public void mapTranslation () throws Exception\n {\n\t/* Translate to Map02 */\n\tif (runningMapIndex == 1 && ((player.x == 7 || player.x == 8) && player.y == 10))\n\t{\n\t runningMapIndex = 2;\n\t runningMap = new Map02 (3, 5);\n\t}\n\tif (runningMapIndex == 2)\n\t{\n\t /* Translate to Map01 */\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this function gathers all information of the lines action | public static LineType lineParser(String line) throws ActionSyntaxInvalidException {
FindLineType findLineType = FindLineType.lineAction(line);
ExtractArguments lineInfo;
switch (findLineType) {
case CLOSER:
return new LineType(FindLineType.CLOSER);
case IF_LINE:
case WHILE_LINE:
lineInfo = new I... | [
"@Override\n public void onStatus(String status) {\n log(\"Line Item Print Status = \" + status);\n }",
"public String printInfo(String[] lines,String methodName) {\n return this.path + \",\" + this.className +\", \" + methodName + \", \" + ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to replaceFragment with another fragment | protected final void replaceFragment(int replaceId, Fragment fragment,
String tag, boolean isBackStack) {
try{
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
if (!Utilities.getInstance(getApplicationContext()).isNullorEmpty(tag))... | [
"public void replaceFragment(int pos){\n Fragment fragment = null;\n switch (pos){\n case 0 :\n fragment = new Fragment1();\n break;\n case 1 :\n fragment = new Fragment2();\n loadFeeders();\n break;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shuts the HTTP client down. Since the client is asynchronous, it should be closed to avoid using extra resources. This is to be invoked on application shutdown. | static void shutdown() throws IOException {
RequestFactory.close();
RequestFactory.STARTED.set(false);
} | [
"public void shutdown() {\n\t\tclient.shutdown();\n\t}",
"public void shutdown() {\n try {\n this.httpclient.close();\n } catch ( IOException e ) {\n // ok\n }\n }",
"public void shutdown() {\n\t\tclient.getDispatcher().getExecutorService().shutdown();\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is copied from WireRouting, can be reused for this class get image size and values | private static IntImage readImage() {
// create variables
int numRows, numCols;
IntImage result;
// get size of image
System.out.println("How many rows and columns does the board have?");
System.out.print("\tNumber of rows: ");
numRows = readPositiveNumber();
... | [
"public ImageSize getSize() {\n/* 93 */ return this.size;\n/* */ }",
"private int getImageSize()\n\t{\n\t\tint sum = 0;\n\t\t\n\t\t//go through all the pixels\n\t\tfor(int i = 0;i < pixels.size();i++)\n\t\t{\n\t\t\t//add the sum of each of the pixels\n\t\t\tsum += pixels.get(i).length();\n\t\t}\n\t\t\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an OpenerAdapter that can monitor progress for a specific database and display problems over a main window frame. | OpenerAdapter createOpenerAdapter(final String databaseName); | [
"public MainFrame() {\n //System.setProperty(\"log4j.configurationFile\", \"C:\\\\log4j2-test.xml\");\n\n this.gui_text = ResourceBundle.getBundle(\"gui_text\", new Locale(\"ru\", \"RU\"));\n this.tubesCounter = new TubesCounter();\n\n this.sortoscopeDriver = new Sortoscope4Driver();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | public Completable m40935a(@NonNull String str) {
Objects.b(str);
return this.f32805a.updateUser(new Builder().addName(Optional.a(str)).build());
} | [
"public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }",
"interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }",
"public interface ans {\n /* renamed from: a */\n void mo1174a();\n}",
"public interface C24712af {\n /* renamed from... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates a list and set the name of the list to the passed string | public KLDList(String s) {
super(s);
length = 0;
System.out.println("Created a list called " + name );
} | [
"public PlayList(String s)\n\t{\n\t\tthis.name = s;\n\t}",
"void createList() {}",
"public void setList(final String list) {\n this.list = list;\n }",
"public void setNameList (String nameList){\n\t\tthis.nameList= nameList;\n\t}",
"public void setListName(String listName){\n this.listName = list... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setting the array with specified length | public IntegerSet2() {
a = new int[Length];
} | [
"private void resize(int length)\n\t{\n\t\tItem[] temp = (Item[]) new Object[length];\n\t\t\n\t\tfor(int i = 0; i < N; i++)\n\t\t\ttemp[i] = a[i];\n\t\t\n\t\ta = temp;\n\t}",
"protected static native JSObject newArrayForLengthImpl(int aLen);",
"public Value NewArray(Type arrayType, Value size);",
"public Dyna... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The execution process starts. | @Async
public void execute(final OrderExecution orderExecution) {
var count = 3;
while (count-- != 0) {
try {
this.transactionTemplate.executeWithoutResult(status -> {
val optExecution = this.orderExecutionRepository.findById(orderExecution.getId());
... | [
"public void execute() {\n\t\t\tthis.start();\n\t\t}",
"@Override\r\n\tpublic void start() {\n\t\tcommand.execute();\r\n\t\t\r\n\t}",
"public void start() {\r\n\t\r\n }",
"public void startProcessing() {\n\t\t\n\t}",
"public void onStart() {\n\t\t\twriteRunLine(fileName, \"*** RUN \" + runNumber);\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the generated updated content.xml file after the stylesheet transformation. Returns null if an error occured. | public String generate(Layout layout, List<ButtonLabel> buttonLabelList) throws Exception {
LOGGER.log(Level.INFO, "Performing Stylesheet tranformation.");
// read the xslt file
final String originalStylesheet = readFileFromResourceInString(XSLT_FILENAME);
final String originalTemplate = readFileFromRes... | [
"public File transform(Source xsl, String contentKey)\n\t{\n\t\tFile fileResult = null;\n\t\tInputStream is = null;\t\t\n\t\t\n\t\tif ((xsl != null) && (packedFile == null) && StringUtils.isNotEmpty(contentKey))\n\t\t{\t\t\t\n\t\t\tFile fileContent = mapDocContentFiles.get(contentKey);\n\t\t\tif (fileContent != nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an unmodifiable view of cooked records | ObservableList<Record> getFilteredRecordList(); | [
"public ArrayList<DbObjectHolder> readAllRecords() {\n for (DbObjectHolder _holder : this.carList){\n _holder.updateAccessDate();\n }\n return this.carList;\n }",
"@Override\n public String[] getRecord() {\n return new String[]{this.getId(),\n this.name,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show a view with a progress bar indicating a loading process. | void showLoading(); | [
"protected void showViewLoading() {\n getActivity().runOnUiThread(new Runnable() {\n @Override public void run() {\n progressBar.setVisibility(ProgressBar.VISIBLE);\n pgBar.setVisibility(ProgressBar.VISIBLE);\n getActivity().setProgressBarIndeterminateVisibility(true);\n }\n });... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
new Admin_Help("Management");
MR.setVisible(false);
} | [
"@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"
]
]
}
} |
look up a function: Double result = math.add(Double v1, Double v2) | @Test
public void testFunctionAsComputer() {
BiFunction<double[], double[], double[]> function = ops.op( //
"test.adaptersF", new Nil<BiFunction<double[], double[], double[]>>() {
}, //
new Nil[] { nilDoubleArray, nilDoubleArray }, //
nilDoubleArray//
);
Computers.Arity2<double[], double[], doub... | [
"@Override\r\n\tpublic double add(double num1, double num2) {\n\t\treturn num1+num2*1.0;\r\n\t}",
"public double calculate(double num1, double num2) {\n\treturn num1+num2;\r\n}",
"public double functionValue(double v);",
"public Double anyMethod(Double t0, Double t1) {\n\t\t\t\treturn t0 + t1;\r\n\t\t\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Using Java 8 Lambda Expression. | public void deleteByK(String k) {
txTpl.execute((TransactionStatus status) -> jdbcTemplate.update("DELETE FROM kv WHERE k = ?", k));
} | [
"public static void testWithLambdaExpression() {\n\t\t// implementation par fonction lambda\n\t\tSquareRoot squareRoot = (n) -> (Math.sqrt(n));\n\t\tSquareRoot squareRoot2 = (n) -> (Math.sqrt(n));\n\t\tSystem.out.println(\"testWithLambdaExpression : squareRoot = \" + squareRoot);\n\t\tSystem.out.println(\"testWithL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form Switchboard | public Switchboard() {
initComponents();
} | [
"private void createBoardByBoardDrawer() {\n action.waitVisibility(btnTableros);\n action.click(btnTableros);\n action.waitVisibility(linkCreateNewTablero);\n action.click(linkCreateNewTablero);\n }",
"private void newBillboard(String billboardName) {\n // Track the creation ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Maps a given Nonterminal node to a symbolstream. | public CSymbolStream flattenNonTermNode(CNonTermNode aNode){
return flatten((CECFGNode)aNode.getBody());
} | [
"public SymbolGraph(String stream, String sp) {\n st = new ST<String, Integer>();\n // First pass\n In in = new In(stream);\n // Build the index, associate each distinct String with an index\n while (!in.isEmpty()) {\n String[] a = in.readLine().split(sp);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .Transaction tx = 1; | @java.lang.Override
public cn.chain33.javasdk.model.protobuf.TransactionAllProtobuf.Transaction getTx(int index) {
return tx_.get(index);
} | [
"ReadonlyTransaction transact();",
"public Transaction(){\r\n\t\tlength = 0;\r\n\t\t\r\n\t}",
"long commit(long transNum);",
"@Override\n\tpublic void recordTransaction() {\n\t\t\n\t}",
"com.nicktate.storm.TransactionProto.Transaction getTransaction();",
"Transaction<Object> transaction();",
"wallet.cor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the hostType property: Type of host the Custom Locations is referencing (Kubernetes, etc...). | public HostType hostType() {
return this.hostType;
} | [
"public HostPoolType hostPoolType() {\n return this.innerProperties() == null ? null : this.innerProperties().hostPoolType();\n }",
"public String gethostSubtypeName() {\n\t\t return hostSubtypeName;\n\t\t}",
"com.v2ray.core.app.router.routercommon.Domain.Type getType();",
"public String getLocat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 playedBureau = 11; optional int32 playedBureau = 11; | boolean hasPlayedBureau(); | [
"public void setLoaiVanBan(long loaiVanBan);",
"Integer Player();",
"public void setTrangThaiLienThong(int trangThaiLienThong);",
"public int getArmadura() { return armadura; }",
"public void setAnnoCorrente(int AnnoCorrente);",
"long getPlayer();",
"public int getLongueur() { return longueur; }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Predicate: Cause of the exception must be instance exactly of . | public static <MP1> boolean causeExactlyInstanceOf(@Nonnull Throwable e, Class<?> clazz, MP1 msgParamOnly) {
Null.nonNullArg(e, "e");
Null.nonNullArg(clazz, "clazz");
return Predicates.causeExactlyInstanceOf(e, clazz);
} | [
"private void assertExceptionCause(Exception e, Class...classes) {\n assertNotNull(e.getCause());\n List<Class> validClasses = Arrays.asList(classes);\n Throwable t = e.getCause();\n boolean matches =\n validClasses.stream().anyMatch((clazz) -> clazz.isAssignableFrom(t.getClass()));\n assertTr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add in to all elements of this. | Matrix<M> add(double in); | [
"public void addAll(PositionList in) {\r\n for (Position p : in.list) {\r\n add(p);\r\n }\r\n }",
"protected void addElements() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {\r\n if (this.elements != null) {\r\n for (E elem : this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new communications path between a server and client. | public LocalJavaCommunication(AppletLifetimeSupport server)
{
final int QueueCapacity = 4;
clientMessages = new ArrayBlockingQueue<ClientMessage>(QueueCapacity);
serverMessages = new ArrayBlockingQueue<ServerMessage>(QueueCapacity);
localServer = server;
} | [
"private void clientCreateChannel(Client client)\n {\n DataOutputStream dos = null;\n DataInputStream dis = null;\n try\n {\n dis = new DataInputStream(client.getSocket().getInputStream());\n dos = new DataOutputStream(client.getSocket().getOutputStream());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the individuals recombinator. | public void setRecombinator(IRecombinator recombinator)
{
// Sets recombinator
this.recombinator = recombinator;
// Contextualize parents selector
recombinator.contextualize(this);
} | [
"public void setMeridiano(){\r\n\t\tswitch(idMeridiano){\r\n\t\tcase 1:\r\n\t\t\tinstitucion.setMeridiano(Constantes.MERIDIANO17);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tinstitucion.setMeridiano(Constantes.MERIDIANO18);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void resetDonors() {\n for (int i = 0; i < d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Toast.makeText(v.getContext(), "update table", Toast.LENGTH_SHORT).show(); | @Override
public void onClick(View v) {
deletePatient();
} | [
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"信息修改成功\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |