query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Only executes if there was a previous location | public void restore()
{
if(this.lastLocation != null)
{
this.setDirection(this.lastDirection);
Actor actorAtLast = this.getGrid().get(this.lastLocation);
//Only moves bug if there is a flower, or a blank space
if(actorAtLast == null || actorAtLast instanceof Flower)
this... | [
"public void restartLocationUpdate();",
"@Override\n\tpublic void onLocationLost() {\n\n\t}",
"public void lastLocation( final Location loc ) {\n lastLoc = loc;\n lastLocWhen = System.currentTimeMillis();\n }",
"@Override\n public void onLocationChanged(Location location) {\n this.lastLoca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated method Getter of the AbstractDiscountRow.currency attribute defined at extension europe1. | @Accessor(qualifier = "currency", type = Accessor.Type.GETTER)
public CurrencyModel getCurrency()
{
return getPersistenceContext().getPropertyValue(CURRENCY);
} | [
"@Override\n public Currency getCurrency();",
"public Currency currency() {\n return currency;\n }",
"public Currency getCurrency() {\r\n return currency;\r\n }",
"@Override\n\tpublic Currency getCurrency() {\n\t\treturn currency;\n\t}",
"public Currency getCurrency()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bot doesn't have pid, so return 1 | @Override
public int getPid() {
return -1;
} | [
"@java.lang.Override\n public boolean hasPid() {\n return instance.hasPid();\n }",
"boolean hasKillNumber();",
"static public boolean isProcessRunning (int pid) { throw new RuntimeException(); }",
"public boolean hasPid() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle navigation view item clicks here. | @SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.nav_clientes) {
getFragmentManager().beginTransaction().replace(R.id.content_main,new ClienteListaFragment(),CLIENTE_LISTA).addToB... | [
"void onNavigationItemClick(int item);",
"public void ClickItem(View view){\n MainActivity.redirectActivity(this, item.class);\n }",
"@Override\n public void clickitem(View view, final int position) {\n\n }",
"@Override\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dispatches commandline arguments to the tool via the ToolRunner. | public static void main(String[] args) throws Exception {
int res = ToolRunner.run(new Configuration(), new BuildIndexableAnchorCollection(), args);
System.exit(res);
} | [
"public void setCommandLineArgs(String[] args);",
"protected int runTool(String args) throws Exception {\n return runTool(args.split(\" \"));\n }",
"public abstract String getCommandLineFor(String tool_name);",
"public static void main(String[] args) {\n\t// Tool t = new Tool();\n\t// t.run(args);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the javascript content of a javascript file parsed with java contents. | public static String load(String filename, Map<String, Object> variables) throws IOException {
JavascriptResource jsFile = new JavascriptResource(variables);
jsFile.loadFile(filename);
return jsFile.parseContent();
} | [
"@GET\n @Path(\"/js/{file-name}\")\n public void getJsFile(HttpRequest request, HttpResponder responder, @PathParam(\"file-name\") String fileName) {\n try {\n byte[] encoded = Files.readAllBytes(Paths.get(Constants.JS_PARENT_PATH + fileName));\n\n ByteBuffer b = ByteBuffer.alloca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns static instance of line with tabs. | public static AbTabLine getAbTabLine() {
return tabbedArea;
} | [
"public JBBPTextWriter Tab() throws IOException {\n this.Space(this.spacesInTab - (this.linePosition % this.spacesInTab));\n return this;\n }",
"public LineFactory getLineFactory();",
"public IndentableLineBuffer() {\n this.lines = new ArrayList<IndentableLine>();\n /* these are standard d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make space for new element, say newNode. Store element in newNode's data. Set newNode's next to empty. Set newNode's previous to empty. | @Override
public void AddAtFront(int element) {
DoublyListNode newNode = new DoublyListNode(element);
// if list is empty then
if (head == null) {
// Set head and tail to newNode.
head = newNode;
tail = newNode;
// Stop.
return;
}
// Set neWNode's next to head
newNode.next = head;
// Set... | [
"private void increaseCapacity() {\r\n MemoryArea.getMemoryArea(this).executeInArea(new Runnable() {\r\n public void run() {\r\n Node <E> newNode0 = newNode();\r\n _tail._next = newNode0;\r\n newNode0._previous = _tail;\r\n\r\n Node <E> n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a solution using the first fit algorithm with the given items | public List<Bin> generateSolution(List<Item> items, float alpha) {
List<Bin> solution = new ArrayList<>();
for (Item i : items) {
Map<Bin, Float> candidates = new HashMap<>();
for (Bin b : solution) {
int sum = b.getWeightUsed() + i.getWeight();
fl... | [
"public static String solve(List<Sample> samples) {\n\t\tStringBuilder finalAnswer = new StringBuilder();\n\t\tint capacity = 0;\n\t\tList<Item> itens;\n\t\t\n\t\tfor (Sample sample : samples) {\n\t\t\tcapacity = sample.getCapacity();\n\t\t\titens = sample.getItens();\n\t\t\t\n\t\t\t/*\n\t\t\t * for each set of lin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Variable auxiliar para almacenar el resultado | private double calculaOperandoVariables(int ind, Vector<Double> c, Vector<Double> p) {
double aux = 0.0;
// Indice para recorrer el vector de componentes
int j = 0;
// En el caso de procesar U1, el primer Ui
if (ind == -1) {
ind = 0;
}
while (j ... | [
"@Override\n protected void hacerAlmacenarResultado() {\n }",
"public java.lang.String[] getResultado(){\r\n return localResultado;\r\n }",
"public static resultado desordenarResultados(resultado resultado){\n\t\t\n\t\tString temp;\n\t\t\n\t\tswitch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expect a list of session keys, followed by a single encrypted packet. | public final static FileInfo extractEncryptedData
(InputStream in, List<PGPPublicKeyRing> signers, PGPPrivateKey enckey,
OutputStream out)
throws PGPException, IOException, SignatureException
{
PGPObjectFactory pgpF = new PGPObjectFactory(in);
Object o = pgpF.nextObject();
... | [
"public void sendSessionKey(byte[] encryptedKey, String username) throws java.rmi.RemoteException, InvalidKeyException, NoSuchPaddingException, NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException;",
"private String Send_SSH_CMSG_SESSION_KEY(byte[] anti_spoofing_cookie,\n\t\t\tbyte[] server_ke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method is sued to write the list object of items into text file | public static void writerrr(List<Object> writeobject, String texfileName, String whichResponse) {
FileWriter fw = null;
File apiresultfoldr = null;
File dbresulfoldr = null;
try {
apiresultfoldr = new File(apiresultLocation);
dbresulfoldr = new File(dbresultLocation);
apiresultfoldr.mkdir();
dbres... | [
"private void writeItems() {\n try {\n FileUtils.writeLines(getDataFile(), items);\n } catch (IOException e) {\n //print the error\n e.printStackTrace();\n }\n }",
"public void writeItemsToFile(List<Item> items) {\n addAllItems(items);\n write... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A test whose essence is: `lang()`. . | @org.junit.Test
public void kNodeLangFunc1() {
final XQuery query = new XQuery(
"lang()",
ctx);
try {
result = new QT3Result(query.value());
} catch(final Throwable trw) {
result = new QT3Result(trw);
} finally {
query.close();
}
test(
error("XPST0017")
... | [
"@Test\n public void langEnvTest() {\n // TODO: test langEnv\n }",
"@Test\r\n\tpublic void t17_i18N1() {\r\n\r\n\t}",
"@Test\n public void testStaticInitialization() {\n System.out.println(Language.getDefaultLanguage());\n }",
"public interface ILang{String lang();public Map lang(Map... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to configure EditClientFeatures OrderHoldQueue Check Box | public static String OrderHoldQueuesettings() throws Exception{
APP_LOGGER.startFunction("OrderHoldQueuesettings");
String retval = Globals.KEYWORD_FAIL;
String tempRetval = Globals.KEYWORD_FAIL;
int timeOutInSeconds = 20;
try {
String stepName = "EditClientFeatures OrderHoldQueue Check Box";
tempRetval = sc.w... | [
"@Override\n public boolean configure(StaplerRequest staplerRequest, JSONObject json) throws FormException {\n shutdownMessage = json.getString(\"shutdownMessage\");\n allowAllQueuedItems = json.getBoolean(\"allowAllQueuedItems\");\n allowWhiteListedProjects = json.getBoolean(\"allowWhiteLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize the contents of the frame. | private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 800, 600);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
/*Interfazearen elementuak*/
informazio_panela = new JPanel();
informazio_panela.setBounds(0, 0, 784, 258);
frame.get... | [
"public void initializeFrame();",
"private void initialize() {\n\t\tsetFrame();\n\t\tsetheader();\n\t\tsetList();\n\t}",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public frame() {\n initComponents();\n read_init_config();\n }",
"private void initialize() {\n\t\tinitData... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read a password from console with a customized message. | public static String readPassword(String message) {
Console console = System.console();
if (console == null) {
System.out.print(message);
System.out.flush();
return SCANNER.nextLine();
}
return new String(console.readPassword(message));
} | [
"public String readPassword() {\n Console console = System.console();\n String enteredPassword = new String(console.readPassword(\"Please enter your password: \"));\n return enteredPassword;\n }",
"public String readPassword() {\n if(this.console == null) {\n return this.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Failed to acquireToken | @Override
public void onError(MsalException exception) {
Log.d(TAG, "Authentication failed: " + exception.toString());
if (exception instanceof MsalClientException) {
/* Exception inside MSAL, more info inside the exception */
Log.d(TA... | [
"void fetchAccessToken() throws UnableToAcquireAccessTokenException;",
"TokenResponse issueToken(TokenRequest tokenRequest);",
"String getAccessToken() throws Exception;",
"public void getToken() throws EnvisionException {\n String timestamp = String.valueOf(System.currentTimeMillis());\n\n Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
type = 0 start init type =1 gi nye betingelser | @Override
public void chemicalReactionInit() {
chemicalReactionOperations = new ChemicalReactionOperations(this);
chemicalSystem = chemicalReactionOperations.hasRections();
} | [
"protected void initStart() { \n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void start() {\n\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void start() {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void start(){\n\t\t\n\t}",
"private void start()\n\t{\n\t\t\n\t}",
"@Override\r\n\tpublic void initiate() {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform delete operation on virtual tree. | @Synchronized
public void delete(String path) {
ContentId value = files.get(path);
if (null == value) {
throw new IllegalArgumentException("Deleting non-existing path");
}
log.info(">DELETE [{}]:{}:{}", storageTag(), path, value);
files.remove(path);
publ... | [
"void delete(PhyloTree pTree);",
"public abstract void deleteNode(T deleteItem);",
"public void delete(K k){\r\n\t\tif (this.isEmpty())\r\n\t\t\tthrow new ContainerEmpty280Exception(\"Error, tree empty.\");\r\n\t\tif (!this.rootNode.isInternal()){\r\n\t\t\tthis.rootNode = null;\r\n\t\t}\r\n\t\telse\r\n\t\t\taux... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required uint32 map_area_info_id = 1; | public boolean hasMapAreaInfoId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
} | [
"private GeographicAreaMapper(){}",
"int getMapWidth() {\n return mapWidth;\n }",
"public void getMAP() {\n\n }",
"public int getMapResolution() {\n return resolution;\n }",
"public static HTML buildWorldMap() {\n\t\t\n\t\tHTML mapHtml = new HTML();\n\t\tStringBuffer map = new StringBuffer();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Captures the sound and record into a WAV file | void start() {
try {
AudioFormat format = createAudioFormat();
DataLine.Info info = new DataLine.Info(TargetDataLine.class, format);
// checks if system supports the data line
if (!AudioSystem.isLineSupported(info)) {
System.out.println("Line not supported");
System.exit(0);
}
line = (Targe... | [
"private void startRecording() {\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n /**In the lines below, we create a directory VoiceRecorderSimplifiedCoding/Audios in the pho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes task by id. | @RequestMapping(value = "/rest/harvester/tasks/{taskId}/execute", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ProcessResponse> executeTask(@PathVariable UUID taskId, @RequestParam(required = false) Boolean ignoreRobots, @RequestParam(required = false) Boolean increm... | [
"public void runTask(long id) throws Exception;",
"abstract Task getTask(int id);",
"public Object apply(String id, IExecuteTask host, Object... params);",
"Task getById(int id);",
"public void executeTask(BigInteger taskid, BigInteger caseid) throws Exception {\n Timestamp ts = new Timestamp(System.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the emotional state to the state passed to the function | public void setEmotionalState(String state){
this.currentState = state;
} | [
"void setEmotion(final Emotion emotion);",
"public abstract void setState(GameFigureState state);",
"void setState(MachineState state) throws GkException;",
"public void setState(State state) { model.setState(state); }",
"protected abstract void setState(Object entity, STATE s);",
"private void setState(S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table sys_role_dept | int updateByPrimaryKey(SysRoleDept record); | [
"@Override\r\n\tpublic String getTableName() {\n\t\treturn \"role\";\r\n\t}",
"public List<RoleBean> SelectRoleDept() {\n\t\treturn roleDao.SelectRoleDept();\r\n\t}",
"public List<RoleBean> selectRoleByDeptName(String deptName) {\n\t\treturn roleDao.selectRoleByDeptName(deptName);\r\n\t}",
"public String getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the BUSSTOPS table. This will hold the data of bus stops which we would be storing in SQLite DB. | @Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
final String SQL_CREATE_BUSSTOPS_TABLE = "CREATE TABLE " + BusContract.BusStopsEntry.TABLE_NAME
+ "("
+ BusContract.BusStopsEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ BusContract.BusStop... | [
"public static void createTrafficDataTable(){\r\n Connection connect= DB.getConnection();\r\n //make a request/querry to the database\r\n String sql= \"CREATE TABLE if not exists TrafficData\"\r\n +\"(\"+\r\n \"count_point_id INTEGER PRIMARY KEY,\"+\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Auto generated getter method | public java.io.xsd.File getAbsoluteFile(){
return localAbsoluteFile;
} | [
"public MethodDoc getGetter()\r\n {\r\n return m_jvdGetter;\r\n }",
"public long getGetter() {\n return getter_;\n }",
"public T get() {\n return value;\n }",
"public abstract M get();",
"@Override\n \tpublic String get() {\n \t\treturn null;\n \t}",
"public Object get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to initialize the thradlocal driver on the basis of given browser | public WebDriver setUpSauce(String browserName, String platformName, String versionName, String methodName) {
System.out.println("browser name is : " + browserName);
MutableCapabilities sauceOpts = new MutableCapabilities();
sauceOpts.setCapability("name", methodName);
sauceOpts.setCapability("build", "Java... | [
"public static void browserInitialization() {\n\n\t\tString browserName = prop.getProperty(\"browser\");\n\n\t\tif(browserName.equals(\"chrome\")) {\t\t\t\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", prop.getProperty(\"chromeLocation\"));\n\t\t\tchromeOptions.addArguments(\"headless\");\n\t\t\tchromeOptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return reverseBetweenByIter(head, m, n); | public ListNode reverseBetween(ListNode head, int m, int n) {
if (head == null) {
return null;
}
if (head.next == null)
return head;
return reverseBetweenRecu(head, m, n);
} | [
"static Node reverseBetween(Node head, int m, int n) {\n int currentPos = 1;\n Node currentNode = head, start = head; // start node is the node just before M\n while (currentPos < m) { // to move start node just before M and currentNode at M\n start = currentNode;\n curren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
implementing the abstarct class method. | public boolean isPrime(int n) {
if (n % 2 == 0)//if n can be devide 2 return false
return false;
for (int i = 3; i * i < n; i += 2)//into the for loop that begins with 3 checks devisible numbers.
if (n % i == 0)
return false;
return true;
} | [
"@Override\n }",
"@Override\n\tpublic void aamir() {\n\n\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\n\t\tpublic void classement() {\n\t\t\t\n\t\t}",
"@Override\r\n public void publicando() {\n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@O... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor to night ID | public int getID() {
return this.ID;
} | [
"int getTowerTileId();",
"int getMonsterActivityId(int index);",
"int getReviveSeasonUid();",
"long getLeftUserMonsterId();",
"public int getDay() {\n return dayInGameTime;\n }",
"public long getTeamid();",
"public int getWagonId() {\n return wagonId;\n }",
"public int getTreatyId(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
compareTo method as placeholder | @Override
public int compareTo(Avenger other)
{
if (other == null)
return -1;
return this.getAlias().compareTo(other.getAlias());
} | [
"public int compareTo( Object o );",
"public void testCompareTo() {\n System.out.println(\"compareTo\");\n Object o = null;\n ComponenteBaseStandar instance = new ComponenteBaseStandar();\n int expResult = 0;\n int result = instance.compareTo(o);\n assertEquals(expResult,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display numbers in lines of 10. Print an array of integers in multiple lines Each line contains 10 numbers. | static void display(int[] arr) {
int i = 0;
while (i < arr.length) {
System.out.print(arr[i] + " ");
if (++i % 10 == 0)
System.out.println();
}
System.out.println();
} | [
"static void printArray(int nums[]){\n for (int i = 0; i < nums.length; i++){\n System.out.printf(\" %3d\", nums[i]);\n if ((i + 1) % 10 == 0){\n System.out.println();\n }\n\n }\n System.out.println();\n }",
"private static void printArry(Lis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uses a transaction to insert the seat and the related EventSeat. If something goes wrong rollback. Therefore, we won't have a resulting unassigned seat | public void addSeatAndInsert(EventSeat eventSeat) throws PersistenceException {
SqlSession session = sqlSessionFactory.openSession();
try {
SeatMapper seatMapper = session.getMapper(SeatMapper.class);
EventSeatMapper eventSeatMapper = session.getMapper(EventSeatMapper.class);
// Insert the Seat
seat... | [
"@Override\r\n\tpublic Seat chooseSeat(Seat seat) throws SeatNotVacant {\n\t\tOptional<Seat> findById = sdao.findById(seat.getSeatId());\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\tif((findById.isPresent()) && (findById.get().getSeatStatus().equals(seat.getSeatStatus().AVAILABLE))) {\r\n\t\t\t\t\t\tfindById.get().setSeatStat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called from within the constructor to initialize the form. WARNING: Do NOT enfify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabelMNome = new javax.swing.JLabel();
jLabelMCrm = new javax.swing.JLabel();
jLabelMCpf ... | [
"public StForm() {\n initComponents();\n }",
"public CineForm() {\n initComponents();\n }",
"public EditDemographicForm() {\n initComponents();\n }",
"public javaform() {\n initComponents();\n }",
"public FightForm() {\n initComponents();\n }",
"public For... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Explores the whole configuration tree and invokes the specified builder's callback methods. | public void build(ConfigurationBuilder builder) throws ConfigurationException {
builder.startConfiguration();
build(builder, root);
builder.endConfiguration();
} | [
"private static void configureBuilder(Builder builder) {\n\t}",
"public interface ConfigurationCustomizer extends Consumer<Meecrowave.Builder> {\n }",
"Configuration set(ExecuteListenerProvider... newExecuteListenerProviders);",
"@Test\n public void testReactOnSubBuilderChange() throws ConfigurationExce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the resource feed. | public CarbideSyndFeed getResourceFeed() {
validateFeeds();
return resourceFeed;
} | [
"Feed getAsFeed();",
"<Feed> Feed getFeed();",
"private void downloadFeed() {\n APIService.startActionGetFeed(this, SyncReceiver.receiver);\n //Temp Code for placeholder:\n //This Code Parses the JSON resposne.\n }",
"public List<String> getFeed() { return this.feed; }",
"private Col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This test validates that the getter of user returns the correct value | @Test
public void testGetUser() throws Exception {
logger.info("Starting testGetUser");
assertEquals(exT1.getUser(), exT2.getUser());
logger.info("Finishing testGetUser");
} | [
"@Test\n public void getUser() {\n cleanEntity();\n\n ReflectionTestUtils.setField(entity, \"user\", user);\n assertEquals(entity.getUser(), user);\n }",
"@Test\r\n public void testGetEmail() {\r\n System.out.println(\"getEmail\");\r\n User instance = user;\r\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 9 /Coverage entropy=0.6931471805599453 | @Test(timeout = 4000)
public void test09() throws Throwable {
JRip jRip0 = new JRip();
try {
jRip0.rulesetForOneClass((-751.091086), (Instances) null, (-751.091086), (-751.091086));
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
... | [
"@Test(timeout = 4000)\n public void test153() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFEntr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new java... | [
"public StForm() {\n initComponents();\n }",
"public CineForm() {\n initComponents();\n }",
"public javaform() {\n initComponents();\n }",
"public EditDemographicForm() {\n initComponents();\n }",
"public FightForm() {\n initComponents();\n }",
"public For... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: 2016/5/15 cannot stop thread before connected (Right Now!) | @Deprecated
public void cancel(ActionEvent actionEvent){
taskThread.stop();
connectionTask.cancel();
} | [
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tprocessWifiConnected();\n\n\t\t\t\t\tG.Log(\"MESSAGE_WIFI_CONNECTED_ARRIVED: DONE RUNNABLE THREAD!\");\n\n\t\t\t\t\tbambiStopSelf();\n\t\t\t\t}",
"public void run() {\n try {\n Thread.sleep(TIMESTEP);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the root and flattens the tree | public int root(int i){
while(i != ids[i]) {
ids[i] = ids[ids[i]];
i = ids[i];
}
return i;
} | [
"private ResultType flattenTree(TreeNode root) {\n\t\tif (root == null) {\n\t\t\treturn new ResultType(null, null);\n\t\t}\n\t\t\n\t\tif (root.left == null && root.right == null) { // is leaf\n\t\t\treturn new ResultType(root, root);\n\t\t}\n\t\t\n\t\tResultType left = flattenTree(root.left);\n\t\tResultType right ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sorting the Element in the | static void sortList() {
Node current = head, index = null;
int temp;
if(current == null) {
return;
}
else {
while(current != null) {
index = current.pointer;
while(index != null) {
if(current.Value > in... | [
"@Override\n\tpublic void sortElem() {\n\n\t\t for (int i=0; i< count-1; i++){\n\t\t \tfor (int j=0; j< (count-1)-i; j++){\n\t\t \t\t\n\t\t \t\t if (arr[j]>arr[j+1]){\n\t\t \t\t\t int temp=arr[j+1];\n\t\t \t\t\t arr[j+1]=arr[j];\n\t\t \t\t\t arr[j]=temp;\n\t\t \t\t }\n\t\t \t}\n\t\t }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the flag that indicates whether or not all players in the world are sleeping. | public void updateAllPlayersSleepingFlag() {
this.allPlayersSleeping = !this.playerEntities.isEmpty();
Iterator var1 = this.playerEntities.iterator();
while (var1.hasNext()) {
EntityPlayer var2 = (EntityPlayer) var1.next();
if (!var2.isPlayerSleeping()) {
this.allPlayersSleeping = false;
break;
... | [
"public void updateAllPlayersSleepingFlag()\n {\n allPlayersSleeping = !playerEntities.isEmpty();\n Iterator iterator = playerEntities.iterator();\n\n do\n {\n if (!iterator.hasNext())\n {\n break;\n }\n\n EntityPlayer entityp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the inital memory configuration for a region resource. | public int getRegionMemoryInitialSize(RegionResourceType resource) {
switch(resource.getFlag()) {
case DbConstants.DB_MEM_LOCK:
return initResourceLocks;
case DbConstants.DB_MEM_LOCKOBJECT:
return initResourceLockObjects;
case DbConstants.DB_ME... | [
"public String getCurrentRegion() {\r\n return region;\r\n }",
"public Long getRegion() {\n return region;\n }",
"public static String getRegion() {\r\n\t\treturn region;\r\n\t}",
"public static Cache getLocalRegion(){\r\n\t\treturn getCacheRegion(Region.localRegion);\r\n\t}",
"protected... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Slow unit test category. Surefire should exclude this test unless explicitly required. | public interface Slow {} | [
"public interface SlowTests {\n\n}",
"@Ignore\r\n @Test\r\n public void testExecute() {\r\n }",
"@Ignore\n @Test\n public void dummyTest() {\n }",
"@Test\n @Ignore(\"Tested in TestWriteXXX procedures\")\n public void testStop() {\n }",
"@Override\n public void testSkipped() {\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the last name for this user. | void setLastName(String lastName); | [
"public void setUser_last_name(String user_last_name) {\n\t\tthis.user_last_name = user_last_name;\n\t}",
"public void setLastname(String newValue);",
"public void setLastName(String value)\r\n {\r\n lastName.set(value);\r\n }",
"public void setLastName(String lastName) {\r\n ValidationUti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
logic to verify the final state after transaction has rolled back | @AfterTransaction
public void baseDeveEstarVaziaAoFinalDoTeste() {
} | [
"boolean hasRollbackFrom();",
"protected abstract boolean canRollbackTransaction_impl(Object status);",
"private void tryCommit() {\n try {\n sessionFactory.getCurrentSession().getTransaction().commit();\n } catch (TransactionException e1) {\n LOG.log(Level.SEVERE, \"Failed t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets some hibernate properties (what would exist in the JPA persistence.xml) | @Bean
public Properties hibernateProperties() {
Properties properties = new Properties();
properties.put("hibernate.hbm2ddl.auto", SCHEMA_EXPORT_TYPE);
properties.put("hibernate.default_batch_fetch_size", DEFAULT_BATCH_SIZE);
properties.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
pro... | [
"private static Properties hibernateProperties() {\n Properties props = new Properties();\n props.setProperty(\"hibernate.dialect\",\n \"org.hibernate.dialect.MySQL5Dialect\");\n props.setProperty(\"hibernate.show_sql\", \"true\");\n return props;\n }",
"Pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
simple test to make sure it works | public static void main(String[] args) {
Point origin = new Point();
Point p1 = new Point(2, 45);
Point q = new Point(p1);
q.setY(-3);
System.out.printf("origin = %s\n", origin);
System.out.printf("p1 = %s\n", p1);
System.out.printf("q = %s\n", q);
System.out.printf("origin.dist((1, 1)) = %s\n", origin... | [
"private void doTest() {\r\n\r\n\t}",
"@Test\n\t\tpublic void test()\n\t\t{\n\t\t}",
"public void testSimple() {\n assertTrue(true);\n }",
"@Test\r\n \tpublic void test() {\n \t\tassert (true);\r\n \r\n \t}",
"private void testing() {\n\t}",
"@Test\n void testPrintCrimes() {\n facade.printCr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for NET_VALUE using the alias name NetValue. | public Long getNetValue() {
return (Long) getAttributeInternal(NETVALUE);
} | [
"public Number getValue() {\n return (Number)getAttributeInternal(VALUE);\n }",
"public String getValue() {\n return getAttributeValue(ATTR_VALUE);\n }",
"org.cwv.client.sdk.model.Account.AccountValue getValue();",
"public Object getAttributeValue(String n) {\n \tif(WellKnownAttr.PREFIX... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of updatePlan method, of class ProtectedController. | @Test
public void testUpdatePlan() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
ImpPlan plan = null;
boolean warningFlag = false;
JSONResponse expResult = null;
JSONResponse result = instance.updatePlan(request,... | [
"@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n instance.update();\r\n assertEquals(instance.startDate, pool.getReport().getStartDate());\r\n assertEquals(instance.endDate, pool.getReport().getEndDate());\r\n assertTrue(instance.allVisits.equals(po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Business Method'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseBusinessMethod(BusinessMethod object) {
return null;
} | [
"public T casePSLBiconditional(PSLBiconditional object)\n {\n return null;\n }",
"public T caseBusinessLogicLayer(BusinessLogicLayer object)\n {\n return null;\n }",
"public T caseBusinessRule(BusinessRule object) {\n\t\treturn null;\n\t}",
"public T caseBinary(Binary object) {\r\n\t\treturn null;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
At this point, the file located in filePath must be copied to the file in outputFilePath | public int selectArtificialFragments(String filePath, String outputFilePath, double stdCoefficient,
int fragmentSize, int numOfArtificialFrags) {
copyFileFragment(filePath, outputFilePath, fragmentSize);
// Computes mean and standard deviation of all the genome fragments according to the fragment size
L... | [
"private static void copyfile(String srcFilePath, String dstFilePath) {\n\t\ttry {\n\t\t\tFile srcFile = new File(srcFilePath);\n\t\t\tFile dstFile = new File(dstFilePath);\n\t\t\tInputStream in = new FileInputStream(srcFile);\n\t\t\t// For Append the file.\n\t\t\t// OutputStream out = new FileOutputStream(f2,true)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
inflates the row layout from xml when needed | @NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = mInflater.inflate(R.layout.recycleview_game_item, parent, false);
return new ViewHolder(view);
} | [
"public void inflateLayout() {\n View.inflate(getContext(), C4558R.layout.zm_pbx_sms_text_item, this);\n }",
"private final void inflateLayout() {\n LayoutInflater inflater = LayoutInflater.from(context);\n this.layout = inflater.inflate(R.layout.sms_dialog_selectnumber, null, false);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public int updateByPrimaryKey(Star star) {
star.setModifyDate(new Date());
return starDao.updateByPrimaryKey(star);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column BTC_sys_coupon.isDelete | public Integer getIsdelete() {
return isdelete;
} | [
"@AutoEscape\n\tpublic String getIsDeleted();",
"boolean deleteCoupon(int couponID);",
"public java.lang.Boolean getDeleted( ) ;",
"io.dstore.values.BooleanValue getDeleteValue();",
"@Column(name = \"FlagDelete\", nullable = false)\r\n\tpublic boolean isFlagDelete() {\r\n\t\treturn this.flagDelete;\r\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
//android library API 11+ standard search
SearchManager managerSearch = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
mSearch = (SearchView) menu.findItem(R.id.ch... | [
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last guestbook entry in the ordered set where groupId = &63; and guestbookId = &63;. | public static GuestbookEntry fetchByG_G_Last(
long groupId, long guestbookId,
OrderByComparator<GuestbookEntry> orderByComparator) {
return getPersistence().fetchByG_G_Last(
groupId, guestbookId, orderByComparator);
} | [
"@Override\n\tpublic ESFAddress fetchByGroupId_Last(long groupId,\n\t\tOrderByComparator orderByComparator) throws SystemException {\n\t\tint count = countByGroupId(groupId);\n\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<ESFAddress> list = findByGroupId(groupId, count - 1, count,\n\t\t\t\torderByC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void mouseClicked(MouseEvent e) {
if(e.getModifiers() == MouseEvent.BUTTON3_MASK){
popup.show(e.getComponent(), e.getX(), e.getY());
}
} | [
"@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"
]
]
}
} |
Gets ith "setting" element | com.guidewire.accelerator.deployment.Accelerator.RpcWebService.Setting getSettingArray(int i); | [
"public Setting getSetting(String settingName);",
"public SettingValue<T> getSetting() {\n return this.setting;\n }",
"public ArrayList<SettingsElement> getElements () {\n\t\t\n\t\tIterator<Entry<String,SettingsElement>> i \t= settings.entrySet().iterator();\n\t\tArrayList<SettingsElement> set \t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to invoke spell check. | public void spellCheck() {
this.getSpellChecker().checkSpelling();
} | [
"public void spellChecking() {\r\n\t\tspellChecker.checkSpelling();\r\n\t}",
"void doInitSpell()\n {\n }",
"public static void main(String[] args) {\n SpellChecker sc = new SpellChecker();\n ArrayList<String> list = sc.spell(\"bonk.txt\");\n System.out.println(\"List of Correctlt Matche... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the OID for this curve | public String getOid(); | [
"public String getOid() {\r\n\t\treturn oid;\r\n\t}",
"public ObjectIdentifier getOID() {\n return oid;\n }",
"public int getOID() throws IOException, AutomationException {\n\t\treturn 0;\r\n\t}",
"public String getSigAlgOID() {\n/* 799 */ if (this.sigAlgId == null)\n/* 800 */ return nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows user to Type | private void ableToType(final boolean tof){
SwingUtilities.invokeLater(
new Runnable(){
public void run(){
userText.setEditable(tof);
}
}
);
} | [
"public void typeType(String text) {\n comboType().getTextField().typeText(text);\n }",
"public void type(){\n \tenterRule(NonTerminal.TYPE);\n \texpect(Token.Kind.IDENTIFIER);\n \texitRule(NonTerminal.TYPE);\n }",
"@Override\n\tpublic void eb_userType() {\n\t\tSystem.out.println(\"user ty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an ID of the widget used by JavaScript code written to this container. | void addUsedWidgetId(String id); | [
"JSWidget createJSWidget(GuiContext context);",
"public abstract PWContainer add(final PWWidget widget);",
"public final native void setId(String id) /*-{\n this.id = id;\n }-*/;",
"public int getAppWidgetId() {\n return appWidgetId_;\n }",
"public void addWidget(int widgetId, int chainId){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If true, the tag is an abstract and does not represent a nominal value | @ApiModelProperty(value = "If true, the tag is an abstract and does not represent a nominal value")
public Boolean isAbstract() {
return _abstract;
} | [
"public abstract boolean wantTag( Tag t );",
"boolean hasTyreNomimalValue();",
"public boolean hasTag ();",
"@Override\r\n\tpublic boolean estVariateur() {\n\t\treturn false;\r\n\t}",
"public boolean isNominal()\n {\n\treturn (literal != null && literal.length() != 0 && (getEntity() == this));\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log message into a new line | public static void println(String s) {
if (enabled) {
System.out.println(s);
}
} | [
"public void newLogFileLine(String line) {\r\n\t\t//buffer.append(line).append(\"<br/>\");\r\n\t\ttry {\r\n\t\t\tsession.getBasicRemote().sendText(line + \"<br>\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private static void logln(String msg) {\n log(msg + \"\\n\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
notify the sprite that time has passed. | void timePassed(double dt); | [
"public void notifyAllTimePassed(double dt) {\r\n // Make a copy of the Sprites before iterating over them.\r\n List<Sprite> spritesCopy = new ArrayList<Sprite>(this.sprites);\r\n // Notify all Sprites that time passed:\r\n for (Sprite sprite : spritesCopy) {\r\n sprite.timePa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the index of the first armor item in the hero's inventory | public int hasArmorItem() {
for (int i = 0; i < items.size(); i++) {
if (items.get(i).getType() == 'a') {
return i;
}
}
return -1;
} | [
"private int getHorseArmorIndex(ItemStack par1ItemStack)\n {\n if (par1ItemStack == null)\n {\n return 0;\n }\n else\n {\n Item var2 = par1ItemStack.getItem();\n return var2 == Items.iron_horse_armor ? 1 : (var2 == Items.golden_horse_armor ? 2 :... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds overlapping subsystems. Not optimized | static Subsystem[] sharedSubsystems(ArrayList<Routine> routines) {
HashMap<Subsystem, Integer> counter = new HashMap<>();
counter.put(null, 0); //for SampleRoutine
counter.put(Drive.getInstance(), 0);
// Count the number of times each subsystem appears
for (Routine routine : rout... | [
"private List<IntVec> getAllSolutionsForCommonSubstructures() {\n\t\tsss.setMolecule(mol);\n\t\tfrag.setFragment(true);\n\t\tsss.setFragment(frag);\n\t\t//\n\t\t// The MCS is the complete fragment.\n\t\t//\n\t\ttry {\n\t\t\tif (sss.findFragmentInMolecule(SSSearcher.cCountModeOverlapping, SSSearcher.cMatchDBondToDel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set definitions in this module. | public void setDefs(HashMap<String, Integer> defs) {
this.defs = defs;
} | [
"public void setDefinitions(Map definitions);",
"public void setDefinitions(@Nonnull final Collection<String> definitions) {\n this.definitions = definitions;\n }",
"private Definitions() {\r\n\t}",
"@Override\n public void init() {\n define();\n }",
"public void setConstants() {\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
miltiply two fractions (numertor in [0], denom in [1]) | static public int[] multFrac(int[] a, int[] b) {
int[] c = {a[0]*b[0],a[1]*b[1]};
return c;
} | [
"NodeSpec fraction(int divisor);",
"public int[] multiplyOrDivide(int[] frac1, int[] frac2) {\r\n\t\tint numer = 0;\r\n\t\tint denom = 1;\r\n\t\tif (sign.equals(\"/\")) {\r\n\t\t\tint newDenom = frac2[0];\r\n\t\t\tfrac2[0] = frac2[1];\r\n\t\t\tfrac2[1] = newDenom;\r\n\t\t}\r\n\t\tnumer = frac1[0] * frac2[0];\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
. Set the value of the specified attribute. | protected abstract void setValue(AttributeInterface attribute, String value); | [
"public void setAttribute(String attribute, Object value)\n\t{\n\n\t}",
"public void setValue(AttributeValue value) {\n this.value = value;\n }",
"void setValue(String attributeName, String value);",
"public synchronized void setAttribute(String attribute, String value)\n {\n _newAt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This will tell if this document is encrypted or not. | public boolean isEncrypted()
{
return document.isEncrypted();
} | [
"boolean hasCanEncrypt();",
"boolean hasDatabaseEncryption();",
"public boolean isEncrypted() {\n\t\tObject oo = get_Value(\"IsEncrypted\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method deletes the child elements of a given object (objects contained in list properties of the given object). This method is recursive, so all descendent objects are deleted. We could have used ON DELETE CASCADE to delete these objects. However, not all databases fully support this. For example, Microsoft SQL Se... | private void deleteListElements(IDatabaseRowKey objectKey) {
ExtendableObject extendableObject = objectKey.getObject();
ExtendablePropertySet<?> propertySet = PropertySet.getPropertySet(extendableObject.getClass());
for (ListPropertyAccessor<?> listProperty: propertySet.getListProperties3()) {
/*
... | [
"private void deleteAcl( Securable object ) throws DataAccessException, IllegalArgumentException {\n ObjectIdentity oi = makeObjectIdentity( object );\n\n if ( oi == null ) {\n log.warn( \"Null object identity for : \" + object );\n }\n\n if ( log.isDebugEnabled() ) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove all movies from the list | public void remove_allMovies(){
movieDetailsList.removeAll(movieDetailsList);
} | [
"public boolean removeMovie (Movie m) {\n\t/** COMPLETE THIS METHOD **/\n\t// THE FOLLOWING LINE IS A PLACEHOLDER TO MAKE THIS METHOD COMPILE\n\t// Change as needed for your implementation\n for(int i=0; i<items.length;i++){\n if(items[i]==m){\n items.remove(m);\n for... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Deletes the filename input. Filename must include type, e.g. test.txt. Returns false if filename input exists. | private boolean deleteFile() {
System.out.println("Enter a filename to delete:");
scan = new Scanner(System.in);
String filename = scan.nextLine();
File fileToDelete = new File(directoryOfSelectedFile.getAbsoluteFile()+"\\" + filename);
if (fileToDelete.delete()) {
System.out.println(filename +... | [
"public boolean removeFile() {\n File file = new File(fileName);\n return file.delete();\n }",
"@Override\r\n\tpublic boolean deleteFile(String name) {\n\t\treturn activity.deleteFile(name);\r\n\t}",
"public static boolean delete(String aName) {\n return new File(aName).delete();\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
is ip a inner ip. | public static boolean isInner(String ip) {
if (!IpUtils.isIp(ip)) {
throw new IllegalArgumentException("ip:" + ip + " is not ip string.");
}
long aBegin = getIpNum("10.0.0.0");
long aEnd = getIpNum("10.255.255.255");
long bBegin = getIpNum("172.16.0.0");
long... | [
"boolean hasIp2();",
"boolean hasFromIp();",
"protected abstract boolean verifyUrnIp(InetAddress ip);",
"public static boolean isPrivateIp(Inet4Address addr) {\r\n \t\tboolean result = false;\r\n \r\n \t\tbyte[] address = addr.getAddress();\r\n \r\n \t\tif (address[0] == 10) {\r\n \t\t\t// 10.*.*.*\r\n \t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the setter method to the attribute. Allowed in enterprise edition with any value, essentials, basic, enterprise with cloud services edition. Default value when not specified in API or module is interpreted by Avi Controller as null. | public void setAutoExpand(Boolean autoExpand) {
this.autoExpand = autoExpand;
} | [
"public void setUuidOfAttributeDef(java.lang.String param){\n localUuidOfAttributeDefTracker = true;\n \n this.localUuidOfAttributeDef=param;\n \n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for runtime Create new MappingTableElementImpl with no corresponding name or declaring class. This constructor should only be used for cloning and archiving. | public MappingTableElementImpl ()
{
this((String)null, null);
} | [
"public Table() {\n\t\t\n\t}",
"protected Table()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.attributes = new LinkedHashSet<Attribute>();\n\t\tthis.constraints = new ArrayList<Constraint>();\n\t}",
"protected AbstractMapping()\n {\n }",
"private SingleCointainerTable()\n {\n }",
"public abstract Abst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compute all edge bags for the decomposition. This will change the tree decomposition and the labeling of bags function. However, it will not change the treeindex. | private void computeEdgeBags() {
secondSpecialVertex = new HashMap<>();
// compute introduce edge bags by DFS
Stack<Bag<T>> stack = new Stack<>();
Set<Bag<T>> visited = new HashSet<>();
stack.push(getRoot());
visited.add(getRoot());
while (!stack.isEmpty()) {
... | [
"public void buildEdges() {\n this.buildEdges4viz();\n //this.buildEdgesDelaunayTriangulation();\n //this.buildEdges8viz();\n this.finalizaConstrucaoArestas();\n }",
"public void setBags(BigDecimal bags) {\n this.bags = bags;\n }",
"public static void main(String[] args)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
f0 > JavaCodeProduction() | RegularExprProduction() | BNFProduction() | TokenManagerDecls() | public void visit(Production n) {
n.f0.accept(this);
} | [
"final public void start() throws ParseException {\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case LEFT_PAR:\n case PLUS:\n case MINUS:\n case UNIT:\n case NOT:\n case BITNOT:\n case DECIMAL:\n case BASE1:\n case BASE2:\n case BASE3:\n case BASE4:\n case BASE5:\n case BA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ uitgangspunt is dat de package "resources" in dezelfde package zit als de java klasse | public void init() {
pad = Afbeelding.class.getResource("./resources/");
afbeelding = getImage(pad, "Tom Nook waving.gif");
} | [
"File resourcesRoot();",
"protected abstract String resourcesDirectory();",
"public String getResourceString();",
"private Resources()\r\n \t{\r\n \r\n \t}",
"public void testClassLoaderGetResources(){\n\t\ttry {\n\t\t\tString resource = \"resource/pkg/file.file\";\n\t\t\tClassLoader loader = getClass().get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert data into SQLite database method. | public void InsertDataIntoSQLiteDatabase(){
// If editText is not empty then this block will executed.
if(EditTextEmptyHolder)
{
// SQLite query to insert data into table.
SQLiteDataBaseQueryHolder = "INSERT INTO "+DatabaseHelper.TABLE_NAME+" (name, username, password) ... | [
"private void insertIntoDB(){\n db = new DBHelper(this);\n //check if the database is there\n /*\n File database = getDatabasePath(DBHelper.DB_NAME);\n if(database.exists()){\n db.getWritableDatabase();\n if(copyDatabase(this)){\n db.getWritabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the enablement status of the collective set of servos connected to this controller | PwmStatus getPwmStatus(){
PwmStatus psReturn = PwmStatus.ENABLED;
return psReturn;
} | [
"public String getEnabledState()\n {\n return getControllerServiceDTO().getState();\n }",
"public String getSecStatus() {\n\t\treturn this.secStatus;\n\t}",
"public String getStatus() {\n return (appliancePower.getStatus() ? ON : OFF);\n }",
"boolean isCircuitCheckEnabled();",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setMenus method, of class Restaurante. | @Test
public void testSetMenus() {
System.out.println("setMenus");
Menu menus = null;
Restaurante instance = new Restaurante();
instance.setMenus(menus);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");... | [
"@Test\n public void testRestaurantSetMenu() {\n restaurant1.setMenu(menu1);\n assertEquals(menu1, restaurant1.getMenu());\n }",
"@Test\n public void testNullsAllMenus() {\n // Main M.\n Menu testMenu = MenuFactory.createMenu(MenuChoice.INPUT_MAIN_MENU);\n Assert.assert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if the piece at the ending location is of opposite color. | public boolean isPieceAtEndLocIsOpColor(ChessPiece piece, ChessPieces container, String endLoc) {
boolean pieceAtEndLocIsOpColor = false;
for(int i = 0; i < container.getLength(); i++) {
if (container.getPiece(i).getLocation().equals(endLoc) && container.getPiece(i).getColor() != piece.getColor())
pieceAtEn... | [
"public boolean oppositeColor(Card c) {\r\n\t\tif (c == null) return false;\r\n\r\n\t\treturn oppositeColor (c.getSuit()); \r\n\t}",
"public boolean isOpponentOutOfPieces() {\n\t\tif (isRedPlayerTurn) {\n\t\t\tfor (int row = 0; row < 8; row++) {\n\t\t\t\tfor (int column = 0; column < 8; column++) {\n\t\t\t\t\tif ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
91415 Changed to use SQLite return mCrimes; return new ArrayList(); | public List<Crime> getCrimes() {
List<Crime> crimes = new ArrayList<>();
CrimeCursorWrapper cursor = queryCrimes(null, null);
try {
cursor.moveToFirst();
while(!cursor.isAfterLast()) {
crimes.add(cursor.getCrime());
cursor.moveToNext();
... | [
"public List<Crime> getCrimes(){\n List<Crime> crimes=new ArrayList<>();\n CrimeCursorWrapper wrapper=queryCrimes(null,null);\n try {\n wrapper.moveToFirst();\n while (!wrapper.isAfterLast()){\n crimes.add(wrapper.getCrime());\n wrapper.moveToNext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column access.uris | public void setUris(String uris) {
this.uris = uris == null ? null : uris.trim();
} | [
"public void setColumnNameURL(String columnName) {\r\n dataBinder.setColumnNameURL(columnName);\r\n }",
"public void setJdbcURI(String jdbcURI);",
"URL getURL(String columnName) throws SQLException;",
"String[] getDatabaseUris();",
"public List<String> getUris() {\n return uris;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Predicts a response for an input sample. The method runs the sample through the trees in the ensemble and returns the output class label based on the weighted voting. | public float predict(Mat sample, Mat missing, Range slice)
{
float retVal = predict_2(nativeObj, sample.nativeObj, missing.nativeObj, slice.start, slice.end);
return retVal;
} | [
"public void predict() {\n if (predicting) {\n Instances data;\n try {\n // make a dataset with only one instance (the one at the moment)\n data = WekaHelper.convertToSingleInstance(test, currentDataPoint);\n } catch (InvalidRoomException e) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for Clicking See all records on Inquiry List from Inquiry Dashboard This Test can fail if more than 5 inquiries are not present in a Website | @Test(priority=5)
public void VerifyThatSeeAllRecordsIsClickable()
{
//Check for runmode
if (UtilityFunctions.IsExecutable("VerifyThatSeeAllRecordsIsClickable", BasePage.xls)!=true)
throw new SkipException("Run Mode Set to No");
System.out.println("VerifyThatSeeAllRecordsIsClickable Test Starts... | [
"@Test(enabled=false)\r\n\tpublic void Sprint5_US279_TC1173() throws RowsExceededException, BiffException, WriteException, IOException, InterruptedException\r\n\t{\r\n\t\t/*Start-Variable Deceleration*/\r\n\t\tHSSFSheet rawItemInformationSheet = ReadTestData.getTestDataSheet(\"Sprint5_US279_TC1173\", \"Object1\");\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do something with the returned data | @Override
public void onResponse(String response) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
startActivity(intent);
} | [
"public List getReturnData();",
"public int getData(){\r\n // in the get Function we just returned data ...\r\n return data;\r\n }",
"public void RetreveData() {\r\n\t\t\r\n\t}",
"public void onReturn(int code, byte[] data) {\n\t\t\t\t\t\t\t\tcallback.onResult(request, code, data);\n\t\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the density of the screen and do some maths with it on the max overscroll distance variable so that you get similar behaviors no matter what the screen size | private void initBounceScrollView()
{
final DisplayMetrics metrics = mContext.getResources().getDisplayMetrics();
final float density = metrics.density;
mMaxYOverScrollDistance = (int) (density * MAX_Y_OVER_SCROLL_DISTANCE);
} | [
"float getDisplayMetricsDensity();",
"private float getDistanceFromCenterOfScreen() {\n Vector3 position = getTransformedPosition();\n if (position.z > 0) {\n float dx = position.x * mHalfScreenWidth;\n float dy = position.y * mHalfScreenHeight;\n return MathUtil.sqrt(dx*dx + dy*dy);\n } e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a VetoableChangeSupport object. | public VetoableChangeSupport(Object sourceBean)
{
super(sourceBean);
source = sourceBean;
} | [
"protected java.beans.VetoableChangeSupport getVetoPropertyChange() {\r\n\t\tif (vetoPropertyChange == null) {\r\n\t\t\tvetoPropertyChange = new java.beans.VetoableChangeSupport(this);\r\n\t\t};\r\n\t\treturn vetoPropertyChange;\r\n\t}",
"protected java.beans.VetoableChangeSupport getVetoPropertyChange() {\n\tif ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a db_mall.t_fix_paydate_log table reference | public TFixPaydateLog() {
this(DSL.name("t_fix_paydate_log"), null);
} | [
"public void createGameLogTable() {\n try{\n Statement statement = conn.createStatement();\n String createTable = \"CREATE TABLE GAMELOG (TURN_NUMBER INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) NOT NULL, LOG VARCHAR(300), PRIMARY KEY (TURN_NUMBER))\";\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
// / // Only applicable to Nominal data. Use minVal and maxVal properties for // the Continuous data. | @Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
} | [
"private void initValues() {\r\n\t\tmin = 1e10;\r\n\t\tmax = -1e10;\r\n\t\tmean = 0.0;\r\n\t\tnumPos = 0;\r\n\t\tnumNeg = 0;\r\n\t\tnumZero = 0;\r\n\t\tnumMissing = 0;\r\n\t\tnumTotal = 0;\t\t\r\n\t}",
"public ValueRange() {}",
"public Range findValueRange() {\n/* 350 */ if (this.data.isEmpty()) {\n/* 351... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory method to return a list of all return channel interfaces visible to this application. The number of entries in the array will exactly match the number of return channel interfaces visible to the application. Null is returned if no interfaces are visible to this application. | public ReturnChannel[] getInterfaces()
{
return null;
} | [
"public ArrayList<Interface> getExternalInterfaces() {\n \tArrayList<Device> devices = getExternalDevices();\n \tArrayList<Interface> interfaces = new ArrayList<Interface>();\n \tfor(Device d : devices)\n \t\tinterfaces.addAll(d.getInterfaces());\n \treturn interfaces;\n }",
"List<Channel> getCh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected void initView() {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by mjbor on 9/20/2017. | public interface TrainingWebService {
@POST("createTraining.php")
Call<DefaultResponse> createTraining(@Body Training training);
@POST("updateTraining.php")
Call<DefaultResponse> updateTraining(@Body Training training);
@FormUrlEncoded
@POST("getNextTraining.php")
Call<Training> getNextTr... | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to handle Qnames | private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix ... | [
"public int getIndex(String qName);",
"public void setQyName(String qyName) {\n this.qyName = qyName;\n }",
"private String qName(Namespace namespace, String localName)\n {\n \tString prefix = namespaces.getPrefix(namespace.URI);\n if (prefix == null || prefix.equals(\"\"))\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that provides the value of a certain property of the given item | public V getProperty(T item); | [
"public abstract Object getProperty(String property);",
"@Override\r\n\tpublic Property getItem(int arg0) {\n\t\treturn property.get(arg0);\r\n\t}",
"public String get(String property);",
"@Override\n public String getValue(Item item, Object itemId, Object propertyId) {\n DemoBean ro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |