query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Snake constructor generate a last Snake and head Snake | public Snake() {
lastSnake = new SnakePiece(null, null);
headSnake = new SnakePiece(lastSnake, new FoodUp(lastSnake.getPx() + 1, lastSnake.getPy()));
headSnake.setNext(lastSnake);
lastSnake.setPrev(headSnake);
} | [
"Snake(){\n snakeLength = 0; //start with snake of length 0\n snakeHead = new Token();\n snakeDirections = new ArrayList<>();\n bend = new ArrayList<>();\n counter = new ArrayList<>();\n }",
"public Snake() {\n\n // Create Leading Block\n blocks = new Ar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the BlobServiceProperties update allowing to specify isVersioningEnabled. | interface WithIsVersioningEnabled {
/**
* Specifies the isVersioningEnabled property: Versioning is enabled if set to true..
*
* @param isVersioningEnabled Versioning is enabled if set to true.
* @return the next definition stage.
*/
... | [
"Update withIsVersioningEnabled(Boolean isVersioningEnabled);",
"Boolean isVersioningEnabled();",
"interface WithIsVersioningEnabled {\n /**\n * Specifies the isVersioningEnabled property: Versioning is enabled if set to true..\n *\n * @param isVersioningEnabled Ve... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Multiplication of list1 and list | public static SinglyLinkedList<Poly> multiplication(SinglyLinkedList.Entry<Poly> list1,
SinglyLinkedList.Entry<Poly> list2) {
SinglyLinkedList<Poly> ans = new SinglyLinkedList();
while (list2 != null) {
SinglyLinkedList<Poly> temp = new SinglyLinkedList();
Poly poly1 = list2.element;
SinglyLinkedList.... | [
"private void multiply()\n {\n System.out.println(\"The product of the list is: \" + myList.product());\n }",
"public BigDecimal multiplyNumbers(List<Integer> numbers) throws Exception;",
"public static ArrayList<Float> mathematicalMultiply(ArrayList<Float> firstWave, ArrayList<Float> secondWave) {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds button that lets user rehear word to spell without penalty will speak the word using slow speed, then the sample sentence (if there is one) at user's preferred speed | private void setupSayAgainButton() {
ImageIcon sayagain_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + "sayagain.png");
JButton sayagain_button = new JButton("", sayagain_button_image);
sayagain_button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(Acti... | [
"private void speakInstructions() {\r\n\t\ttts.speak(\"To use the touchscreen kee pad: You can navigate\" +\r\n\t\t\t\t\" the kee pad by either touching and dragging on the screen or by using the trackball or directional\" +\r\n\t\t\t\t\" keys; the symbols on the keys will be spoken when you navigate to them, doubl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Override to return the RowMapper | protected RowMapper<Project> getRowMapper() {
return new ProjectMapper();
} | [
"protected abstract IRowMapper<T> getDTORowMapper();",
"public abstract Row map(Row row) throws Exception;",
"protected <T> BeanPropertyRowMapper<T> createRowMapper(final Class<T> clazz) {\r\n\t\treturn new BeanPropertyRowMapper<>(this.getNameConverter(), this.getDataSource(), clazz);\r\n\t}",
"public ActiveR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method calls the opennotify API which returns the current latitude and longitude of the International Space Station. | String getISSLatitudeAndLongitude() throws Exception
{
String url = "http://api.open-notify.org/iss-now.json";
JsonParser parser = new JsonParser();
String jsonData = getJsonData(url);
JsonElement jsonTree = parser.parse(jsonData);
String latAndLong = "";
if (jsonTree.isJsonObject())
{
JsonObject... | [
"public void getLocation() {\n\n\t\t// If Google Play Services is available\n\t\tif (servicesConnected()) {\n\t\t\t// Get the current location\n\t\t\tLocation currentLocation = mLocationClient.getLastLocation();\n\n\t\t\t// Display the current location in the UI\n\t\t\tmLatLng.setText(LocationUtils.getLatLng(this, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the true source of a CommandSource; scales through ProxySource cmd srcs to get the original. Nonrecursive. | public static CommandSource getTrueSource(CommandSource src) {
CommandSource out = src;
while (out instanceof ProxySource) {
out = ((ProxySource) out).getOriginalSource();
}
return out;
} | [
"S getSource();",
"@Override\n\tpublic Filter getSource() {\n\t\treturn (Filter) getSources().get(0);\n\t}",
"com.google.cloud.functions.v2beta.Source getSource();",
"com.google.cloud.privatecatalog.v1beta1.GitSource getGitSource();",
"com.google.cloud.vision.v1.ImageSource getSource();",
"IConnectable ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Average: O(log(n)) time | O(log(n)) space, where n is the number of nodes in the Binary Search Tree. Worst: O(n) time | O(n) space, where n is the number of nodes in the Binary Search Tree. The space complexity is on average O(log(n)) and the worst O(n), because each recursive call to findClosestValueInBst adds a new f... | public static int findClosestValueInBstHelper(Node tree, int target, int closest) {
if (tree == null)
return closest;
if (Math.abs(target - closest) > Math.abs(target - tree.value))
closest = tree.value;
if (target > tree.value && tree.right != null)
return... | [
"public static int binarySearchClosest(double[] a, double value) {\n\n\t\tif (a.length < 1)\n\t\t\tthrow new IllegalArgumentException(\"Please use an array of length greater than 0.\");\n\t\t\n\t\tif (value < a[0]) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (value > a[a.length - 1]) {\n\t\t\treturn a.length - 1;\n\t\t}\n\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column AMS.T_CM_MAC.MONTHLY_FEE | public Integer getMonthlyFee() {
return monthlyFee;
} | [
"public int getMonthlyFee() {\n return monthlyFee;\n }",
"public BigDecimal getMonthFee() {\r\n return monthFee;\r\n }",
"public Double getMonthly_fee() {\n\t\treturn monthly_fee;\n\t}",
"public BigDecimal getLastmonthFee() {\r\n return lastmonthFee;\r\n }",
"public double mont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the character stream for this input source. | public Reader getCharacterStream() {
return characterStream;
} | [
"@Nonnull\n InputStream getSourceStream ();",
"public static Source stdin() {\n return stream(System.in);\n }",
"Reader getCharacterStream() throws SQLException;",
"public char[] getSource() {\n\t\treturn source;\n\t}",
"public String getStream() {\r\n return stream;\r\n }",
"public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience method for requesting permission to use the USB device; may only be called if a permission handler is installed. | public void requestPermission(Context context) {
if (broadcastReceiver == null) {
throw new IllegalStateException(
"installPermissionHandler must be called before requesting permission");
}
((UsbManager) context.getSystemService(Context.USB_SERVICE)).requestPermission(device,
Pending... | [
"public void openUsbDevice() {\n tryGetUsbPermission();\n }",
"public static boolean requestFM220UsbPermission(Context context, PendingIntent permissionIntent) {\r\n\t\tboolean requesting = false;\r\n\t\t\r\n\t\tUsbManager mUsbManager = (UsbManager) context.getSystemService(Context.USB_SERVICE);\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writing racers by exporting | public void writeRacers(String filename) throws IOException{
String out = new String();
FileWriter fstream = new FileWriter(filename);
for(CRacer r : racers){
out += r.exportRacer() + "\n";
}
fstream.write(out);
fstream.close();
} | [
"protected abstract JRExporter createExporter();",
"private void generateRAS() {\n\t\ttry {\n\t\t\t// Primary Metric Reduce Attack Surface (RAS)\n\t\t\tcsvWriter.append(\",,Reduce Attack Surface (RAS),,,,\");\n\t\t\t// For each class in the project\n\t\t\tfor(String key: classNames) {\n\t\t\t\tcsvWriter.append(St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check diagonal win not yet implemented | public boolean checkDiagonalWin(){
return true;
} | [
"private boolean diagWin(){ \r\n\t\treturn ((checkValue (board[0][0],board[1][1],board[2][2]) == true) || \r\n\t\t\t\t(checkValue (board[0][2], board[1][1], board[2][0]) == true)); \r\n\t}",
"public boolean diagnonalWin() {\n if (arr[0][0] == arr[1][1] && arr[1][1] == arr[2][2]) {\n return true;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Terminate the debugging session. | @ScriptyCommand(name = "dbg-terminate", description =
"(dbg-terminate)\n" +
"Terminate the debugging session that was started with dbg-expr.\n" +
"See also: dbg-expr.")
@ScriptyRefArgList(ref = "no arguments")
public void dbgTerminate()
throws CommandExcep... | [
"protected void forciblyTerminate() {\n Robot.logger.warning(\"YOU CAN'T STOP MEH, I'M DEBUG!\");\n }",
"private void shutdown()\n {\n shouldRun = false;\n idle = true;\n closeSRVConnection();\n\n try {\n if (debug != null) debug.close();\n } catch (Exception e) { }\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new auto completion proposal for the given field. | private ICompletionProposal createCompletionProposal(int offset,
String autoCompleteField, String insertionText,
String fieldDescription, String stringToReplace) {
return new CFCompletionProposal(insertionText, offset
- stringToReplace.length(), stringToReplace.length(),... | [
"private ICompletionProposal newFieldCompletionProposal(\n TemplateDocument templateDocument, int offset, String fieldName,\n SchemaProperty schemaProperty, String stringToReplace) {\n char previousChar = ' ';\n try {\n previousChar = templateDocument.getChar(offset - ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// installCpp // // | @Override
public void installCpp ()
throws Exception
{
for (Package pkg : cReqs) {
if (!pkg.isInstalled()) {
pkg.install();
}
}
} | [
"@Override\n public boolean installJava() { return true; }",
"public static void install() {\n \t\tLoadState.compiler = new LuaC();\n \t}",
"@Override\n public boolean isCppInstalled ()\n {\n for (Package pkg : cReqs) {\n if (!pkg.isInstalled()) {\n return false;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a an object counter identified by expr which exists in the arrayList of identifiers in the table | public Counter checkCounter(String expr){
for(Entry<String, Ident> e : condition.entrySet()) {
Ident id = e.getValue();
for(int i = 0; i<id.counter.size(); i++){
if(id.getCounter(i).getName().equals(expr))
return id.getCounter(i);
}
}
System.out.println("Compteur null");
return null;
} | [
"int getXExprsCount();",
"public int occurrences(Object obj);",
"public abstract int countIdentifierReferences( String id );",
"@Override\n public HashMap<T, Integer> NumberOfOccurrences(T[] arrayObjs){\n // One iteration of the hashmap\n for(int i =0; i < arrayObjs.length; i++){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 mcc = 1; | int getMcc(); | [
"public int getMcc() {\n return mcc_;\n }",
"public int getMcc() {\n return mcc_;\n }",
"public String getMcc() {\n return mcc;\n }",
"public int mcs() { return mcs; }",
"Integer getCCPID();",
"int getMnc();",
"public int getCC() {\n\t\treturn CC;\n\t}",
"public int getCC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
["FreqStack","push","push","push","push","pop", "pop", "push", "push", "push", "pop", "pop", "pop"] [[],[1], [1], [1], [2], [], [], [2], [2], [1], [], [], []] | public static void main(String[] args) {
FreqStack freqStack = new FreqStack();
freqStack.push(1);
freqStack.push(1);
freqStack.push(1);
freqStack.push(2);
System.out.println(freqStack.pop());
System.out.println(freqStack.pop());
freqStack.push(2);
freqStack.push(2);
freqStack.pu... | [
"public static int[] createStack(){\n\n int[] stack = new int[101]; // Create array to hold values\n stack[0] = 0; // Assign 0 as initial number of elements\n return stack;\n\n }",
"public static void main(String[] args) throws FullStackException {\r\n\t\t// TODO Auto-generated method stub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate list of preconditions arising from the evaluation of exp. | public static List<Condition> generate(Expression exp,
FunctionSymbol fun, Recursion.CallMap callers)
{
Preconditions pre = new Preconditions(fun, callers);
exp.accept(pre);
return pre.conditions;
} | [
"private List<Condition> generate(Expression exp)\n {\n return generate(exp, fun, callers);\n }",
"public Collection<Precondition> getAllPreconditions();",
"@Test\n public void testExp() {\n System.out.println(\"exp\");\n DoubleArrayList relErrs = new DoubleArrayList();\n int trials... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If attribute represents a choice master, return the slaves binding. | public String getSlavesBinding(Attribute attribute) {
if (!attribute.isChoiceMasterType()) {
return "";
}
String slaveName = attribute.getChoiceSlave();
return getBinding().replaceFirst("([\"'])"+attribute.getId()+"[\"']", "$1"+slaveName+"$1");
} | [
"public String getMastersBinding(Attribute attribute) {\n if (!attribute.isChoiceSlaveType()) {\n return \"\";\n }\n\n String masterName = attribute.getChoiceMaster();\n \n return getBinding().replaceFirst(\"([\\\"'])\"+attribute.getId()+\"[\\\"']\", \"$1\"+masterName+\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setLimitSwitchesSwapped Overriding TrcMotor specific methods. This method configures the forward limit switch to be normally open (i.e. active when close). | public void configFwdLimitSwitchNormallyOpen(boolean normalOpen)
{
final String funcName = "configFwdLimitSwitchNormallyOpen";
if (debugEnabled)
{
dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, "normalOpen=%s", normalOpen);
dbgTrace.traceExit(funcName, Trc... | [
"private void enableLimitSwitch(final boolean enable) {\n if (enable != isLimitSwitchEnabled) {\n liftMotor.configClearPositionOnLimitR(enable, Config.CAN_SHORT);\n isLimitSwitchEnabled = enable;\n }\n }",
"private void enableLimit(final boolean enable) {\n liftMotor.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the value of the database column jreal_nowcmd.jint | public Integer getJint() {
return jint;
} | [
"public Integer getJretInt() {\n return jretInt;\n }",
"public Integer getjId() {\n return jId;\n }",
"public Integer getJcmdsig() {\n return jcmdsig;\n }",
"@Override\n public Integer currVal() {\n return (Integer) em.createNativeQuery(\"SELECT SEQ FROM sqlite_sequence... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this part left blank because no use for the hack method on a playercar has yet been determined | public void hack(playerCar car) {
} | [
"private static boolean showCarPrefs() {\r\n return Game.i.mode() == GameMode.BASE || Game.i.mode() == GameMode.CHASECAR;\r\n }",
"public void Attackstrategy(){\r\n\t\t\r\n\t\tfor(int i = 0; i < player.gethandlength(); i+=1){\r\n\t\t\tplayer.gethandcard(i).onplay();\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert nominal attribute to binary numeric attribute | public Instances nominalToNumeric(Instances data) throws Exception {
this.nominalToBinaryFilter = new NominalToBinary();
this.nominalToBinaryFilter.setInputFormat(data);
data = Filter.useFilter(data, this.nominalToBinaryFilter);
return data;
} | [
"@Override\n public BinaryType asBinary() {\n return TypeFactory.getBinaryType(this.getValue());\n }",
"public Byte getByteAttribute();",
"public BigInteger getBigIntegerAttribute();",
"int getIntAttribute2();",
"public Integer getIntegerAttribute();",
"public String getNominalValue(Feature f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the linefeed which corresponds to the operating system | public String getBrowserOSLineFeed() {
String browser;
browser = getUserAgent();
Pattern p = Pattern.compile(".*Windows.*");
Matcher m = p.matcher(browser);
if(m.find()) {
return "\r\n";
}
p= Pattern.compile(".*Mac OS X.*");
... | [
"private String nl(){\n\t\treturn System.getProperty(\"line.separator\");\n\t}",
"public static String getNewLine() {\n\n\t\tif (isMacOSX())\n\t\t\treturn \"\\n\";\n\n\t\tif (isLinux())\n\t\t\treturn \"\\n\";\n\n\t\tif (isWin())\n\t\t\treturn \"\\r\\n\";\n\n\t\treturn \"\";\n\n\t}",
"public static String inferL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the graph and clusters Nodes that use shared memory as their communication primitive into NodeGroups. Each NodeGroup is assigned a serial number. | private Map<MutableInteger, NodeGroup> getNodeGroups() {
if(nodeGroups != null) {
return nodeGroups;
}
Map<MutableInteger, NodeGroup> result = new HashMap<MutableInteger, NodeGroup>();
Queue<Node> queue = new LinkedList<Node>();
int currentSpammerIdentifier = 0;
Node current, neighbor;
for (Node s... | [
"public Graphcomm Create_graph(int[] index, int[] edges, boolean reorder) {\n int size = this.group.Size();\n int nnodes = index.length;\n mpjdev.Comm ncomm = mpjdevComm;\n mpi.Group ngroup = this.group;\n\n //MPI.logger.debug(\"nnodes \"+nnodes);\n //MPI.logger.debug(\"size \"+size);\n\n if (n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/////////////// Constructor // /////////////// Contains id, name, and cgpa | public Student(int id, String name, double cgpa) {
this.setID(id);
this.setName(name);
this.setCGPA(cgpa);
} | [
"PBAtomic(String name)\n {\n\tsuper(name);\n }",
"public Garage() {\n\t\tid = generateId();\n\t}",
"Golfer(String name)\n {\n this.name = name;\n }",
"public CateInfo() {\r\n \tid = -1;\r\n \tname = \"\";\r\n }",
"public Giocatore(String nome, Casella c, Pedina p) {\r\n\t\tsetNom... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleNumber" $ANTLR start "entryRuleJvmTypeReference" InternalDroneScript.g:1987:1: entryRuleJvmTypeReference : ruleJvmTypeReference EOF ; | public final void entryRuleJvmTypeReference() throws RecognitionException {
try {
// InternalDroneScript.g:1988:1: ( ruleJvmTypeReference EOF )
// InternalDroneScript.g:1989:1: ruleJvmTypeReference EOF
{
if ( state.backtracking==0 ) {
before(g... | [
"public final void entryRuleJvmTypeReference() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1952:1: ( ruleJvmTypeReference EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the JSON factory | private static JsonFactory getFactory() {
JsonFactory jsonFactory = new JsonFactory();
//Do not auto-close target output when writing completes
jsonFactory.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
//Do not auto-close source output when reading completes
jsonFactory.disa... | [
"public JsonReaderAndWriter() {\n factory = Factory.getInstance();\n }",
"public JsonDAOFactory() {\n createConnection();\n gsonBuilder = new GsonBuilder();\n gson = gsonBuilder.create();\n }",
"public final JsonFactory getJsonFactory() {\n return jsonFactory;\n }",
"protected ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all coupons from database | public ArrayList<Coupon> getAllCouponsIn_DB() {
return (ArrayList<Coupon>) couponRepo.findAll();
} | [
"@Override\r\n\tpublic Set<Coupon> getAllCoupons() {\r\n\t\tSet<Coupon> couponList = new HashSet<>();\r\n\t\tString query = \"SELECT * FROM COUPON\";\r\n\t\tConnection conn = connectionPool.getConnection();\r\n\t\ttry{\r\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(query);\r\n\t\tResultSet rs = pstmt.ex... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field738' field. | public void setField738(java.lang.CharSequence value) {
this.field738 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField738(java.lang.CharSequence value) {\n validate(fields()[738], value);\n this.field738 = value;\n fieldSetFlags()[738] = true;\n return this; \n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField732(java.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
auto generated Axis2 call back method for divide2 method override this method for handling normal response from divide2 operation | public void receiveResultdivide2(
loadbalance.LoadBalanceStub.Divide2Response result
) {
} | [
"protected abstract List<T2> manageResponse(String methodName, String extractedData);",
"public void receiveResultdivide3(\n loadbalance.LoadBalanceStub.Divide3Response result\n ) {\n }",
"grpc.UploadNoticeServiceOuterClass.ProcessingResponse.Result getResult(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ListElement__Group__3__Impl" $ANTLR start "rule__Model__GenAssignment_0" InternalDsl.g:34508:1: rule__Model__GenAssignment_0 : ( ruleGenDSL ) ; | public final void rule__Model__GenAssignment_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:34512:1: ( ( ruleGenDSL ) )
// InternalDsl.g:34513:2: ( ruleGenDSL )
{
// InternalDsl.g:34513:2: ( ruleGenDS... | [
"public final void rule__GenDSL__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:6768:1: ( ( ( rule__GenDSL__GenAssignment_0 ) ) )\n // InternalDsl.g:6769:1: ( ( rule__GenDSL__GenAssignment_0 ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns true if the diagonal is marked. This method checks the left to right diagonal for BingoBalls marked true | private boolean diagonalRightToLeftIsMarked() {
// start at bottom right corner
for (int i = 4; i < bingoCardlist.size(); i += 4) {
if (!(bingoCardlist.get(i).getMarked()))
return false;
}
return true;
} | [
"private boolean diagonalLeftToRightIsMarked() {\n // start at upper left corner\n for (int i = 0; i < bingoCardlist.size(); i += 6) {\n if (!(bingoCardlist.get(i).getMarked()))\n return false;\n }\n return true;\n }",
"int checkDiagonal() {\r\n for (int[] c : TicTacToe.diagonalConditions) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deactivate the license and obtain the revoke code. | boolean IVS_PU_DeactLicForRevokeKey(ULONG ulIdentifyID, PU_ITGT_LIC_REVOKE_INFO pstLicRevokeInfo); | [
"public void terminateLicense()\n {\n if(isExpired == true)\n {\n System.out.println(\"The license is already terminated.\");\n }\n else\n {\n this.clientCompanyName=\"\";\n this.numberOfUser= 0;\n this.activationDate=\"\";\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool condition_part_id_null = 1001; | public Builder setConditionPartIdNull(boolean value) {
conditionPartIdNull_ = value;
onChanged();
return this;
} | [
"boolean getConditionPartIdNull();",
"boolean getConditionIdNull();",
"public boolean getConditionPartIdNull() {\n return conditionPartIdNull_;\n }",
"boolean getItemConditionIdNull();",
"boolean getOnlyCondPartsWithDomTNodeId1Null();",
"boolean getOnlyCondPartsWithDomTNodeId3Null();",
"bool... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of LinkVisit_FromNodeVisit | public final void setLinkVisit_FromNodeVisit(com.mendix.systemwideinterfaces.core.IContext context, workflowexecution.proxies.NodeVisit linkvisit_fromnodevisit)
{
if (linkvisit_fromnodevisit == null)
getMendixObject().setValue(context, MemberNames.LinkVisit_FromNodeVisit.toString(), null);
else
getMendi... | [
"public final void setLinkVisit_FromNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_fromnodevisit)\r\n\t{\r\n\t\tsetLinkVisit_FromNodeVisit(getContext(), linkvisit_fromnodevisit);\r\n\t}",
"public final void setLinkVisit_ToNodeVisit(workflowexecution.proxies.NodeVisit linkvisit_tonodevisit)\r\n\t{\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column yp_config.config_mark | public String getConfigMark() {
return configMark;
} | [
"public void setConfigMark(String configMark) {\n this.configMark = configMark;\n }",
"public String getConfig_value(){\r\n\t\treturn config_value ;\r\n\t}",
"public String getMark() {\r\n return mark;\r\n }",
"public DBCConfig getConfig();",
"public String getMark() {\n return ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the Flight class that receives the origin of the flight, its destination, departure time, arrival time, date and assigned aircraft. | public Flight(String origin, String destination, LocalTime departureTime, LocalTime arrivalTime, LocalDate flightDate, Aircraft assignedAircraft) {
this.origin = origin;
this.destination = destination;
this.departureTime = departureTime;
this.arrivalTime = arrivalTime;
this.... | [
"public Flight(String number, Date deptDateTime, Date arvlDateTime,\n String airline, String origin, String destination, double price,\n int numSeats) {\n super();\n this.number = number;\n this.deptDateTime = deptDateTime;\n this.arvlDateTime = arvlDate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If called the 'remember me' file gets deleted if it exist. | private void clearRememberMe() {
Path path = FileSystems.getDefault().getPath("", REMEMBER_ME_FILE);
try {
Files.deleteIfExists(path);
} catch (Exception e) {
e.printStackTrace();
}
} | [
"public boolean checkIfRememberFileExists()\n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n if (file.exists()) return true;\n return false; \n }",
"public boolean setRememberMe()\n {\n try \n {\n File file = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns java class name from the given Signature | private static String getJavaClassNameFromSignature(XArchFlatInterface xarch, ObjRef sigRef) {
ObjRef typeElt = (ObjRef) xarch.get(sigRef, "type");
if (typeElt == null) {
return null;
}
ObjRef intfType = XadlUtils.resolveXLink(xarch, typeElt);
if (intfType == null) {
return null;
}
return CodeGenXad... | [
"String getJavaSig();",
"public String getSignatureClass() {\n\t\treturn signatureClass;\n\t}",
"public String getClassSignature() {\n return classSignature;\n }",
"String getSimpleClassName();",
"public String toBytecodeSignatureString() {\n StringBuilder out = new StringBuilder();\n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns the element matching obj if it is in the list, null otherwise. In the case of duplicates, this method returns the element closest to front. The list is not modified. | public E find(E obj)
{
Node<E> beginning=head;// Tmp variable so our head variable doens't move.
E dataholder;
while(beginning!=null)
{
if(((Comparable<E>)obj).compareTo(beginning.data)==0)
{
dataholder=obj;
... | [
"public E find(E obj){\n \t//calls contains to save from writing same code.\n \tif (contains(obj))\n\t return obj;\n\telse\n\t return null;\n\t}",
"@Override\n\tpublic T retrieveItem(T obj) {\n\t\tif(cache.contains(obj)) {\n\t\t\tfor (T objInSet : cache) {\n\t\t\t\tif (objInSet.equals(obj)) {\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an AbstractLeafADelegate object by supplying the database subsystem in the database.properties file. | public AbstractLeafADelegate(String subsystem) {
super(subsystem, 2147483647);
} | [
"public AbstractLeafADelegate(String subsystem, DBMS dbms) {\n super(subsystem, dbms, 2147483647);\n }",
"public static LeafADelegate getJndiLeafADelegate() {\n return new LeafADelegate(subsystem, JNDI_DBMS);\n }",
"public static LeafADelegate getLeafADelegate() {\n return new LeafADelegate(subsystem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will delete driver by it's id value. | @RequestMapping(value = {"/delete-driver-{id}"}, method = RequestMethod.GET)
public String deleteDriver(@PathVariable long id) {
hrService.deleteDriver(id);
return "redirect:/allDrivers";
} | [
"@Override\r\n\tpublic Driver deleteDriver(int driverId) {\r\n\t\tOptional<Driver> driverOptional = driverRepository.findById(driverId);\r\n\t\tif (!driverOptional.isPresent()) {\r\n\t\t\tthrow new DriverNotFoundException(\"Driver with driver id \" + driverId + \" does not exists\");\r\n\t\t}\r\n\t\tDriver driver =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
================================================================ Returns the max index ================================================================ | public int getMaxIndex()
{
return maxIndex;
} | [
"public abstract int maxIndex();",
"private int maxIndex() {\r\n\t\tint result = 0;\r\n\t\tfor (int i = 1; i < this.evaluationBoard.length; i++) {\r\n\t\t\tif (this.evaluationBoard[i] > this.evaluationBoard[result]) {\r\n\t\t\t\tresult = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public int getMaxIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the Pool update allowing to specify startTask. | interface WithStartTask {
/**
* Specifies the startTask property: In an PATCH (update) operation, this property can be set to an empty
* object to remove the start task from the pool..
*
* @param startTask In an PATCH (update) operation, this property can ... | [
"Update withStartTask(StartTask startTask);",
"interface WithStartTask {\n /**\n * Specifies the startTask property: In an PATCH (update) operation, this property can be set to an empty\n * object to remove the start task from the pool..\n *\n * @param st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRSPAYPLANDET_TENTATIVE_TEMP.REIMBURSED_PROFIT_FOR_ACCRUAL | public void setREIMBURSED_PROFIT_FOR_ACCRUAL(BigDecimal REIMBURSED_PROFIT_FOR_ACCRUAL) {
this.REIMBURSED_PROFIT_FOR_ACCRUAL = REIMBURSED_PROFIT_FOR_ACCRUAL;
} | [
"public void setACTUAL_REIMB_PFT_FOR_ACCRUAL(BigDecimal ACTUAL_REIMB_PFT_FOR_ACCRUAL) {\r\n this.ACTUAL_REIMB_PFT_FOR_ACCRUAL = ACTUAL_REIMB_PFT_FOR_ACCRUAL;\r\n }",
"public void setACTUAL_PROFIT_AMT(BigDecimal ACTUAL_PROFIT_AMT) {\r\n this.ACTUAL_PROFIT_AMT = ACTUAL_PROFIT_AMT;\r\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks is Dropped Entity is in the open then Spawn a Boorit Mob Entity | @Override
public boolean onDroppedByPlayer(ItemStack item, PlayerEntity player) {
World world = player.getEntityWorld();
BlockPos itemPos = item.getAttachedEntity().getPosition();
if (!world.isRemote()) {
if (world.canSeeSky(itemPos)) {
ITextComponent textCompon... | [
"public void handleSpawnMob(SSpawnMobPacket packetIn) {\n PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.client);\n double d0 = packetIn.getX();\n double d1 = packetIn.getY();\n double d2 = packetIn.getZ();\n float f = (float)(packetIn.getYaw() * 360) / 256.0F;\n float f1 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get Category Wise Vehicle customer Sale | public List categorySaleWiseCustomer(HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
String catId = request.getParameter("catId");
Map<Long, SaleReport> map = new HashMap<Long, SaleReport>();
CustomerOrderDao dao = new CustomerOrderDao();
List<SaleReport... | [
"ArrayList<VariableDiscount> getVariableDiscount(int customer_acc_no);",
"google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory();",
"public List categorySaleWise(HttpServletRequest request, HttpServletResponse response) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tString catName = request.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets Create testset end point url. | public static String createTestSet() {
return baseURL + login_required_string + "/rest/domains/" + domain + "/projects/" + project + "/test-sets";
} | [
"public static String getCreateTestRunURL() {\n\n\t\treturn baseURL + login_required_string + \"/rest/domains/\" + domain + \"/projects/\" + project + \"/runs\";\n\t}",
"private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Generate alphabetical order of the key, starting from 1. Same character has the same order (different from Cadenus.generate_order) | public static int[] generate_order(String key)
{
String key_u=key.toUpperCase();
char[] k_char=key_u.toCharArray();
Arrays.sort(k_char);
int[] result=new int[key.length()];
int cur_index=1;
int from_index=0;
for(int i=0;i<key.length();i++)
{
if(i==0 || k_char[i]==k_char[i-1])
{
//key.
int... | [
"public String generateNextKey() {\n\t\tint i = map.size();\n\t\twhile (map.containsKey(String.valueOf(i)))\n\t\t\ti++;\n\t\treturn String.valueOf(i);\n\t}",
"static String generateAlphabetLC(){\n\t\tfor (int i = 97; i <= 122; i++){\n\n\t\t\talphabetLowerCase = alphabetLowerCase + (char) i;\n\t\t}\n\t return alp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Subproject__Group__7" $ANTLR start "rule__Subproject__Group__7__Impl" InternalMyDsl.g:5502:1: rule__Subproject__Group__7__Impl : ( ( ( rule__Subproject__DescriptorAssignment_7 ) ) ( ( rule__Subproject__DescriptorAssignment_7 ) ) ) ; | public final void rule__Subproject__Group__7__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:5506:1: ( ( ( ( rule__Subproject__DescriptorAssignment_7 ) ) ( ( rule__Subproject__DescriptorAssignment_7 )* ) ) )
// Internal... | [
"public final void rule__Company__Group__7__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:1101:1: ( ( ( rule__Company__DashboardsAssignment_7 ) ) )\n // InternalMyDsl.g:1102:1: ( ( rule__Company__DashboardsA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether the player should go automatically on fullscreen or not. | public void setAutoFullscreenMode(boolean flag) {
_autoFsMode = flag;
} | [
"public void setFullscreen(boolean fullscreen);",
"boolean setFullScreen(boolean enable);",
"void setFullscreen(boolean full);",
"private void setfullscreen() {\n switch(fullScreenMode) {\n case 0:\n System.out.println(\"No Full Screen\");\n setUndecorated(false... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
clear the cells between current timestamp and lastTime. update sum. move index to current timestamp's cell [...|last|XXXXX|current| ...] the cells between are stale because they are not updated. | void moveIndex(int timestamp) {
int gap = Math.min(timestamp - lastTime, N);
int index = lastTime % N;
for (int i = 0; i < gap; i++) {
index = (index + 1) % N; //move index 1 step
sum.addAndGet(counts[index].get() * -1);
counts[index].set(0); //clear cell
... | [
"public void clear()\n {\n cells.clear();\n }",
"void clearCell(int x, int y);",
"public void clearTimes();",
"public void deleteTicks(){\n ZonedDateTime timer = ZonedDateTime.now(ZoneOffset.UTC);\n cleanup(timer, tickRecords, true);\n cleanup(timer, minTicks, false);\n cleanu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string noise = 17; | public java.lang.String getNoise() {
java.lang.Object ref = noise_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
... | [
"java.lang.String getNoise();",
"M generateNoise();",
"abstract public void makeHappyNoise();",
"public abstract double noise1(double x);",
"public abstract void makeNoise();",
"public abstract double noise(double x, double y, double z);",
"public void highscorenoise()\n {\n if(!mute)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Activity__EdgesAssignment_7_3_1" $ANTLR start "rule__OpaqueAction__NameAssignment_2" InternalActivityDiagram.g:7244:1: rule__OpaqueAction__NameAssignment_2 : ( ruleEString ) ; | public final void rule__OpaqueAction__NameAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:7248:1: ( ( ruleEString ) )
// InternalActivityDiagram.g:7249:1: ( ruleEString )
{
//... | [
"public final void rule__Activity__NameAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:7113:1: ( ( ruleEString ) )\n // InternalActivityDiagram.g:7114:1: ( ruleEString )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the controller that really implement the onXxx methods (default to this). It is intended to be overrode; you shall not have to call this method directly. | protected Object getController() {
return this;
} | [
"public Controller getController();",
"protected Controller getController() {\n return controller;\n }",
"public IFluxController getController();",
"@Override\r\n\tpublic ControllerInterface getController() {\n\t\treturn this.controllerInterface;\r\n\t}",
"public Controller getController()\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a thread and a message handler to control the capture session | private void createCameraThread() {
if (mRequestThread != null) stopCameraThread();
//Create a thread for the capture session to be handled on
mRequestThread = new HandlerThread("CameraRequests");
mRequestThread.start();
mRequestHandler = new Handler(mRequestThread.getLooper());... | [
"@FXML\n public void startCapture(ActionEvent event) throws IOException, PcapNativeException, NotOpenException {\n \tex = Executors.newScheduledThreadPool(3);\n \tallThreads = Executors.newFixedThreadPool(6);\n handle = DeviceListController.getPcapNetworkInterface().openLive(65535, PromiscuousMode.P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the video control for the media player | Object getVideoControl(Object player) {
return impl.getVideoControl(player);
} | [
"public Object getVideoControl(Object player) {\n return null;\n }",
"public VLCVideo getVLCVideo() {\n return vlcVideo;\n }",
"public ABLVideo Video() {\r\n \treturn new ABLVideo(BrickFinder.getDefault().getVideo());\r\n }",
"public VideoPlayer getVideoPlayer() {\r\n\t\treturn tempVideo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a Task to TaskList. | public void add(Task task) {
taskList.add(task);
} | [
"public void addTask(Task task) {\n taskList.add(task);\n }",
"public void addTask(Task task) {\r\n tasklist.add(task);\r\n }",
"public void addTask(Task task) {\n list.add(task);\n }",
"public void add(Task task){ this.tasks.add(task);}",
"public void add(Task task) {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the line's unit normal and make sure it points towards what should be white pixels | void computeUnitNormal(ChessboardCorner ca, double direction_a_to_b, float dx, float dy) {
float r = (float)Math.sqrt(dx*dx + dy*dy);
// it will now have a normal of 1
nx = -dy/r;
ny = dx/r;
// set the magnitude relative to the square size. Blurred images won't have sharp edges
// at the same time the mag... | [
"private static int getHalfspace( final Line line, final Vector testPoint )\n {\n // v = testPoint - start\n final double vx = testPoint.x - line.start.x;\n final double vy = testPoint.y - line.start.y;\n\n // v = normal to d\n final double nx = line.normal.x;\n final double ny = lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
data is passed into the constructor with intent | PostAdapter(Context context, List<CardInfo> data, Intent intent) {
this.layoutInflater = LayoutInflater.from(context);
this.mData = data;
this.context = context;
this.intent = intent; // use this intent
} | [
"private void setupIntentData() {\n Bundle extras = getIntent().getExtras();\n index = extras.getInt(\"index\");\n Distance = extras.getString(\"distance\");\n ServiceProviderDetails details = ((GlobalClass)getApplicationContext()).serviceProviders.get(index);\n ServiceProviderID ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Informs the user that there are no other users in the system that they can message. | public JSONObject noMessagableUsers(){
return pu.createJSON("error", "There are no users to message.");
} | [
"protected void sendNoPermMessage() {\n\t\t// ChatComponent\n\t\tPlayer player = getPlayer();\n\t\tArrayList<String> messages = new ArrayList<>();\n\t\tplayer.sendMessage(ChatColor.GREEN + \"[MultiUse] \" + ChatColor.YELLOW\n\t\t\t\t+ \"You do not have permission to use this command.\");\n\t}",
"public void nobod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getting Active Card Status details | @RequestMapping(method = RequestMethod.GET)
public ResponseEntity<ResponseDTO> getCardStatus(){
logger.info("ENTER");
List<CardStatusDTO> cardStatusList=cardStatusService.getCardStatus();
ResponseDTO responseDto = responseBuilder.buildSuccessResponse(cardStatusList,ResponseMessages.SUCCESS_CARD_STATUS_RETRIEVE,"... | [
"public boolean getCardActiveStatus() {\n return activeStatus;\n }",
"public String getCARD_ALERT_STATUS() {\r\n return CARD_ALERT_STATUS;\r\n }",
"private int getCardStatus(int slotID) {\n return cachedCardStatus[slotID];\n }",
"public int getCBRStatus();",
"public String getCardSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Makes the 'text area' hidden or shown depending on whether the specified class has a constructor with a single String parameter, and return the result | private boolean modifyTextArea(Class swingClass) {
boolean hasStringConstructor = false;
for (Constructor con : swingClass.getConstructors()) {
if (con.toString().contains("(java.lang.String)")) {
hasStringConstructor = true;
break;
}
}
... | [
"private Text buildText(String content, String styleClass) {\n\t\tText text = new Text(content);\n\t\ttext.getStyleClass().add(\"text\");\n\t\tif (styleClass != null) {\n\t\t\ttext.getStyleClass().add(styleClass);\n\t\t}\n\t\treturn text;\n\t}",
"private static String hideText(String inputText){\n return \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the shard that the explanation is about. | public ShardId getShard() {
return shardRouting.shardId();
} | [
"public int getShard() {\n return shard_;\n }",
"public int getShard() {\n return shard_;\n }",
"public int getTargetShard() {\n return targetShard;\n }",
"int getShard();",
"public int getSourceShard() {\n return sourceShard;\n }",
"com.google.cloud.documen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure that interface parameters are fetched on the handler thread so they are properly ordered with other events, such as restoring the interface MTU on teardown. | @Override
public void enter() {
mInterfaceParams = mDependencies.getInterfaceParams(mInterfaceName);
if (mInterfaceParams == null) {
logError("Failed to find InterfaceParams for " + mInterfaceName);
doImmediateProvisioningFailure(IpManagerEvent.ERROR_INTER... | [
"private void setupTapInterfaces() {\n mTetheredReader.start(mHandler);\n mTetheredParams = InterfaceParams.getByName(mTetheredReader.iface.getInterfaceName());\n assertNotNull(mTetheredParams);\n mTetheredPacketReader = mTetheredReader.getReader();\n mHandler.post(mTetheredPacket... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a variable that is within the range [minPerc, maxPerc] that is inversely related with the BMI value. An example: BMI that ranges between 15 and 40 and the percentage of natural killer that ranges between 0.02 and 0.08. BMI: 15 inverseLimitVariableToBMI(15, 0.02, 0.08) => 0.08 BMI: 27 inverseLimitVariableToBMI(27... | public static double inverseLimitVariableToBMI(int bmi, double minPerc, double maxPerc) {
int maxBMI = 40;
int minBMI = 15;
return Math.round((maxPerc + minPerc - (maxPerc - ((double)(maxBMI - bmi) / (maxBMI - minBMI)) * (maxPerc - minPerc))) * 100.0) / 100.0;
} | [
"public static double limitVariableToBMI(int bmi, double minPerc, double maxPerc) {\n\t\tint maxBMI = 40;\n\t\tint minBMI = 15;\n\t\treturn Math.round((maxPerc - ((double)(maxBMI - bmi) / (maxBMI - minBMI)) * (maxPerc - minPerc)) * 100.0) / 100.0;\n\t}",
"static void bmiInter(double bmi){\n\n if (bmi<18.5)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the geoMinY field. | public static double getGeoMinY() {
return geoMinY;
} | [
"Coordinate getMinY();",
"public int getyMin() {\n return yMin;\n }",
"public int getyMin() {\n return yMin;\n }",
"public int getyMin() {\n\t\treturn yMin;\n\t}",
"public int getY_min() {\n return y_min;\n }",
"public double get_min_y() {\n\t\treturn min_y;\n\t}",
"public int getYMin(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/resetFace() is a method that sets the face to the initialized face, or to the last facial expression the face had. | private void resetFace(){
try {
imageView[LEFT_EYEBROW].setBackgroundResource(resource[LEFT_EYEBROW]);
imageView[RIGHT_EYEBROW].setBackgroundResource(resource[RIGHT_EYEBROW]);
imageView[LEFT_EYE].setBackgroundResource(resource[LEFT_EYE]);
imageView[RIGHT_EYE].setB... | [
"public void resetImageToFaceState() {\n String iconPath = Global.IMAGE_PATH;\n switch (game.getFinished()) {\n case 0:\n iconPath += \"face-normal.png\";\n break;\n\n case 1:\n iconPath += \"face-win.png\";\n break;\n\n case 2:\n iconPath ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string passenger_id = 1; | java.lang.String getPassengerId(); | [
"public java.lang.String getPassengerId() {\n java.lang.Object ref = passengerId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This interface represents an api action to third party web server or some relational database.Its just a marker interface as nothing is common between webservice call and database call. | public interface ApiAction {} | [
"public interface APIClient {\n\n\t// regular expression to parse the action name\n\tPattern actionNamePattern = Pattern.compile(\"violet\\\\.([\\\\w]+)\\\\.([\\\\w]+)\");\n\n\t/**\n\t * The simplest type of call when only one parameter is needed Works only if\n\t * Action type is GET (no side effects)\n\t * \n\t *... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
copy from parent and modified by Jack Jiang Implementation of ComboPopup.show(). | public void show()
{
setListSelection(comboBox.getSelectedIndex());
Point location = getPopupLocation();
show(comboBox
//以下x、y坐标修正代码由Jack Jiang增加
,
location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标... | [
"protected abstract JComponent getPopUpComponent();",
"private ComboPopup getComboPopup() {\n //Accessible popup = jComboBox.getAccessibleContext().getAccessibleChild(0);\n AccessibleContext ac = jComboBox.getAccessibleContext();\n for (int i=0; i<ac.getAccessibleChildrenCount(); i++) {\n Accessible... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TB_LS_LOC_ELEC_ADDED.PLDG_PAY_DATE | public void setPLDG_PAY_DATE(String PLDG_PAY_DATE) {
this.PLDG_PAY_DATE = PLDG_PAY_DATE == null ? null : PLDG_PAY_DATE
.trim();
} | [
"public String getPLDG_PAY_DATE() {\n\t\treturn PLDG_PAY_DATE;\n\t}",
"public void setAddDate(Date addDate) {\n\t\tthis.addDate = addDate;\n\t}",
"public void setOLD_PROMISSORY_SETTLEMENT_DATE(Date OLD_PROMISSORY_SETTLEMENT_DATE)\r\n {\r\n\tthis.OLD_PROMISSORY_SETTLEMENT_DATE = OLD_PROMISSORY_SETTLEMENT_DATE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/This method parses an XML document, line by line. It individually searches tags, where ... marks the first technology, and all its children are future techs linked to the parent tech. This builds the tech tree with the help of a stack, where a tag pushes a new tech to the stack and sets the parent if it exists, and a ... | public static TechTree parseTechTree(TechTree techTree, ConstructionTree constructionTree, InputStream inputStream)
throws XmlPullParserException, IOException {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(false);
XmlPullParser xpp = fa... | [
"public void build() {\n\t\t/** COMPLETE THIS METHOD **/\n\t\tStack<TagNode> stk= new Stack<TagNode>(); //stack containing pointers to tree to keep track of position\n\t\t\n\t\troot= new TagNode(\"html\", null, null); //creating the html node as the root of the tree\n\t\tstk.push(root);\n\t\t\n\t\tint counter= 0;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets current player Hand object | public Hand getPlayerHand(){
return playerHand;
} | [
"final Hand getPlayerHand() {\n return playerHand;\n }",
"public Hand getHand();",
"public Hand getHand() {\n return hand;\n }",
"public Hand getHand() {\n return this.hand;\n }",
"public final Hand getHand() {\r\n return mHand.deepCopy();\r\n }",
"public LinkedList<Playi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when a remote execution starts | public boolean onRemoteExecutionStart(Method method, Object invoker, Object[] args); | [
"public void onExecutionStart();",
"void onServerStarted();",
"public void connectionInitiated(ShellLaunchEvent ev);",
"public void start() {\n server.setName(\"Anubis: Local Register Request Server (node \" + me.id + \")\");\n server.start();\n updateDebugFrame();\n }",
"public syn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jButton_back. Return to previous panel. | private JButton getJButton_back() {
if (jButton_back == null) {
jButton_back = new JButton();
jButton_back.setLocation(new Point(94, 480));
jButton_back.setText("Back");
jButton_back.setSize(new Dimension(208, 34));
jButton_back.addActionListener(this);
}
return jButton_back;
} | [
"public void actionPerformedBack(ActionListener back) {\n btnBack.addActionListener(back);\n }",
"private void setupBack() {\n\t\tmakeButton(\"Back\", (ActionEvent e) -> {\n\t\t\tchangeView(\"login\");\n\t\t});\n\t}",
"public void back(){\n\t\t\tback.setVisible(false);\n\t\t\tnGame.setVisible(true);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
onArmUnsync() is called whenever Myo has detected that it was moved from a stable position on a person's arm after it recognized the arm. Typically this happens when someone takes Myo off of their arm, but it can also happen when Myo is moved around on the arm. | @Override
public void onArmUnsync(Myo myo, long timestamp) {
} | [
"@Override\n public void onArmUnsync(Myo myo, long timestamp) {\n\n }",
"@Override\n public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection) {\n }",
"@Override\n\tpublic void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection, float rotation, WarmupState... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the name of the environment variable which value has been loaded as the value for the useLenientSaltSizeCheck property. | public String getUseLenientSaltSizeCheckEnvName() {
return this.useLenientSaltSizeCheckEnvName;
} | [
"public String getSaltSizeBytesEnvName() {\n return this.saltSizeBytesEnvName;\n }",
"public String getUseLenientSaltSizeCheckSysPropertyName() {\n return this.useLenientSaltSizeCheckSysPropertyName;\n }",
"public void setUseLenientSaltSizeCheckEnvName(final String useLenientSaltSizeCheckEnv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column account_fiscal_position_template.chart_template_id | public void setChartTemplateId(Integer chartTemplateId) {
this.chartTemplateId = chartTemplateId;
} | [
"public void setTemplateid(Integer templateid) {\r\n this.templateid = templateid;\r\n }",
"void setTemplateId(String templateId);",
"public void setTemplateId(Integer templateId) {\n this.templateId = templateId;\n }",
"public abstract void setTemplId(Integer templId);",
"public Integer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the data shown on the widget's graphic objects, based on the parameter forecast conditions. | private void updateData(ForecastConditions forecast) {
FormattingHelpers format = new FormattingHelpers();
String speed = format.nullSafeHelper(forecast.getWindSpeed());
windSpeed.setText("Wind speed: " + speed + "mph");
windDirectionDescription.setText("Wind direction: " + forecast.get... | [
"private void updateCharts() {\n double[][] dataLight = getChartData(\"light\"); // get data\n lightDataChart.updateXYSeries(\"a\", dataLight[0], dataLight[1], null); // Update chart\n double[][] dataSound = getChartData(\"sound\");\n soundDataChart.updateXYSeries(\"a\", dataSound[0], da... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field565' field. doc for field565 | public java.lang.CharSequence getField565() {
return field565;
} | [
"public java.lang.CharSequence getField565() {\n return field565;\n }",
"java.lang.String getField1558();",
"java.lang.String getField1655();",
"public void setField565(java.lang.CharSequence value) {\n this.field565 = value;\n }",
"java.lang.String getField1667();",
"public java.lang.CharSequ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the resolved elements in the given group. This method has the side effect of caching the resolved elements on the group object. The resolved elements may not contain nonselectable columns depending on the metadata first used for resolving. | public static List resolveElementsInGroup(GroupSymbol group, QueryMetadataInterface metadata)
throws QueryMetadataException, MetaMatrixComponentException {
return new ArrayList(getGroupInfo(group, metadata).getSymbolList());
} | [
"List getElementIDsInGroupID(Object groupID) throws Exception;",
"ISearchResults<? extends IDeviceGroupElement> listDeviceGroupElements(UUID groupId, ISearchCriteria criteria)\n\t throws SiteWhereException;",
"public Object getFromGroup( Object name, String group )\n {\n ICacheElement element = thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put an object into the script environment. This operation is also known as "binding" an object to the scripting environment. If the scripting infrastructure supports different scopes (e.g., JSR 223), then this method puts the object in the global scope. | public void put(String name, Object object)
throws UnifiedScriptException
{
try
{
bsfManager.declareBean(name, object, object.getClass());
bindings.put(name, object);
}
catch (BSFException ex)
{
throw new UnifiedScriptException("Ca... | [
"@Override\n protected void _putObjectToActorInstance(String name, Object object) throws ScriptException {\n String globalName = \"_yyy_\" + name;\n _engine.put(globalName, object);\n _engine.eval(_ACTOR_INSTANCE_NAME + \".\" + name + \" = \" + globalName);\n }",
"public void putValueTo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for the shipmentType corresponding to the query. | @Override
@Transactional(readOnly = true)
public List<ShipmentTypeDTO> search(String query) {
log.debug("Request to search ShipmentTypes for query {}", query);
return StreamSupport
.stream(shipmentTypeSearchRepository.search(queryStringQuery(query)).spliterator(), false)
... | [
"public ShopShipmentTypeEntity getByShopAndShipmentType(int shopId, ShipmentType shipmentType) throws DaoException;",
"List<ShipmentInfoPODDTO> search(String query);",
"public void setShipType(String shipType) {\n this.shipType = shipType;\n }",
"public ShipType getType() {\r\n return type;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a KMZ file representing the given list of placemarks. | protected List<LatLonPlacemarkIFace> exportPlacemarkList(final String description,
final List<LatLonPlacemarkIFace> placemarks,
final ImageIcon imgIconArg,
... | [
"public void generateKMZ(File kmzFile, Route r) {\n byte[] buf = new byte[2048];\n try {\n kmzFile.createNewFile();\n ZipOutputStream zipFile = new ZipOutputStream(new FileOutputStream(kmzFile));\n zipFile.putNextEntry(new ZipEntry(\"doc.kml\"));\n writeKml(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the source. This is anything that can reference something to be turned into a MosaicFragment like a bitmap, an image or a file. | S getSource(); | [
"java.lang.String getSrc();",
"public String getSource();",
"com.google.cloud.vision.v1.ImageSource getSource();",
"public Object getSource() {\n\t\treturn fSource;\n\t}",
"public final SimObject getSource() {return source;}",
"public Source getSource()\n {\n if (streams.isEmpty()) return null;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes reviews count per movie, sorted by reviews count in decreasing order, for movies with same amount of review should be ordered by product id. Returns only top k movies with highest review count. | List<MovieCountedReview> reviewCountPerMovieTopKMovies(final int topK) {
List<MovieCountedReview> list = new ArrayList<>();
// check k validity
int k = getRealTopK(topK, moviesCount());
if (k > 0) {
// map to pair of pID and 1
// then reduce by key to count the r... | [
"Movie mostPopularMovieReviewedByKUsers(final int numOfUsers) {\n // similar to getTopKMoviesAverage only filter by numOfUsers to be as specified\n List<Movie> popularMovieFiltered = movieReviews\n .mapToPair(s-> new Tuple2<>(s.getMovie().getProductId(), new Tuple2<>(s.getMovie().getScore(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo para execultar os movimentos no tabuleiro | void movimento(String commands){
//Converte os movimentos recebidos em coordenadas para a matriz
int x1, x2, y1, y2;
x1 = 7-((int)commands.charAt(1)-48);
y1 = (int)commands.charAt(0)-96;
x2 = 7-((int)commands.charAt(4)-48);
y2 = (int)commands.charAt(3)-96;
//Verif... | [
"public abstract Casilla ejecutaMovimiento(int f, int c, Superficie tablero);",
"private void reiniciarAuxiliaresMovimentavel(int metodoExecucao){\n if (metodoExecucao == METODO_MOVIMENTAR_NENHUM) {\n //movimentar\n contQuadradoX = 0;\n contQuadradoY = 0;\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
. Creates a new eventCalendarTest test object. | public EventCalendarTest()
{
// The constructor is usually empty in unit tests, since it runs
// once for the whole class, not once for each test method.
// Per-test initialization should be placed in setUp() instead.
} | [
"public void testAddEvent()\n {\n // Tests for cases of the addEvent(Event inEvent) method\n Event testEvent = new Event(\"the governator\", \"vote or die\",\n \"just vote..\", \"12302010\");\n testCalendar.addEvent(testEvent); \n assertEquals(testCalendar.getDaysEven... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ID of the service account to create an API key for. To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request. If not specified, it defaults to the subject that made the request. string service_account_id = 1 [(.yandex.cloud.length) = "<=50"]; | public com.google.protobuf.ByteString
getServiceAccountIdBytes() {
java.lang.Object ref = serviceAccountId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
... | [
"public java.lang.String getServiceAccountId() {\n java.lang.Object ref = serviceAccountId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.C2G_LoginParms C2G_LoginParms = 3; | boolean hasC2GLoginParms(); | [
"@java.lang.Override\n public com.zy.common.message.generate.RequestMessageProtoBuf.C2G_LoginParms getC2GLoginParms() {\n if (dataBodyCase_ == 3) {\n return (com.zy.common.message.generate.RequestMessageProtoBuf.C2G_LoginParms) dataBody_;\n }\n return com.zy.common.message.generate.Request... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a request builder for the WorkbookChartSeries collection | @Nonnull
public WorkbookChartSeriesCollectionRequestBuilder series() {
return new WorkbookChartSeriesCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("series"), getClient(), null);
} | [
"IWorkbookChartItemRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions);",
"public interface IWorkbookChartItemRequestBuilder extends IRequestBuilder {\n\n /**\n * Creates the IWorkbookChartItemRequest\n *\n * @param requestOptions the options for ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the taxName value for this DocumentLineDetail. | public void setTaxName(java.lang.String taxName) {
this.taxName = taxName;
} | [
"public void setTaxId(java.lang.String taxId)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TAXI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modifies the actual pipeline element filters for primitive coordination commands. | static void modifyPipelineElementFilter(CoordinationCommand command, boolean addFilter,
IPipelineElementFilterCreator<?> creator) {
FPathCoordinationCommandVisitor vis = new FPathCoordinationCommandVisitor();
command.accept(vis);
List<String> fPath = vis.getFrozenStatePath();
... | [
"public void updateFilter() { }",
"public abstract void updateFilter();",
"public void updateFilter() \n { \n /* [GNPP] you may comment out if not debugging. */\n //gnpp.updateFilter();\n }",
"public void addFilterToMethods(ViewerFilter filter);",
"public void addFilterToAttributes(ViewerFilter filt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To retrieve the release year, the original json string is splitted using the character | private String extractReleaseYear(String date){
String [] splittedString = date.split("-");
return splittedString[0];
} | [
"public static String getReleaseYearFromSting(String response) {\n String releaseYearRegex = \"(?<=\\\"release_year\\\\\\\\\\\":)([\\\\s\\\\S]+?)(?=,)\";\n return getFirstMatchByRegex(response, releaseYearRegex);\n }",
"private static String extractReleaseYear (String releaseDate) {\n\t\tfinal in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares LineItem objects on the basis of the their cost. Highest cost will be listed first | @Override
public int compareTo(LineItem otherLineItem) {
double difference = getCost() - otherLineItem.getCost();
// if the difference is between -1.0 and 1.0 then it is within a dollar
if (difference >= -1.0 && difference <= 1.0) {
return 0;
}
// list the highest... | [
"@Override\n public int compareTo(LineItem other) {\n return (int)(other.getCost() - this.getCost()); // Decreasing order\n }",
"@Override\n public int compare(Vertex o1, Vertex o2) {\n Integer value1 = vertexCosts.get(o1);\n Integer value2 = vertexCosts.get(o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the ImageView, which hosts the image that we will paint in this view | public void setImageView(ImageView imageView) {
_imageView = imageView;
} | [
"public void setImageView(ImageView imageView){\r\n _imageView = imageView;\r\n }",
"public ImageView setImageView(ImageView imageView){\n imageView.setImageResource(imageSource);\n return imageView;\n }",
"private void setImageView() {\n // Set the padding to match the Status ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |