query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
Called when an entire text frame has been recieved. Do whatever you want here... | public void onMessage(WebSocket conn, String message); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void onTextReceived(String message);",
"void setNewFrameText(Motion m);",
"public ShowAnnotatedTextHandler(MainFrame frame) {\n this.main = frame;\n }",
"@Override\n protected void onTextData(Reader r) throws IOException {\n\n }",
"public void onTextCopy()\n\t{\n\t}",
"private v... | [
"0.6957901",
"0.63028014",
"0.62189364",
"0.61985695",
"0.6175886",
"0.6155795",
"0.61529374",
"0.6129275",
"0.6077833",
"0.5971297",
"0.59544915",
"0.5896134",
"0.5843106",
"0.58392763",
"0.58370745",
"0.5817807",
"0.5813788",
"0.5792549",
"0.57895917",
"0.5786995",
"0.57746... | 0.0 | -1 |
Called after onHandshakeRecieved returns true. Indicates that a complete WebSocket connection has been established, and we are ready to send/recieve data. | public void onOpen(WebSocket conn); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final boolean isHandshakeComplete() {\n return handshakeComplete;\n }",
"@Override\n\tpublic void handshakeCompleted(HandshakeCompletedEvent evt) {\n\t\t\n\t}",
"@Override\n\tpublic void onOpen( ServerHandshake handshakedata ) {\n\t\tlog.info(\"opened connection\");\n\t\t// if you plan to refu... | [
"0.7174905",
"0.68225956",
"0.64718175",
"0.6242966",
"0.6191673",
"0.6159083",
"0.6158383",
"0.61486256",
"0.61146474",
"0.6090549",
"0.6076618",
"0.5982646",
"0.5958526",
"0.5946379",
"0.5946151",
"0.59149635",
"0.59068",
"0.5842295",
"0.5780418",
"0.5774386",
"0.5770763",
... | 0.5713522 | 21 |
Called after WebSocketclose is explicity called, or when the other end of the WebSocket connection is closed. | public void onClose(WebSocket conn); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {\n\t}",
"@Override\r\n\tpublic void onClose(WebSocket conn, int code, String reason, boolean remote) {\n\r\n\t}",
"@Override\r\n\tpublic void afterConnectionClosed(WebSocketSession session, CloseSta... | [
"0.7808617",
"0.7471142",
"0.74164504",
"0.7275867",
"0.7132529",
"0.7066469",
"0.70356905",
"0.702907",
"0.69154555",
"0.6853538",
"0.6843719",
"0.67849",
"0.6768213",
"0.6671401",
"0.6615242",
"0.658503",
"0.6540105",
"0.65379536",
"0.6523543",
"0.65217584",
"0.6455254",
... | 0.72689664 | 4 |
Triggered on any IOException error. This method should be overridden for custom implementation of error handling (e.g. when network is not available). | public void onError( Throwable ex ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onIOException(final IOException e);",
"public void onIOException(IOException e) {\n\t\t}",
"@Override\r\n\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",... | [
"0.7346421",
"0.7234177",
"0.71883845",
"0.7163428",
"0.71131444",
"0.7033336",
"0.6926646",
"0.6859827",
"0.6840717",
"0.6800297",
"0.66512656",
"0.6626889",
"0.64388055",
"0.63906074",
"0.63453245",
"0.6344512",
"0.63080657",
"0.6286599",
"0.6252894",
"0.6249719",
"0.619467... | 0.56407267 | 64 |
vertex indexed and keys are the min distance from starting point encountered upto that point in time. | public Dijkstra(EdgeWeightedDigraph G, int s) {
int V = G.V();
distTo = new double[V];
edgeTo = new DirectedEdge[V];
distTo[0] = 0.0;
for (int i = 1; i < V; i++) {
distTo[i] = Double.POSITIVE_INFINITY;
}
pq.insert(s, 0.0);
while (!pq.isEmpty()) {
int v = pq.deleteMin();
for (DirectedEdge e : G.adj(v)) {
relax(e);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int findMinDistance(int[] distance, boolean[] visitedVertex) {\r\n int minDistance = Integer.MAX_VALUE;\r\n int minDistanceVertex = -1;\r\n for (int i = 0; i < distance.length; i++) {\r\n if (!visitedVertex[i] && distance[i] < minDistance) {\r\n minDist... | [
"0.6256921",
"0.6228223",
"0.6191737",
"0.61760914",
"0.6148803",
"0.60957223",
"0.6079575",
"0.6041692",
"0.59722126",
"0.5956515",
"0.59360313",
"0.5925986",
"0.59257233",
"0.5913794",
"0.589593",
"0.5881979",
"0.58184195",
"0.58166176",
"0.5816537",
"0.58118504",
"0.580253... | 0.0 | -1 |
Default constructor for User | public User() { } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User(){\n this(null, null);\n }",
"public User() {\r\n this(\"\", \"\");\r\n }",
"public User() {\n\t\tsuper();\n\t}",
"public User() {\n\t\tsuper();\n\t}",
"public User() {\n\t\tsuper();\n\t}",
"User()\n\t{\n\n\t}",
"public User() {\n super();\n }",
"public User(... | [
"0.88566625",
"0.8839892",
"0.875325",
"0.875325",
"0.875325",
"0.8717523",
"0.86503416",
"0.86503416",
"0.86373436",
"0.86373436",
"0.86373436",
"0.86354154",
"0.8633491",
"0.8633491",
"0.8633491",
"0.8626125",
"0.8616853",
"0.86115277",
"0.8605507",
"0.86043924",
"0.8591543... | 0.8563788 | 23 |
Param constructor for User | public User(String name, String username, String password, String title) {
this.setName(name);
this.setUsername(username);
this.setPassword(password);
this.setTitle(title);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public UserParameter() {\n }",
"public User(){\n this(null, null);\n }",
"public User() {\r\n this(\"\", \"\");\r\n }",
"public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }",
"User()\n\t{\n\n\t}",
"public User(String n) { // constructor\r\n name... | [
"0.8144374",
"0.77447826",
"0.7725718",
"0.7698129",
"0.7671418",
"0.76291543",
"0.7591418",
"0.7546955",
"0.75199836",
"0.75199836",
"0.75199836",
"0.75167245",
"0.75167245",
"0.75167245",
"0.75045645",
"0.75045645",
"0.7500814",
"0.74816495",
"0.7481031",
"0.7469694",
"0.74... | 0.0 | -1 |
Auto generated code Converts User data to a formatted string | @Override
public String toString() {
return "User{" +
"id=" + this.getId() +
", name='" + this.getName() + '\'' +
", password='" + this.getPassword() + '\'' +
", title='" + this.getTitle() + '\'' +
", username='" + this.getUsername() + '\'' +
'}';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }",
"public static String getUpdate(){\n //string joiner object to append string with new line as d... | [
"0.61447984",
"0.60863996",
"0.60335225",
"0.60086256",
"0.5970322",
"0.5886228",
"0.58653665",
"0.5858169",
"0.58525264",
"0.57987916",
"0.57377815",
"0.57254744",
"0.57193005",
"0.5710363",
"0.57054824",
"0.5698291",
"0.5676282",
"0.56698036",
"0.56649864",
"0.56634176",
"0... | 0.0 | -1 |
Created by GAYEON on 20171209. | public interface OnColorSelectedListener {
public void onColorSelected(int color);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpr... | [
"0.59904295",
"0.57644343",
"0.57247394",
"0.57109684",
"0.57109684",
"0.56852096",
"0.5662377",
"0.56620723",
"0.5662034",
"0.5660952",
"0.5601177",
"0.555166",
"0.554337",
"0.5522123",
"0.5520213",
"0.5515975",
"0.5507643",
"0.5501831",
"0.54851776",
"0.548134",
"0.5455156"... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
ArrayList<Integer> number=new ArrayList<Integer>();
number.add(10);
number.add(200);
number.add(30);
number.add(400);
System.out.println("list the elements:-");
for(int element : number)
{
System.out.println(element);
}
System.out.println("size of arraylist is:- "+number.size());
number.sort(null);
for(int element : number)
{
System.out.println(element);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
System.out.printf("Thread [%d] Running ...\n", current); | @Override
public void run() {
URLConnection connection = null;
try {
Iterator<String> iterator = targetSensor.iterator();
for (int i = 0; i < targetSensor.size(); i++) {
String sensorName = iterator.next();
URL oracle = new URL("http://localhost:8081/fakeDataSource/sensors/" + sensorName + "/data");
BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));
String inputLine;
String res = "";
while ((inputLine = in.readLine()) != null) {
//System.out.println("Received" + inputLine);
res += inputLine;
}
System.out.printf("Thread [%s] - Tracking sensor %s and received %s\n", this.getName(), sensorName, res);
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void run() {\n\t\tSystem.out.println(\" \"+Thread.currentThread().getName());\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName()+new Date().toLocaleString());\r\n\t\t\t}",
"@Override\r\n\tpublic void run() {\n\t\tfor (int i = 6; i <= ... | [
"0.73420167",
"0.7299767",
"0.7188531",
"0.699568",
"0.69045323",
"0.6858454",
"0.68394226",
"0.67702246",
"0.67174774",
"0.6665042",
"0.66489947",
"0.6648754",
"0.6613717",
"0.65974146",
"0.658555",
"0.6534824",
"0.65309554",
"0.6497523",
"0.6497354",
"0.6490245",
"0.6426106... | 0.0 | -1 |
Created by suneo. User: neo Date: 20/01/2018 Time: 6:25 PM Describe: | public interface UserSkillPriceRepository extends JpaRepository<UserSkillPrice, Long> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Bean\r\n public boolean testNeoj() {\n \tval node = neo4jRepo.findOne(10L,2);\r\n\t\tnode.getPhrases().forEach(System.out::println);\r\n\t\tnode.getChildNodes().forEach(System.out::println);\r\n\t\tSystem.out.println(node);\r\n\r\n\t\treturn true;\r\n\t}",
"public static void main(String args[]) {\r\n\r\n... | [
"0.6190646",
"0.5585982",
"0.5414991",
"0.53412664",
"0.53147846",
"0.53083324",
"0.5285929",
"0.5244534",
"0.52341604",
"0.52035147",
"0.5200653",
"0.51995564",
"0.51903117",
"0.5162971",
"0.5147829",
"0.5144644",
"0.5137466",
"0.5131669",
"0.5110924",
"0.5110091",
"0.510834... | 0.0 | -1 |
Create a(n) Sub Organization | @retrofit2.http.FormUrlEncoded
@POST("api/v2/sub_organizations.json_api")
Call<SubOrganization> create(
@retrofit2.http.Field("name") String name, @retrofit2.http.Field("organization_id") Integer organizationId, @retrofit2.http.Query("include") String include
); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OrganizationConfigManager createSubOrganization(String subOrgName,\n Map attributes) throws SMSException {\n validateConfigImpl();\n /*\n * Since the \"Map attributes\" can contain more than one service name,\n * creation of the sub organization is be achieved i... | [
"0.66367555",
"0.6529897",
"0.62317586",
"0.5844784",
"0.5795983",
"0.5726398",
"0.56599337",
"0.56394875",
"0.5590324",
"0.5476882",
"0.54515994",
"0.5431774",
"0.5426808",
"0.542126",
"0.54028314",
"0.53982043",
"0.53718764",
"0.53695244",
"0.5342727",
"0.53398186",
"0.5320... | 0.6318354 | 2 |
Delete a(n) Sub Organization | @Headers({
"Content-Type:application/vnd.api+json"
})
@DELETE("api/v2/sub_organizations/{id}.json_api")
Call<Meta> delete(
@retrofit2.http.Path("id") Integer id
); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteByOrgId(String csaOrgId);",
"public void deleteSubOrganization(String subOrgName, boolean recursive)\n throws SMSException {\n validateConfigImpl();\n // Should not delete the root realm, should throw exception if\n // attempted.\n String subOrgDN = normaliz... | [
"0.68228406",
"0.6577872",
"0.6382631",
"0.6279574",
"0.60973746",
"0.6070426",
"0.6036363",
"0.59228766",
"0.58806276",
"0.587128",
"0.5858084",
"0.5857616",
"0.577667",
"0.57088083",
"0.5665002",
"0.5644566",
"0.56226337",
"0.5598663",
"0.5551451",
"0.55367047",
"0.552022",... | 0.5992053 | 7 |
Show a single Sub Organization | @Headers({
"Content-Type:application/vnd.api+json"
})
@GET("api/v2/sub_organizations/{id}.json_api")
Call<SubOrganization> show(
@retrofit2.http.Path("id") Integer id, @retrofit2.http.Query("include") String include
); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getOrganization();",
"public String getOrganization ()\n {\n return this.organization;\n }",
"public void viewOrganisation(HttpServletResponse resp, HttpServletRequest req,\n OrganisationUcc organisationUcc) {\n try {\n Integer idOrg = Integer.valueOf(req.getParameter(\"idOrgan... | [
"0.6308835",
"0.6222043",
"0.61570406",
"0.59705055",
"0.59337366",
"0.592646",
"0.5902962",
"0.5891244",
"0.588625",
"0.5874322",
"0.58598447",
"0.57772994",
"0.57772994",
"0.57772076",
"0.5775918",
"0.5767293",
"0.5751003",
"0.5720117",
"0.57058495",
"0.56947964",
"0.568464... | 0.6945673 | 0 |
Update a(n) Sub Organization | @retrofit2.http.FormUrlEncoded
@PATCH("api/v2/sub_organizations/{id}.json_api")
Call<SubOrganization> update(
@retrofit2.http.Path("id") Integer id, @retrofit2.http.Query("include") String include, @retrofit2.http.Field("name") String name
); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testUpdateOrg() {\n Organization org = new Organization();\n org.setOrgId(1);\n org.setOrgName(\"Avenger\");\n org.setDescription(\"blah blah\");\n org.setAddress(ad);\n dao.addOrg(org);\n org.setOrgName(\"X-Men\");\n assertNotEquals(or... | [
"0.63433486",
"0.6328453",
"0.628418",
"0.6010243",
"0.59556246",
"0.594782",
"0.58947396",
"0.5822118",
"0.5581959",
"0.55090594",
"0.54405236",
"0.5426921",
"0.5423781",
"0.541938",
"0.53907406",
"0.5377488",
"0.5361279",
"0.5354454",
"0.5333577",
"0.5332935",
"0.53132117",... | 0.6423513 | 0 |
caluclates and displays the tip and total amounts | @FXML
private void calculateButtonPressed(ActionEvent event) {
try{
BigDecimal amount = new BigDecimal(amountTextField.getText());
BigDecimal tip = amount.multiply(tipPercentage);
BigDecimal total = amount.add(tip);
tipTextField.setText(currency.format(tip));
totalTextField.setText(currency.format(total));
}
catch(NumberFormatException ex){
amountTextField.setText("Enter amount");
amountTextField.selectAll();
amountTextField.requestFocus();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculateTip()\n {\n\t\ttry\n {\n\t\t\tbillAmount = Double.parseDouble(billAmountEditText.getText().toString());\n\t\t\thideKeyboard();\n loadTipPercentage();\n\t\t}\n catch (NumberFormatException ex)\n {\n\t\t\tbillAmount = 0;\n\t\t}\n try\n {\n ... | [
"0.7095814",
"0.67323",
"0.6706061",
"0.6481038",
"0.6385786",
"0.63370657",
"0.6326356",
"0.63157755",
"0.6241109",
"0.62072873",
"0.6176638",
"0.616202",
"0.6161743",
"0.61155826",
"0.6035563",
"0.593157",
"0.5870268",
"0.5857455",
"0.58407605",
"0.5813651",
"0.5757104",
... | 0.538835 | 68 |
/ assert tipTextField != null : "fx:id=\"tipTextField\" was not injected: check your FXML file 'TipCalculator.fxml'."; assert tipPercentageSlider != null : "fx:id=\"tipPercentageSlider\" was not injected: check your FXML file 'TipCalculator.fxml'."; assert amountTextField != null : "fx:id=\"amountTextField\" was not injected: check your FXML file 'TipCalculator.fxml'."; assert tipPercentageLabel != null : "fx:id=\"tipPercentageTotal\" was not injected: check your FXML file 'TipCalculator.fxml'."; assert totalTextField != null : "fx:id=\"totalTextField\" was not injected: check your FXML file 'TipCalculator.fxml'."; 04rounds down, 59 rounds up | public void initialize() {
currency.setRoundingMode(RoundingMode.HALF_UP);
// listener for changes to tipPercentageSlider's value
tipPercentageSlider.valueProperty().addListener(
new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> ov,
Number oldValue, Number newValue) {
tipPercentage =
BigDecimal.valueOf(newValue.intValue() / 100.0);
tipPercentageLabel.setText(percent.format(tipPercentage));
}
}
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML // This method is called by the FXMLLoader when initialization is complete\n void initialize() {\n assert label_payload_text != null : \"fx:id=\\\"label_payload_text\\\" was not injected: check your FXML file 'MainGui.fxml'.\";\n assert label_floors_text != null : \"fx:id=\\\"label_floors_te... | [
"0.6513607",
"0.63904524",
"0.6361712",
"0.6087089",
"0.6063671",
"0.59724176",
"0.5957881",
"0.59073144",
"0.5903396",
"0.5840443",
"0.5778414",
"0.57705766",
"0.56898075",
"0.56625885",
"0.5661064",
"0.5658735",
"0.5654449",
"0.5620676",
"0.55976546",
"0.5594379",
"0.557824... | 0.5044199 | 87 |
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 javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
txtId = new javax.swing.JTextField();
txtNama = new javax.swing.JTextField();
txtAlamat = new javax.swing.JTextField();
txtTelepon = new javax.swing.JTextField();
txtEmail = new javax.swing.JTextField();
jScrollPane1 = new javax.swing.JScrollPane();
tblPelanggan = new javax.swing.JTable();
buttonSimpan = new javax.swing.JButton();
buttonReset = new javax.swing.JButton();
buttonUbah = new javax.swing.JButton();
buttonHapus = new javax.swing.JButton();
jLabel1.setText("MANAGEMENT DATA PELANGGAN");
jLabel2.setText("BARBER(AK) SHOP");
jLabel3.setText("Jalan Dipatiukur");
jLabel4.setText("ID :");
jLabel5.setText("NAMA :");
jLabel6.setText("ALAMAT :");
jLabel7.setText("TELEPON :");
jLabel8.setText("EMAIL :");
tblPelanggan.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(tblPelanggan);
buttonSimpan.setText("SIMPAN");
buttonReset.setText("RESET");
buttonUbah.setText("UBAH");
buttonHapus.setText("HAPUS");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel1)
.addComponent(jLabel3)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)
.addComponent(jLabel8)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel7))
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(txtNama, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)
.addComponent(txtAlamat, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtTelepon, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtEmail, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtId)))
.addGroup(layout.createSequentialGroup()
.addGap(39, 39, 39)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(65, 65, 65)
.addComponent(buttonSimpan)
.addGap(41, 41, 41)
.addComponent(buttonReset, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonUbah, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(36, 36, 36)
.addComponent(buttonHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(19, 19, 19)))
.addGap(44, 44, 44))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addGap(51, 51, 51)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)
.addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(txtNama, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(txtAlamat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(txtTelepon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonSimpan)
.addComponent(buttonReset)
.addComponent(buttonUbah)
.addComponent(buttonHapus))
.addContainerGap(24, Short.MAX_VALUE))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.73191476",
"0.72906625",
"0.72906625",
"0.72906625",
"0.72860986",
"0.7248112",
"0.7213479",
"0.72078276",
"0.7195841",
"0.71899796",
"0.71840525",
"0.7158498",
"0.71477973",
"0.7092748",
"0.70800966",
"0.70558053",
"0.69871384",
"0.69773406",
"0.69548076",
"0.69533914",
"... | 0.0 | -1 |
End of variables declaration//GENEND:variables | public Object getTablePelanggan() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n pu... | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.5881482... | 0.0 | -1 |
Constructeur par défaut qui crée une liste vide et qui initialise l'itérateur de cette liste. | public DiceManager(){
dicesList = new ArrayList<Dice>();
diceIterator = dicesList.listIterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}",
"public Liste(){\n\t\tsuper();\n\t\tthis.liste = new int[this.BASE_LENGTH];\n\t\tthis.nb = 0;\n\t}",
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"public Lista() {\r\n }",
"private Lists() { }",
"public ListSemental() ... | [
"0.73587364",
"0.7336729",
"0.72726136",
"0.7267921",
"0.71744376",
"0.71663207",
"0.7154058",
"0.71407074",
"0.7133306",
"0.7065754",
"0.7055345",
"0.69692606",
"0.6952615",
"0.6934083",
"0.6871897",
"0.6840461",
"0.68319637",
"0.68083704",
"0.68082994",
"0.68064874",
"0.679... | 0.0 | -1 |
Méthode qui permet d'ajouter un dé dans la liste | public Dice addDice (Dice diceToAdd){
dicesList.add(diceToAdd);
diceIterator = dicesList.listIterator();
return diceToAdd;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void add(LDCEstudante estudante){\n lista.add(estudante);\n }",
"public void addEducation(Education e) {\n ed.add(e);\n}",
"@Override\n\t\t\tpublic void ajouter(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}",
"public void addCaisse(Caisse c){\n\tif(lesCaisses.isEmpty()){\n\t\tthis.lesCaisses.add(... | [
"0.6539583",
"0.63158196",
"0.62996304",
"0.628222",
"0.6274714",
"0.62615454",
"0.6258737",
"0.6216273",
"0.61791545",
"0.614342",
"0.6099483",
"0.6097066",
"0.60816133",
"0.60674846",
"0.605824",
"0.60441965",
"0.5991033",
"0.5990153",
"0.5973426",
"0.59620833",
"0.5942312"... | 0.0 | -1 |
Méthode qui permet de supprimer un dé dans la liste | public Dice removeDice (Dice diceToRemove){
dicesList.remove(diceToRemove);
diceIterator = dicesList.listIterator();
return diceToRemove;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void supprimer() {\n origine.aretes_sortantes.supprimer(this);\n destination.aretes_entrantes.supprimer(this);\n origine.successeurs.supprimer(destination);\n destination.predecesseurs.supprimer(origine);\n position.supprimerElement();\n }",
"@Override\r\n\tpublic void deleteItem() {\n\t... | [
"0.71924114",
"0.71543777",
"0.7125872",
"0.7076179",
"0.6962532",
"0.6949453",
"0.6922834",
"0.69221777",
"0.69144815",
"0.6911649",
"0.6841514",
"0.6790495",
"0.6784815",
"0.67492867",
"0.67382675",
"0.6731741",
"0.66932267",
"0.6683786",
"0.6682742",
"0.6643187",
"0.662983... | 0.0 | -1 |
Méthode qui retourne le dé à la position actuelle et qui permet ensuite de passer au dé suivant dans la liste | public Dice nextDice(){
if(diceIterator.hasNext())
return diceIterator.next();
else
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Eta... | [
"0.61136377",
"0.6037581",
"0.60102254",
"0.59956044",
"0.5945901",
"0.5927417",
"0.5897575",
"0.58955663",
"0.58760196",
"0.58655745",
"0.58427733",
"0.58101094",
"0.58098227",
"0.57975465",
"0.57680327",
"0.57567143",
"0.57507366",
"0.5749586",
"0.5726392",
"0.5726392",
"0.... | 0.0 | -1 |
Méthode qui retourne le dé à la position actuelle et qui permet ensuite de passer au dé précédent dans la liste | public Dice previousDice() {
if(diceIterator.hasPrevious())
return diceIterator.previous();
else
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ElementIterator (PositionList<E> l) {\n\t\tlist = l;\t//Guardo la referencia a la lista a iterar\n\t\tif(list.isEmpty()) cursor = null; //Si la lista esta vacia la posicion corriente es nula\n\t\telse\n\t\t\ttry {\n\t\t\t\tcursor = list.first();//sino la posicion corriente es la primerea de la lista\n\t\t\t... | [
"0.59907615",
"0.5963359",
"0.5939565",
"0.5850973",
"0.58478975",
"0.57775885",
"0.5776989",
"0.5761458",
"0.5755867",
"0.57543844",
"0.5729576",
"0.57106954",
"0.57106954",
"0.57101274",
"0.57101274",
"0.57101274",
"0.56908447",
"0.56885254",
"0.56885254",
"0.56877404",
"0.... | 0.0 | -1 |
Méthode qui permet de pointer sur le premier dé de la liste. | public Dice getFirstDice() {
diceIterator = dicesList.listIterator();
Dice firstDice = diceIterator.next();
diceIterator.previous();
return firstDice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ListaEncadeada() {\n first = null;\n }",
"public void ouvrirListe(){\n\t\n}",
"public ListaDuplamenteEncadeada(){\r\n\t\t\r\n\t}",
"public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != nu... | [
"0.63767916",
"0.6331831",
"0.627906",
"0.62362134",
"0.61142313",
"0.60864127",
"0.60141504",
"0.60016924",
"0.5993424",
"0.597881",
"0.59450674",
"0.5927067",
"0.5898201",
"0.58891135",
"0.5885388",
"0.58712834",
"0.58479667",
"0.58094835",
"0.5802805",
"0.57806283",
"0.575... | 0.0 | -1 |
Méthode qui roule aléatoirement les faces actives de tous les dés de la liste | public void rollAllDices() {
for(int i = 0; i < dicesList.size(); i++) {
dicesList.get(i).roll();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int faces() { \n return this.faces; \n }",
"public void UPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces... | [
"0.63526833",
"0.61844134",
"0.6182276",
"0.61801875",
"0.6128696",
"0.61090827",
"0.6098385",
"0.6052023",
"0.6029128",
"0.59719515",
"0.597126",
"0.59603643",
"0.58887917",
"0.58840775",
"0.5859534",
"0.581577",
"0.580988",
"0.56881106",
"0.5641558",
"0.5603011",
"0.5585069... | 0.0 | -1 |
Mutateur privé qui est utilisé lors du clonage du DiceManager. | private void setDicesList(ArrayList<Dice> dicesList) {
this.dicesList = dicesList;
this.diceIterator = dicesList.listIterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}",
"@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}",
"public void setPrivado(Boolean privado) {\n this.privado = privado;\n }",
"public interface AccessControlled {\r\n\r\n}",
"public static void main(String[] args) ... | [
"0.6169564",
"0.60723335",
"0.58533627",
"0.58107907",
"0.5684361",
"0.56369334",
"0.5634841",
"0.55921906",
"0.5581674",
"0.55727655",
"0.54941714",
"0.5448975",
"0.543195",
"0.5426799",
"0.5415904",
"0.53873485",
"0.53782797",
"0.5373716",
"0.53530663",
"0.53512746",
"0.533... | 0.0 | -1 |
Retourne une copie de l'objet actuel. | public DiceManager clone() {
DiceManager cloneDiceList = new DiceManager();
cloneDiceList.setDicesList(this.dicesList);
return cloneDiceList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Prototype makeCopy();",
"public CMObject copyOf();",
"public abstract INodo copy();",
"Field getCopy();",
"Object clone();",
"Object clone();",
"public void copy() {\n\n\t}",
"T copy();",
"static void setCopying(){isCopying=true;}",
"public O copy() {\n return value();\n }",
"public Conteni... | [
"0.7729729",
"0.7534881",
"0.74456507",
"0.71252966",
"0.7103349",
"0.7103349",
"0.709925",
"0.6994077",
"0.69573504",
"0.6854165",
"0.683294",
"0.6810685",
"0.6810685",
"0.6810685",
"0.6810685",
"0.67211646",
"0.67182785",
"0.664595",
"0.66125846",
"0.6602895",
"0.6602364",
... | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.simplified_main, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.7246451",
"0.7201833",
"0.7195169",
"0.7176824",
"0.71071094",
"0.7039687",
"0.70379424",
"0.7011622",
"0.70095545",
"0.69799995",
"0.6945173",
"0.69389343",
"0.6933555",
"0.69172555",
"0.69172555",
"0.68906796",
"0.688355",
"0.687496",
"0.6874772",
"0.68613136",
"0.686131... | 0.0 | -1 |
Checks if the player can use this card on his turn | @Override
public boolean isUsable(Player player, boolean firstTurn) {
return player.canPlaceOnThisTurn(firstTurn) && player.canUseCardOnThisTurn(firstTurn) && player.getGrid().getPlacedDice() >0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}",
"public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t... | [
"0.7975602",
"0.777005",
"0.71733296",
"0.7090037",
"0.68910384",
"0.6837667",
"0.6789551",
"0.6746211",
"0.6721082",
"0.66733104",
"0.66680115",
"0.66545516",
"0.6647131",
"0.6636472",
"0.66316825",
"0.6607184",
"0.659239",
"0.65742254",
"0.65734977",
"0.65344775",
"0.652059... | 0.73553264 | 2 |
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_add_alarm, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.724751",
"0.72030395",
"0.71962166",
"0.71781456",
"0.71080285",
"0.70414597",
"0.7039569",
"0.70127094",
"0.7010955",
"0.69814765",
"0.69462436",
"0.6940127",
"0.69346195",
"0.6918375",
"0.6918375",
"0.6892324",
"0.688513",
"0.687655",
"0.68764484",
"0.68626994",
"0.68626... | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
finish();
overridePendingTransition(android.R.anim.fade_in,
android.R.anim.fade_out);
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ... | [
"0.79041415",
"0.7806607",
"0.7766601",
"0.7726997",
"0.76317257",
"0.7621966",
"0.75851256",
"0.753119",
"0.74884796",
"0.7458151",
"0.7458151",
"0.74387676",
"0.74214053",
"0.74029565",
"0.73919135",
"0.73871326",
"0.73794",
"0.7370643",
"0.73621583",
"0.7356208",
"0.734578... | 0.0 | -1 |
Get all the supplies. | Page<SuppliesDTO> findAll(Pageable pageable); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic List<Supplies> findall() {\n\t\treturn suppliesDao.findall();\r\n\t}",
"public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}",
"@Override\n\tpublic List<Supplier> getAllSu... | [
"0.8074411",
"0.71828717",
"0.6895588",
"0.6558868",
"0.6532941",
"0.6191856",
"0.6180128",
"0.6125769",
"0.6043356",
"0.60011363",
"0.59924924",
"0.5959187",
"0.5833628",
"0.5736318",
"0.57362264",
"0.5734928",
"0.5705571",
"0.5698668",
"0.56866586",
"0.5656753",
"0.5595836"... | 0.52005655 | 80 |
Get the "id" supplies. | Optional<SuppliesDTO> findOne(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String idProvider();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.String getId();",
"java.lang.... | [
"0.70332694",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7014267",
"0.7008464",
... | 0.0 | -1 |
Delete the "id" supplies. | void delete(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(int id) {\n\n\t}",
"public void delete(int id);",
"@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}",... | [
"0.78422016",
"0.78422016",
"0.78422016",
"0.78422016",
"0.78422016",
"0.782769",
"0.7807013",
"0.7762677",
"0.77196264",
"0.77050406",
"0.76910156",
"0.76910156",
"0.76910156",
"0.7676716",
"0.7676716",
"0.7676716",
"0.7676716",
"0.7676716",
"0.7676716",
"0.76618993",
"0.765... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
programmer employee1 = new Steve();
programmer employee2 = new Rachel();
employee1.coding();
employee2.coding();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Return pseudo unique ID | @org.jetbrains.annotations.NotNull
public static String getUniquePsuedoID() {
String m_szDevIDShort = "35" + (Build.BOARD.length() % 10) + (Build.BRAND.length() % 10) + (Build.CPU_ABI.length() % 10) + (Build.DEVICE.length() % 10) + (Build.MANUFACTURER.length() % 10) + (Build.MODEL.length() % 10) + (Build.PRODUCT.length() % 10);
String serial = null;
try {
serial = android.os.Build.class.getField("SERIAL").get(null).toString();
return new UUID(m_szDevIDShort.hashCode(), serial.hashCode()).toString();
} catch (Exception exception) {
serial = "serial";
}
return new UUID(m_szDevIDShort.hashCode(), serial.hashCode()).toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }",
"String uniqueId();",
"String getUniqueId();",
"String generateUID();",
"String getUniqueID();",
"private String generateUniqueIdString() {\r\n return TimeBase... | [
"0.8424326",
"0.8280241",
"0.808795",
"0.8060295",
"0.8035399",
"0.80248517",
"0.7935538",
"0.78298974",
"0.7771996",
"0.7769253",
"0.77651805",
"0.77612853",
"0.7714068",
"0.7711533",
"0.7648149",
"0.7641029",
"0.7637967",
"0.7610353",
"0.76051736",
"0.7601869",
"0.758534",
... | 0.7183226 | 50 |
todo user who owns post should be able to edit it | private void togglePostControls(boolean hidePostFields)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void editMyPost(Post post);",
"@Override\n public void edit(User user) {\n }",
"@Override\n protected void validateEdit(Fornecedor post) {\n\n }",
"@Test\n public void testPostAccessControl() {\n // item posted by user himself\n Post usersPost = new Post(\"Post created by test us... | [
"0.74764305",
"0.6588902",
"0.6214139",
"0.61591804",
"0.6121111",
"0.6081937",
"0.6065379",
"0.60463846",
"0.6036665",
"0.5985972",
"0.58860517",
"0.5748901",
"0.5736552",
"0.5703179",
"0.56827885",
"0.5648358",
"0.5615444",
"0.5603339",
"0.55906045",
"0.5569831",
"0.5568659... | 0.0 | -1 |
todo show image detail | private void showImageDetail() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getItemImage();",
"@RequestMapping(\"/images/{title}\")\n public String showImage(@PathVariable String title, Model model) {\n // Finding the image based upon its title by using joins because we need only those instances which contain the tags as we have to pass the tags to the view\n Ima... | [
"0.72373915",
"0.7017968",
"0.6962329",
"0.6921343",
"0.673664",
"0.66612136",
"0.6647972",
"0.661669",
"0.66097873",
"0.65034956",
"0.64296865",
"0.6409391",
"0.6398534",
"0.636811",
"0.63617647",
"0.63413036",
"0.63315445",
"0.63301945",
"0.6329474",
"0.63264346",
"0.631903... | 0.8522837 | 0 |
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);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {... | [
"0.72474515",
"0.72030497",
"0.7196155",
"0.7178126",
"0.7107996",
"0.7041309",
"0.70395386",
"0.7012691",
"0.7010885",
"0.69815445",
"0.69462097",
"0.6940046",
"0.69345695",
"0.69183254",
"0.69183254",
"0.6892358",
"0.6885014",
"0.6876514",
"0.6876359",
"0.68626404",
"0.6862... | 0.0 | -1 |
Marker interface for mutable tuples. | public interface IMutableValue8<T8> extends IGetValue8<T8>, ISetMutableValue8<T8> {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static interface Tuple {\n\n\t}",
"public UnmodifiableTuple(Tuple<F, L> tuple) {\r\n this.first = tuple.getFirst();\r\n this.last = tuple.getLast();\r\n size = tuple.size();\r\n hashCode = tuple.hashCode();\r\n }",
"private Tuples() {}",
"@Override\n public Expr app... | [
"0.69703114",
"0.65395236",
"0.65131915",
"0.64338005",
"0.62935036",
"0.6166534",
"0.61059684",
"0.6089429",
"0.6066582",
"0.60184276",
"0.5992605",
"0.59608734",
"0.5943058",
"0.59269553",
"0.58563083",
"0.5835748",
"0.5768213",
"0.5734189",
"0.5731401",
"0.570197",
"0.5694... | 0.495545 | 70 |
this is used to insert the "particleNo" particles in the simulation | public GameWorldModel(int width, int height, int particleNo, int movementType) {
this.movementType = movementType;
this.particleCollection = new ArrayList<Particle>(particleNo);
this.width = width;
this.height = height;
this.particleNo = particleNo;
this.staticParticles = 0;
//initialize to 0 all the matrix cells
this.worldMatrix = new int[this.height][this.width];
for(int i=0; i<this.height; i++){
for(int j=0; j<this.width; j++){
this.worldMatrix[i][j] = 0;
}
}
/*
* if the simulation is not of the snowflake type then a seed is positioned in the center
* and the max and min value for X and Y are recalculated to surround the seed point
*/
if( movementType == 1 || movementType == 2 || movementType == 3 ){
worldMatrix[((height/2)-1)][((width/2)-1)] = 1;
elements++;
staticParticles++;
xMin = (height/2)-2;
xMax = height/2;
yMin = (width/2)-2;
yMax = width/2;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void createNewParticles(int number) {\n\t\t// The following declarations are to initialize the random range for the \n\t\t// particle's feature\n\t\tint maxX = Fountain.positionX + 3;\n\t\tint minX = Fountain.positionX - 3;\n\t\tint boundX = maxX - minX;\n\t\tint maxY = Fountain.positionY + 3;\n\t\t... | [
"0.70395327",
"0.64827967",
"0.6386921",
"0.6261776",
"0.61752516",
"0.6138566",
"0.61355424",
"0.61086917",
"0.60853153",
"0.60367",
"0.6030954",
"0.603056",
"0.598542",
"0.5967146",
"0.59643155",
"0.594662",
"0.5917258",
"0.58602506",
"0.58503115",
"0.5797831",
"0.578233",
... | 0.5018593 | 73 |
/ This method allows the creation of new particles outside of the bounding box of the DLA | private void createParticleOutsideOfBB(){
int x = 0;
int y = 0;
int r = randInt.getRandInt(1, 4);
if(movementType == 0){
x = randInt.getRandInt(0,xMin);
y = randInt.getRandInt(0,799);
}
else
{
switch (r) {
case 1:
x = randInt.getRandInt(0,599);
y = randInt.getRandInt(0,yMin);
break;
case 2:
x = randInt.getRandInt(0,599);
y = randInt.getRandInt(yMax,799);
break;
case 3:
x = randInt.getRandInt(0,xMin);
y = randInt.getRandInt(0,799);
break;
case 4:
x = randInt.getRandInt(xMax,599);
y = randInt.getRandInt(0,799);
break;
}
}
particleCollection.add(new Particle(x,y,1,1,width,height,randInt.getRandInt(0,1),randInt.getRandInt(0,1),worldMatrix));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n \t\t\t\tpublic void doCreateQuadParticle() {\n \n \t\t\t\t}",
"@Override\n public void run()\n {\n final int minX = region.getMinimumPoint().getX();\n final int minZ = region.getMinimumPoint().getZ();\n final int maxX = region.getMaximumPoint().getX();\n final int ma... | [
"0.639989",
"0.60791355",
"0.60345685",
"0.5963809",
"0.5906997",
"0.5866552",
"0.57872623",
"0.5755713",
"0.57496655",
"0.5738936",
"0.56996787",
"0.5693233",
"0.56772435",
"0.56473076",
"0.56327504",
"0.5551813",
"0.55103797",
"0.5487314",
"0.5482237",
"0.546247",
"0.545933... | 0.7352056 | 0 |
/ update the boundaries value xMin, xMax, yMin, yMax based on the actual DLA structure | private void updateBB(int i){
if( particleCollection.get(i).getX() < xMin ) xMin = particleCollection.get(i).getX();
if( particleCollection.get(i).getX() > xMax ) xMax = particleCollection.get(i).getX();
if( particleCollection.get(i).getY() < yMin ) yMin = particleCollection.get(i).getY();
if( particleCollection.get(i).getY() > yMax ) yMax = particleCollection.get(i).getY();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double[] setMapBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 154: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 2... | [
"0.62445104",
"0.60734284",
"0.6067309",
"0.6050732",
"0.6013629",
"0.5966456",
"0.5957974",
"0.59258795",
"0.5917704",
"0.59063154",
"0.58814776",
"0.58647305",
"0.58559704",
"0.5821511",
"0.5799115",
"0.57740337",
"0.5736084",
"0.57137305",
"0.57056034",
"0.56698227",
"0.56... | 0.5469107 | 33 |
/ This is the most important method of the class, it's function is to call the method for selected movement type for each floating particles | public void updateWorld() {
/*
* The particles are created during the simulation, this prevents some strange behaviors
* that rises when all the particles are added at the start of a simulation, for example
* the it was noticed that the random generation for the position followed some sort of pattern
* and this influenced the formation the DLA cluster, resulting in an unxpected formation
* */
if( elements < getInitialParticleNumber() ){
createParticleOutsideOfBB();
elements++;
}
//now for the each particles that are still floating a movement update is made,
//according to the type of movement
for(int i=0; i<particleCollection.size(); i++){
if( particleCollection.get(i).isFloating() == false ){
particleCollection.remove(i);
}
//If the particle has gone outside of the boundaries then
//a new one is created to replace it, this can happen only if the movementType is 2 or 3 (balistic or square spiral)
else if( particleCollection.get(i).isOutsideOfTheWorld() == true ){
particleCollection.remove(i);
createParticleOutsideOfBB();
}
else{
switch(movementType){
case 0:
/*
* each movement method return a boolean if it's false it mean that the particle ha moved and
* the collided to the cluster and so the static particle counter il incremented by one
* */
if( particleCollection.get(i).snowFlakeFallMove() == false ){
collisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));
updateBB(i);
staticParticles++;
}
break;
case 1:
if( particleCollection.get(i).randomMove() == false ){
collisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));
updateBB(i);
staticParticles++;
}
break;
case 2:
if( particleCollection.get(i).straightMove() == false ){
collisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));
updateBB(i);
staticParticles++;
}
break;
case 3:
if( particleCollection.get(i).squareSpiralMove() == false ){
collisionIteration.add(new Integer(particleCollection.get(i).getIterationNumber()));
updateBB(i);
staticParticles++;
}
break;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void handleMovement();",
"public abstract void calculateMovement();",
"public void run() {\n setSpeed(MAX_SPEED, MAX_SPEED);\n while (step(TIME_STEP) != 16) {\n String name = \"\";\n if (behaviourList.get(2).takeControl()){\n name = \"inFrontOf... | [
"0.5925633",
"0.58293706",
"0.5826948",
"0.581022",
"0.57734495",
"0.57458365",
"0.57403386",
"0.5710499",
"0.5655291",
"0.5641465",
"0.5640191",
"0.5611261",
"0.55978227",
"0.5590169",
"0.5581655",
"0.5581453",
"0.55749524",
"0.5565812",
"0.55646074",
"0.5557356",
"0.5536763... | 0.5874413 | 1 |
Function: The outer iteration loop controls the masking conditions of all scalefactorbands. It computes the best scalefac and global gain. This module calls the inner iteration loop | private void outer_loop( int max_bits,
int ix[], /* vector of frequency values */
int gr, int ch, SideInfoEnc side_info ) {
int bits = 0;
EChannel cod_info = side_info.gr[gr].ch[ch];
cod_info.part2_length = part2_length(gr,ch,side_info);
bits = inner_loop( ix, cod_info, max_bits );
// cod_info.part2_3_length = cod_info.part2_length + bits;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rasterScanning(){\r\n ReadParameter embedPara = new ReadParameter();\r\n QuantisationEmbedding subband = new QuantisationEmbedding();\r\n int i,j,k,p;\r\n double[] coeffStream, modCoeffStream;\r\n //Modification in selected subband only\r\n if(embedPara.getSubb... | [
"0.5669143",
"0.5611109",
"0.556441",
"0.5503743",
"0.54625577",
"0.5461253",
"0.5414824",
"0.53371054",
"0.5324002",
"0.531631",
"0.5307722",
"0.5223875",
"0.5180695",
"0.5178517",
"0.5161811",
"0.51537496",
"0.5127997",
"0.51007247",
"0.5093343",
"0.508875",
"0.5047179",
... | 0.5597587 | 2 |
calculates the number of bits needed to encode the scalefacs in the main data block | private int part2_length(int gr, int ch, SideInfoEnc si) {
int slen1, slen2, bits;
EChannel gi = si.gr[gr].ch[ch];
bits = 0;
slen1 = slen1_tab[ gi.scalefac_compress ];
slen2 = slen2_tab[ gi.scalefac_compress ];
if ( (gi.window_switching_flag == 1) && (gi.block_type == 2) ) {
if ( gi.mixed_block_flag != 0 ) {
bits += (8 * slen1) + (9 * slen1) + (18 * slen2);
} else {
bits += (18 * slen1) + (18 * slen2);
}
} else {
if ( gr != 0 || (si.scfsi[ch][0] == 0 ) )
bits += (6 * slen1);
if ( gr != 0 || (si.scfsi[ch][1] == 0 ) )
bits += (5 * slen1);
if ( gr != 0 || (si.scfsi[ch][2] == 0 ) )
bits += (5 * slen2);
if ( gr != 0 || (si.scfsi[ch][3] == 0 ) )
bits += (5 * slen2);
}
return bits;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static final boolean mpeg2_scale_bitcount(final Jlame_internal_flags gfc, final Jgr_info cod_info) {\n\t\tfinal int max_sfac[] = new int[4];\n\t\tint[] partition_table;\n\t\tfinal int[] scalefac = cod_info.scalefac;\n\n\t\t/*\n\t\t Set partition table. Note that should try to use table one,\n\t\t but d... | [
"0.7142208",
"0.6991855",
"0.6638997",
"0.6594124",
"0.63368267",
"0.62978345",
"0.6294718",
"0.62504923",
"0.62440425",
"0.6229196",
"0.6207584",
"0.6194684",
"0.61835563",
"0.61747754",
"0.614509",
"0.6143017",
"0.6139524",
"0.60570174",
"0.5990787",
"0.59835285",
"0.593872... | 0.6236972 | 9 |
subdivides the bigvalue region which will use separate Huffman tables. | private void subdivide(EChannel cod_info) {
int scfb_anz = 0;
if ( bigvalues_region == 0) {
/* no big_values region */
cod_info.region0_count = 0;
cod_info.region1_count = 0;
} else {
if ( cod_info.window_switching_flag == 0 ) {
int index0, index1;
/* Calculate scfb_anz */
while (scalefac_band_long[scfb_anz] < bigvalues_region)
scfb_anz++;
/* assert (scfb_anz < 23); */
index0 = (cod_info.region0_count = subdv_table[scfb_anz][0]) + 1;
index1 = (cod_info.region1_count = subdv_table[scfb_anz][1]) + 1;
cod_info.address1 = scalefac_band_long[index0];
cod_info.address2 = scalefac_band_long[index0 + index1];
cod_info.address3 = bigvalues_region;
} else {
if ( (cod_info.block_type == 2) && (cod_info.mixed_block_flag == 0) ) {
cod_info.region0_count = 8;
cod_info.region1_count = 12;
cod_info.address1 = 36;
} else {
cod_info.region0_count = 7;
cod_info.region1_count = 13;
cod_info.address1 = scalefac_band_long[ cod_info.region0_count + 1 ];
}
cod_info.address2 = bigvalues_region;
cod_info.address3 = 0;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int regionSplitBits4DownSampledTable();",
"int regionSplitBits4PVTable();",
"private int Huffmancodebits( int [] ix, EChannel gi ) {\n\t\tint region1Start;\n\t\tint region2Start;\n\t\tint count1End;\n\t\tint bits, stuffingBits;\n\t\tint bvbits, c1bits, tablezeros, r0, r1, r2;//, rt, pr;\n\t\tint bitsWritten = ... | [
"0.6316002",
"0.57675827",
"0.5718562",
"0.5480861",
"0.5453689",
"0.53510207",
"0.52388173",
"0.5228455",
"0.5225603",
"0.50434285",
"0.5035418",
"0.4951587",
"0.4950351",
"0.4940203",
"0.4937152",
"0.48980328",
"0.48979095",
"0.4886847",
"0.4860653",
"0.4857728",
"0.4809938... | 0.6939609 | 0 |
Determines the number of bits to encode the quadruples. | private int count1_bitcount(int [] ix, EChannel cod_info) {
int p, i, k;
int signbits;
int sum0 = 0, sum1 = 0;
int count1End = bigvalues_region + count1_region;
for(i = bigvalues_region, k=0; k < count1End; i+=4, k++) {
v = Math.abs(ix[i]);
w = Math.abs(ix[i+1]);
x = Math.abs(ix[i+2]);
y = Math.abs(ix[i+3]);
p = signbits = 0;
if(v!=0) { signbits++; p |= 1; }
if(w!=0) { signbits++; p |= 2; }
if(x!=0) { signbits++; p |= 4; }
if(y!=0) { signbits++; p |= 8; }
sum0 += signbits;
sum1 += signbits;
sum0 += hlen[32][p];
sum1 += hlen[33][p];
}
if(sum0 < sum1) {
cod_info.count1table_select = 0;
return sum0;
} else {
cod_info.count1table_select = 1;
return sum1;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int sizeBits_count() {\n return 16;\n }",
"public int numberOfBits() {\n return 8 * this.data.size();\n }",
"public static int sizeBits_length() {\n return 8;\n }",
"public @UInt32 int getQuantizationBits();",
"public static int sizeBits_counter() {\n retu... | [
"0.6645039",
"0.65644276",
"0.65106267",
"0.65018934",
"0.63534564",
"0.6323303",
"0.6221672",
"0.62106377",
"0.6174351",
"0.6160583",
"0.61461115",
"0.611178",
"0.6058987",
"0.6052689",
"0.60466725",
"0.60432935",
"0.60302556",
"0.60197973",
"0.60191864",
"0.59694535",
"0.59... | 0.6046586 | 15 |
Function: Select huffman code tables for bigvalues regions | private void bigv_tab_select( int [] ix_abs, EChannel cod_info ) {
cod_info.table_select[0] = 0;
cod_info.table_select[1] = 0;
cod_info.table_select[2] = 0;
if ( cod_info.window_switching_flag != 0 && cod_info.block_type == 2 ) {
/*
Within each scalefactor band, data is given for successive
time windows, beginning with window 0 and ending with window 2.
Within each window, the quantized values are then arranged in
order of increasing frequency...
*/
int sfb, window, line, start, end, max1, max2;
int region1Start;
int pmax = 0;
region1Start = 12;
max1 = max2 = 0;
for ( sfb = 0; sfb < 13; sfb++ ) {
start = scalefac_band_short[ sfb ];
end = scalefac_band_short[ sfb+1 ];
if ( start < region1Start )
pmax = max1;
else
pmax = max2;
for ( window = 0; window < 3; window++ )
for ( line = start; line < end; line += 2 ) {
x = ix_abs[ (line * 3) + window ];
y = ix_abs[ ((line + 1) * 3) + window ];
pmax = pmax > x ? pmax : x;
pmax = pmax > y ? pmax : y;
}
if ( start < region1Start )
max1 = pmax;
else
max2 = pmax;
}
cod_info.table_select[0] = choose_table( max1 );
cod_info.table_select[1] = choose_table( max2 );
} else {
if ( cod_info.address1 > 0 )
cod_info.table_select[0] = choose_table( ix_abs, 0, cod_info.address1 );
if ( cod_info.address2 > cod_info.address1 )
cod_info.table_select[1] = choose_table( ix_abs, cod_info.address1, cod_info.address2 );
if ( bigvalues_region > cod_info.address2 )
cod_info.table_select[2] = choose_table( ix_abs, cod_info.address2, bigvalues_region );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Hashtable<Character,Code> getHuffmanCodes(int numberOfCodes,Hashtable<String,Character> revCodes) throws IOException {\r\n\t\tbyte[] b;\r\n\t\tHashtable<Character,Code> codes = new Hashtable<>();\r\n\t\t for (int i = 0 ; i < numberOfCodes ; i++) {\r\n\t\t\t System.out.println(\"i = \" + i);\r\n\t\t\t // i... | [
"0.63566226",
"0.62521994",
"0.60225546",
"0.59751046",
"0.582609",
"0.57943875",
"0.5689548",
"0.5566559",
"0.547463",
"0.54531157",
"0.5363026",
"0.53480756",
"0.52729267",
"0.5232128",
"0.520066",
"0.5195329",
"0.5188198",
"0.5183939",
"0.5156142",
"0.51083827",
"0.5094487... | 0.598475 | 3 |
Choose the Huffman table that will encode ix[begin..end] with the fewest bits in case of short window Note: This code contains knowledge about the sizes and characteristics of the Huffman tables as defined in the IS (Table B.7), and will not work with any arbitrary tables. | private int choose_table( int max ) {
int i, choice;
if ( max == 0 )
return 0;
max = Math.abs( max );
choice = 0;
if ( max < 15 ) {
choice = 1; /* not 0 -- ht[0].xlen == 0 */
while (xlen[choice] <= max)
choice++;
} else {
max -= 15;
choice = 15;
while (linmax[choice] < max)
choice++;
}
return choice;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int Huffmancodebits( int [] ix, EChannel gi ) {\n\t\tint region1Start;\n\t\tint region2Start;\n\t\tint count1End;\n\t\tint bits, stuffingBits;\n\t\tint bvbits, c1bits, tablezeros, r0, r1, r2;//, rt, pr;\n\t\tint bitsWritten = 0;\n\t\tint idx = 0;\n\t\ttablezeros = 0;\n\t\tr0 = r1 = r2 = 0;\n\n\t\tint bigv ... | [
"0.65130275",
"0.5914308",
"0.5911431",
"0.5512726",
"0.5447297",
"0.54321593",
"0.5382008",
"0.51966095",
"0.5194903",
"0.5131033",
"0.5092173",
"0.5078773",
"0.50755674",
"0.50716764",
"0.50357825",
"0.5004262",
"0.50005656",
"0.49771303",
"0.4945896",
"0.4932862",
"0.49183... | 0.4800737 | 30 |
Choose the Huffman table that will encode ix[begin..end] with the fewest bits in case of long window Note: This code contains knowledge about the sizes and characteristics of the Huffman tables as defined in the IS (Table B.7), and will not work with any arbitrary tables. private int choose_table( int ix, long begin, long end ) | private int choose_table( int [] ix_abs, int begin, int end ) {
int i, max;
max = ix_max(ix_abs,begin,end);
if(max == 0)
return 0;
int choice0 = 0, choice1 = 0;
int sum0 = 0, sum1 = 1;
if(max<15) {
/* try tables with no linbits */
for ( i = 0; i <= 14; i++){
if ( xlen[i] > max ) {
choice0 = i;
break;
}
}
sum0 = count_bit( ix_abs, begin, end, choice0 );
switch ( choice0 ) {
case 2:
sum1 = count_bit( ix_abs, begin, end, 3 );
if ( sum1 <= sum0 )
choice0 = 3;
break;
case 5:
sum1 = count_bit( ix_abs, begin, end, 6 );
if ( sum1 <= sum0 )
choice0 = 6;
break;
case 7:
sum1 = count_bit( ix_abs, begin, end, 8 );
if ( sum1 <= sum0 ) {
choice0 = 8;
sum0 = sum1;
}
sum1 = count_bit( ix_abs, begin, end, 9 );
if ( sum1 <= sum0 )
choice0 = 9;
break;
case 10:
sum1 = count_bit( ix_abs, begin, end, 11 );
if ( sum1 <= sum0 ) {
choice0 = 11;
sum0 = sum1;
}
sum1 = count_bit( ix_abs, begin, end, 12 );
if ( sum1 <= sum0 )
choice0 = 12;
break;
case 13:
sum1 = count_bit( ix_abs, begin, end, 15 );
if ( sum1 <= sum0 )
choice0 = 15;
break;
default: break;
}
} else {
/* try tables with linbits */
max -= 15;
choice0 = 15;
while (linmax[choice0] < max)
choice0++;
choice1 = 24;
while (linmax[choice1] < max)
choice1++;
sum0 = count_bit(ix_abs, begin, end, choice0);
sum1 = count_bit(ix_abs, begin, end, choice1);
if (sum1 < sum0)
choice0 = choice1;
}
return choice0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int choose_table( int max ) {\n\t\tint i, choice;\n\n\t\tif ( max == 0 )\n\t\t\treturn 0;\n\n\t\tmax = Math.abs( max );\n\t\tchoice = 0;\n\n\t\tif ( max < 15 ) {\n\t\t\tchoice = 1; /* not 0 -- ht[0].xlen == 0 */\n\t\t\t\t\twhile (xlen[choice] <= max)\n\t\t\t\t\t\tchoice++;\n\t\t} else {\n\t\t\tmax -= 15;... | [
"0.6219499",
"0.603549",
"0.5781978",
"0.54540724",
"0.54215574",
"0.5315246",
"0.5245638",
"0.5095508",
"0.5029174",
"0.49317837",
"0.4889724",
"0.48185307",
"0.4777413",
"0.47668976",
"0.47379217",
"0.467152",
"0.46693498",
"0.46661347",
"0.46178076",
"0.46167883",
"0.46157... | 0.7242753 | 0 |
Function: Count the number of bits necessary to code the bigvalues region. | private int bigv_bitcount(int [] ix, EChannel gi) {
int bits = 0;
if ( gi.window_switching_flag != 0 && gi.block_type == 2 ) {
/*
Within each scalefactor band, data is given for successive
time windows, beginning with window 0 and ending with window 2.
Within each window, the quantized values are then arranged in
order of increasing frequency...
*/
int sfb = 0, window, line, start, end;
if ( gi.mixed_block_flag != 0 ) {
int tableindex;
if ( (tableindex = gi.table_select[0]) != 0 )
bits += count_bit( ix, 0, gi.address1, tableindex );
sfb = 2;
}
for ( ; sfb < 13; sfb++ ) {
int tableindex = 100;
start = scalefac_band_short[ sfb ];
end = scalefac_band_short[ sfb+1 ];
if ( start < 12 )
tableindex = gi.table_select[ 0 ];
else
tableindex = gi.table_select[ 1 ];
bits += count_bit_short(ix, start, end, tableindex);/*
for ( line = start; line < end; line += 2 ) {
for ( window = 0; window < 3; window++ ){
x = (ix[line * 3 + window ]);
y = (ix[(line + 1) * 3 + window]);
// x = (i192_3[ line ][ window ]);
// y = (i192_3[ line + 1 ][ window]);
bits += HuffmanCode( tableindex, x, y );
}
}*/
}
} else {
int table;
if( (table = gi.table_select[0] )>=0) // region0
bits += count_bit(ix, 0, gi.address1, table );
if( (table = gi.table_select[1])>=0) // region1
bits += count_bit(ix, gi.address1, gi.address2, table );
if( (table = gi.table_select[2])>=0) // region2
bits += count_bit(ix, gi.address2, gi.address3, table );
}
return bits;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int sizeBits_counter() {\n return 32;\n }",
"private int count1_bitcount(int [] ix, EChannel cod_info) {\n\t\tint p, i, k;\n\t\tint signbits;\n\t\tint sum0 = 0, sum1 = 0;\n\t\tint count1End = bigvalues_region + count1_region;\n\n\t\tfor(i = bigvalues_region, k=0; k < count1End; i+=4, k++)... | [
"0.73963845",
"0.7033259",
"0.6852989",
"0.6706673",
"0.66990733",
"0.6692821",
"0.66510206",
"0.6645498",
"0.66392475",
"0.6619346",
"0.6591413",
"0.6557111",
"0.65338725",
"0.65338165",
"0.6514574",
"0.6447895",
"0.6442345",
"0.6424314",
"0.6424045",
"0.64222157",
"0.638221... | 0.70449555 | 1 |
Function: Count the number of bits necessary to code short frame. | int count_bit_short( int [] ix, int start, int end, int table ) {
int i, sum;
int x,y;
if(table < 0 || table > 34)
return 0;
sum = 0;
int ylen = this.ylen[table];
int linbits = this.linbits[table];
for ( int line = start; line < end; line += 2 ) {
for ( int window = 0; window < 3; window++ ){
x = Math.abs(ix[line * 3 + window ]);
y = Math.abs(ix[(line + 1) * 3 + window]);
if(table > 15){
if(x > 14) {
x = 15;
sum += linbits;
}
if(y > 14) {
y = 15;
sum += linbits;
}
}
sum += hlen[table][(x*ylen)+y];
if(x!=0) sum++;
if(y!=0) sum++;
}
}
return sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int sizeBits_counter() {\n return 32;\n }",
"public static int sizeBits_count() {\n return 16;\n }",
"int getLowBitLength();",
"private static short\n \tnumBitsInLastByte(int bits)\n \t{\n \t\tint modulo = bits % 8;\n \t\treturn (short)((modulo == 0) ?\n \t\t\t\t((bits == 0)... | [
"0.67117625",
"0.6701238",
"0.6555826",
"0.65269357",
"0.6511072",
"0.6468326",
"0.6428303",
"0.63640773",
"0.634531",
"0.6315748",
"0.6279945",
"0.6269077",
"0.62628496",
"0.6255689",
"0.6218329",
"0.61784357",
"0.612448",
"0.6108306",
"0.60740554",
"0.60621834",
"0.60335845... | 0.6657257 | 2 |
Function: Count the number of bits necessary to code the subregion. | int count_bit( int [] ix_abs, int start, int end, int table ) {
int sum = 0;
int x,y;
if(table < 0 || table > 34)
return 0;
int ylen = this.ylen[table];
int linbits = this.linbits[table];
if(table > 15) { // ESC-table is used
for(int i = start; i < end; i += 2) {
x = ix_abs[i];
y = ix_abs[i+1];
if(x > 14) {
x = 15;
sum += linbits;
}
if(y > 14) {
y = 15;
sum += linbits;
}
sum += hlen[table][(x*ylen)+y];
if(x!=0) sum++;
if(y!=0) sum++;
}
} else { /* No ESC-words */
for(int i = start; i < end; i += 2) {
x = ix_abs[i];
y = ix_abs[i+1];
sum += hlen[table][(x*ylen)+y];
if(x!=0) sum++;
if(y!=0) sum++;
}
}
return sum;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int sizeBits_counter() {\n return 32;\n }",
"int countPowertypeRanges();",
"int count_bit_short( int [] ix, int start, int end, int table ) {\n\t\tint i, sum;\n\t\tint x,y;\n\n\t\tif(table < 0 || table > 34)\n\t\t\treturn 0;\n\n\t\tsum = 0;\n\n\t\tint ylen = this.ylen[t... | [
"0.67072815",
"0.643925",
"0.64345056",
"0.64343363",
"0.6428353",
"0.639208",
"0.6387717",
"0.6320576",
"0.63124716",
"0.6302082",
"0.6286277",
"0.62743056",
"0.626305",
"0.6239516",
"0.6227146",
"0.6170656",
"0.6153151",
"0.6153151",
"0.61299014",
"0.60965174",
"0.60899746"... | 0.5559076 | 100 |
/ Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as well as the definitions of the side information on pages 26 and 27. | private int Huffmancodebits( int [] ix, EChannel gi ) {
int region1Start;
int region2Start;
int count1End;
int bits, stuffingBits;
int bvbits, c1bits, tablezeros, r0, r1, r2;//, rt, pr;
int bitsWritten = 0;
int idx = 0;
tablezeros = 0;
r0 = r1 = r2 = 0;
int bigv = gi.big_values * 2;
int count1 = gi.count1 * 4;
/* 1: Write the bigvalues */
if ( bigv!= 0 ) {
if ( (gi.mixed_block_flag) == 0 && gi.window_switching_flag != 0 && (gi.block_type == 2) ) { /* Three short blocks */
// if ( (gi.mixed_block_flag) == 0 && (gi.block_type == 2) ) { /* Three short blocks */
/*
Within each scalefactor band, data is given for successive
time windows, beginning with window 0 and ending with window 2.
Within each window, the quantized values are then arranged in
order of increasing frequency...
*/
int sfb, window, line, start, end;
//int [] scalefac = scalefac_band_short; //da modificare nel caso si convertano mp3 con fs diversi
region1Start = 12;
region2Start = 576;
for ( sfb = 0; sfb < 13; sfb++ ) {
int tableindex = 100;
start = scalefac_band_short[ sfb ];
end = scalefac_band_short[ sfb+1 ];
if ( start < region1Start )
tableindex = gi.table_select[ 0 ];
else
tableindex = gi.table_select[ 1 ];
for ( window = 0; window < 3; window++ )
for ( line = start; line < end; line += 2 ) {
x = ix[ line * 3 + window ];
y = ix[ (line + 1) * 3 + window ];
bits = HuffmanCode( tableindex, x, y );
mn.add_entry( code, cbits );
mn.add_entry( ext, xbits );
bitsWritten += bits;
}
}
} else
if ( gi.mixed_block_flag!= 0 && gi.block_type == 2 ) { /* Mixed blocks long, short */
int sfb, window, line, start, end;
int tableindex;
//scalefac_band_long;
/* Write the long block region */
tableindex = gi.table_select[0];
if ( tableindex != 0 )
for (int i = 0; i < 36; i += 2 ) {
x = ix[i];
y = ix[i + 1];
bits = HuffmanCode( tableindex, x, y );
mn.add_entry( code, cbits );
mn.add_entry( ext, xbits );
bitsWritten += bits;
}
/* Write the short block region */
tableindex = gi.table_select[ 1 ];
for ( sfb = 3; sfb < 13; sfb++ ) {
start = scalefac_band_long[ sfb ];
end = scalefac_band_long[ sfb+1 ];
for ( window = 0; window < 3; window++ )
for ( line = start; line < end; line += 2 ) {
x = ix[ line * 3 + window ];
y = ix[ (line + 1) * 3 + window ];
bits = HuffmanCode( tableindex, x, y );
mn.add_entry( code, cbits );
mn.add_entry( ext, xbits );
bitsWritten += bits;
}
}
} else { /* Long blocks */
int scalefac_index = 100;
if ( gi.mixed_block_flag != 0 ) {
region1Start = 36;
region2Start = 576;
} else {
scalefac_index = gi.region0_count + 1;
region1Start = scalefac_band_long[ scalefac_index ];
scalefac_index += gi.region1_count + 1;
region2Start = scalefac_band_long[ scalefac_index ];
}
for (int i = 0; i < bigv; i += 2 ) {
int tableindex = 100;
if ( i < region1Start ) {
tableindex = gi.table_select[0];
} else
if ( i < region2Start ) {
tableindex = gi.table_select[1];
} else {
tableindex = gi.table_select[2];
}
/* get huffman code */
x = ix[i];
y = ix[i + 1];
if ( tableindex!= 0 ) {
bits = HuffmanCode( tableindex, x, y );
mn.add_entry( code, cbits );
mn.add_entry( ext, xbits );
bitsWritten += bits;
} else {
tablezeros += 1;
}
}
}
}
bvbits = bitsWritten;
/* 2: Write count1 area */
int tableindex = gi.count1table_select + 32;
count1End = bigv + count1;
for (int i = bigv; i < count1End; i += 4 ) {
v = ix[i];
w = ix[i+1];
x = ix[i+2];
y = ix[i+3];
bitsWritten += huffman_coder_count1(tableindex);
}
// c1bits = bitsWritten - bvbits;
// if ( (stuffingBits = gi.part2_3_length - gi.part2_length - bitsWritten) != 0 ) {
// int stuffingWords = stuffingBits / 32;
// int remainingBits = stuffingBits % 32;
//
// /*
// Due to the nature of the Huffman code
// tables, we will pad with ones
// */
// while ( stuffingWords-- != 0){
// mn.add_entry( -1, 32 );
// }
// if ( remainingBits!=0 )
// mn.add_entry( -1, remainingBits );
// bitsWritten += stuffingBits;
//
// }
return bitsWritten;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Hashtable<Character,Code> getHuffmanCodes(int numberOfCodes,Hashtable<String,Character> revCodes) throws IOException {\r\n\t\tbyte[] b;\r\n\t\tHashtable<Character,Code> codes = new Hashtable<>();\r\n\t\t for (int i = 0 ; i < numberOfCodes ; i++) {\r\n\t\t\t System.out.println(\"i = \" + i);\r\n\t\t\t // i... | [
"0.7228178",
"0.6495663",
"0.64361864",
"0.6417797",
"0.64064234",
"0.6278987",
"0.62292993",
"0.60308075",
"0.59758085",
"0.597397",
"0.59515846",
"0.5948317",
"0.5884158",
"0.58698684",
"0.57857305",
"0.5766707",
"0.5691605",
"0.5674803",
"0.5649661",
"0.5636297",
"0.562793... | 0.6790151 | 1 |
/ Implements the pseudocode of page 98 of the IS | int HuffmanCode(int table_select, int x, int y ) {
int signx = 0, signy = 0, linbitsx, linbitsy, linbits, xlen, ylen, idx;
cbits = 0;
xbits = 0;
code = 0;
ext = 0;
if(table_select==0) return 0;
// signx = (x > 0)? 0: 1;
// signy = (y > 0)? 0: 1;
//x = Math.abs( x );
//y = Math.abs( y );
if(x < 0) {x = -x; signx = 1;}
if(y < 0) {y = -y; signy = 1;}
xlen = this.xlen[table_select];
ylen = this.ylen[table_select];
linbits = this.linbits[table_select];
linbitsx = linbitsy = 0;
if ( table_select > 15 ) { /* ESC-table is used */
if ( x > 14 ) {
linbitsx = x - 15;
x = 15;
}
if ( y > 14 ) {
linbitsy = y - 15;
y = 15;
}
idx = (x * ylen) + y;
code = table[table_select][idx];
cbits = hlen [table_select][idx];
if ( x > 14 ) {
ext |= linbitsx;
xbits += linbits;
}
if ( x != 0 ) {
ext <<= 1;
ext |= signx;
xbits += 1;
}
if ( y > 14 ) {
ext <<= linbits;
ext |= linbitsy;
xbits += linbits;
}
if ( y != 0 ) {
ext <<= 1;
ext |= signy;
xbits += 1;
}
} else { /* No ESC-words */
idx = (x * ylen) + y;
code = table[table_select][idx];
cbits += hlen[table_select][ idx ];
if ( x != 0 ) {
code <<= 1;
code |= signx;
cbits ++;
}
if ( y != 0 ) {
code <<= 1;
code |= signy;
cbits ++;
}
}
return cbits + xbits;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ i... | [
"0.5921148",
"0.5699625",
"0.5634191",
"0.55454195",
"0.55380315",
"0.55086386",
"0.5506477",
"0.54793465",
"0.5467055",
"0.5445492",
"0.54093957",
"0.54087406",
"0.5402835",
"0.5393088",
"0.53922135",
"0.53919744",
"0.5388483",
"0.53712684",
"0.5371044",
"0.53577375",
"0.534... | 0.0 | -1 |
/ in bits / reservoir | private void ResvFrameBegin( /*frame_params *fr_ps, */SideInfoEnc l3_side, int mean_bits, int frameLength ) {
//layer info;
int fullFrameBits, mode_gr;
int resvLimit;
/*
info = fr_ps->header;
if ( info->version == 1 ) {*/
mode_gr = GR_MAX;
resvLimit = 4088; /* main_data_begin has 9 bits in MPEG 1 */
//resvLimit = (8 * 256) * mode_gr - 8;
/*
} else {
mode_gr = 1;
resvLimit = 2040; /* main_data_begin has 8 bits in MPEG 2 */
// }
fullFrameBits = mean_bits * mode_gr;
/*
determine maximum size of reservoir:
ResvMax + frameLength <= 7680;
*/
if ( frameLength > 7680 )
ResvMax = 0;
else
ResvMax = 7680 - frameLength;
/*
limit max size to resvLimit bits because
main_data_begin cannot indicate a
larger value
*/
if ( ResvMax > resvLimit )
ResvMax = resvLimit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int nextBits(int bits);",
"public @UInt32 int getQuantizationBits();",
"int regionSplitBits4DownSampledTable();",
"private static int runStateOf(int c) { return c & ~CAPACITY; }",
"void genPromote(Collection ret, int from, int to, int bits) {\n\tfor (char i = KNIGHT; i <= QUEEN; ++i) {\n\tBouger g = ne... | [
"0.6065635",
"0.6021735",
"0.58931786",
"0.5803823",
"0.5710788",
"0.5700817",
"0.5691842",
"0.565852",
"0.5623882",
"0.56029713",
"0.55317736",
"0.55102897",
"0.54747236",
"0.5455125",
"0.54236805",
"0.5390329",
"0.5381381",
"0.53773654",
"0.53235424",
"0.5303874",
"0.529729... | 0.0 | -1 |
Returns the wrapped Objectify's ObjectifyFactory. | public ObjectifyFactory factory() {
return ofy().factory();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public OBStoreFactory getFactory();",
"@objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();",
"CommonWrappingFactory getCommonWrappingFactory();",
"public static ObjectReferenceFactory makeObjectReferenceFactory(ORB paramORB, IORTemplateList paramIORTemplateList) {\n/* 1... | [
"0.6718127",
"0.6144291",
"0.6107236",
"0.5982681",
"0.59749126",
"0.59728235",
"0.5935553",
"0.5929639",
"0.59218323",
"0.5910189",
"0.58021516",
"0.5761688",
"0.57183194",
"0.57183194",
"0.57183194",
"0.5682374",
"0.56567854",
"0.56450343",
"0.5613798",
"0.5605368",
"0.5593... | 0.82002795 | 0 |
Returns keys read by Objectify during this transaction. This won't include the keys of asynchronous save and delete operations that haven't been reaped. | public ImmutableSet<Key<?>> getSessionKeys() {
return ((SessionKeyExposingObjectify) ofy()).getSessionKeys();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Object> getKeysInvisibleInContext(LocalTransactionContext transactionContext, Store underlyingStore);",
"public K[] getKeys() {\n return keys.clone();\n }",
"public String[] getKeys() {\n\t\treturn _keys;\n\t}",
"public List getEntityKeys() {\n return resultKeys;\n }",
"public String[] ge... | [
"0.6616182",
"0.65255314",
"0.65251225",
"0.64999247",
"0.6454496",
"0.6367262",
"0.6357532",
"0.63543516",
"0.631707",
"0.630607",
"0.62732893",
"0.6247812",
"0.6215675",
"0.6200376",
"0.61966056",
"0.6185016",
"0.6185016",
"0.61832637",
"0.61652935",
"0.6119216",
"0.6107716... | 0.61178017 | 20 |
Clears the session cache. | public void clearSessionCache() {
ofy().clear();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void clearCache() {\n CACHE.remove();\n }",
"public void clearCache() {\n mCache.clear();\n }",
"public void clearSession(){\n mIsLoggedIn = false;\n mUser = null;\n clearSharedPreference();\n }",
"void clearSession();",
"void clearSession();",
"p... | [
"0.7723936",
"0.767643",
"0.76664",
"0.7579029",
"0.7579029",
"0.7377998",
"0.7345809",
"0.72754693",
"0.7253665",
"0.7239227",
"0.7228955",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.7158532",
"0.... | 0.89191675 | 0 |
Delete, augmented to enroll the deleted entities in a commit log. We only allow this in transactions so commit logs can be written in tandem with the delete. | public Deleter delete() {
return new AugmentedDeleter() {
@Override
protected void handleDeletion(Iterable<Key<?>> keys) {
assertInTransaction();
checkState(Streams.stream(keys).allMatch(Objects::nonNull), "Can't delete a null key.");
checkProhibitedAnnotations(keys, NotBackedUp.class, VirtualEntity.class);
TRANSACTION_INFO.get().putDeletes(keys);
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void deleteInBatch(Iterable<Audit> entities) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(Audit entity) {\n\t\t\n\t}",
"public abstract boolean delete(Log log) throws DataException;",
"protected void deleteWithoutCommit() {\n \t\ttry {\n \t\t\tcheckedActivate(3); // TODO: Figure out a ... | [
"0.6607619",
"0.63811135",
"0.6317054",
"0.63112146",
"0.61119473",
"0.6109627",
"0.60574126",
"0.5965477",
"0.5945845",
"0.59388953",
"0.592128",
"0.58667976",
"0.5852238",
"0.5798012",
"0.5772738",
"0.5766502",
"0.576143",
"0.57552713",
"0.57277805",
"0.57052505",
"0.569426... | 0.58256954 | 13 |
Delete, without any augmentations except to check that we're not saving any virtual entities. No backups get written. | public Deleter deleteWithoutBackup() {
return new AugmentedDeleter() {
@Override
protected void handleDeletion(Iterable<Key<?>> keys) {
checkProhibitedAnnotations(keys, VirtualEntity.class);
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n ... | [
"0.7350611",
"0.72068304",
"0.68405515",
"0.6795946",
"0.6670166",
"0.6670166",
"0.6647437",
"0.66375077",
"0.6596843",
"0.6574322",
"0.65723234",
"0.6566734",
"0.6566734",
"0.6566734",
"0.65311134",
"0.65240026",
"0.6510114",
"0.6492957",
"0.6489171",
"0.6480678",
"0.6457402... | 0.7306637 | 1 |
Save, augmented to enroll the saved entities in a commit log and to check that we're not saving virtual entities. We only allow this in transactions so commit logs can be written in tandem with the save. | public Saver save() {
return new AugmentedSaver() {
@Override
protected void handleSave(Iterable<?> entities) {
assertInTransaction();
checkState(
Streams.stream(entities).allMatch(Objects::nonNull), "Can't save a null entity.");
checkProhibitedAnnotations(entities, NotBackedUp.class, VirtualEntity.class);
ImmutableMap<Key<?>, ?> keysToEntities = uniqueIndex(entities, Key::create);
TRANSACTION_INFO.get().putSaves(keysToEntities);
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void save() throws EntityPersistenceException {\n\n }",
"protected abstract boolean onSave(CommitBuilder commit)\n throws IOException, ConfigInvalidException;",
"public Saver saveWithoutBackup() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> en... | [
"0.65849745",
"0.6441353",
"0.6315147",
"0.6255606",
"0.62005264",
"0.61562306",
"0.6109123",
"0.610624",
"0.6067087",
"0.60582197",
"0.60508555",
"0.6028283",
"0.59598",
"0.5947907",
"0.59391516",
"0.5938992",
"0.59078234",
"0.58895844",
"0.58837074",
"0.5861032",
"0.5847068... | 0.7090036 | 0 |
Save, without any augmentations except to check that we're not saving any virtual entities. No backups get written. | public Saver saveWithoutBackup() {
return new AugmentedSaver() {
@Override
protected void handleSave(Iterable<?> entities) {
checkProhibitedAnnotations(entities, VirtualEntity.class);
}
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Saver save() {\n return new AugmentedSaver() {\n @Override\n protected void handleSave(Iterable<?> entities) {\n assertInTransaction();\n checkState(\n Streams.stream(entities).allMatch(Objects::nonNull), \"Can't save a null entity.\");\n checkProhibitedAnnotatio... | [
"0.7276055",
"0.6915049",
"0.683362",
"0.678545",
"0.6625522",
"0.656279",
"0.65596664",
"0.65596664",
"0.6471492",
"0.64275396",
"0.64275396",
"0.64126736",
"0.64118975",
"0.6407234",
"0.6399254",
"0.6390758",
"0.6381701",
"0.6367683",
"0.6367164",
"0.6361941",
"0.634081",
... | 0.7842238 | 0 |
Execute a transaction. This overload is used for transactions that don't return a value, formerly implemented using VoidWork. | void transact(Runnable work) {
transact(
() -> {
work.run();
return null;
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public<ResultType> ResultType doExecuteTransaction(Transaction<ResultType> txn) throws SQLException {\n\t\tConnection conn = connect();\n\t\t\n\t\ttry {\n\t\t\tint numAttempts = 0;\n\t\t\tboolean success = false;\n\t\t\tResultType result = null;\n\t\t\t\t\n\t\t\twhile (!success && numAttempts < MAX_ATTEMPTS) {\n\t... | [
"0.68497",
"0.6827349",
"0.6711537",
"0.6603999",
"0.6336144",
"0.6252727",
"0.6250616",
"0.61780304",
"0.6177495",
"0.6168675",
"0.6151384",
"0.6131209",
"0.6065142",
"0.6048517",
"0.6001301",
"0.59985083",
"0.5938769",
"0.592432",
"0.58604425",
"0.5853744",
"0.58511484",
... | 0.0 | -1 |
Pause the current transaction (if any) and complete this one before returning to it. | <R> R transactNew(Supplier<R> work) {
// Wrap the Work in a CommitLoggedWork so that we can give transactions a frozen view of time
// and maintain commit logs for them.
return transactCommitLoggedWork(new CommitLoggedWork<>(work, getClock()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic Transaction suspend() throws IllegalStateException, SystemException {\r\n\t\trequireTransaction(\"suspend\");\r\n\t\tTransaction suspended = threadTransaction.get();\r\n\t\tsetNewTransaction();\r\n\t\treturn suspended;\r\n\t}",
"public void suspend() throws AlreadyPausedException;",
"publ... | [
"0.62774676",
"0.6230392",
"0.6081863",
"0.60385996",
"0.59049267",
"0.58769214",
"0.5838407",
"0.5780795",
"0.5770082",
"0.56654656",
"0.5644516",
"0.5612893",
"0.56016725",
"0.55883855",
"0.5585962",
"0.55684394",
"0.5514618",
"0.5459155",
"0.5458457",
"0.54475194",
"0.5437... | 0.0 | -1 |
Pause the current transaction (if any) and complete this one before returning to it. This overload is used for transactions that don't return a value, formerly implemented using VoidWork. | void transactNew(Runnable work) {
transactNew(
() -> {
work.run();
return null;
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Transaction completeTransaction() {\n\t\tTransaction transaction;\n\t\t\n\t\t//Complete the transaction\n\t\ttransaction = register[registerSelected].completeTransaction();\n\t\t//Check if a transaction was successfully closed, this happens if the object isn't null\n\t\tif(transaction != null) {\n\t\t\t//Up... | [
"0.626978",
"0.61590576",
"0.5819174",
"0.5753855",
"0.56710476",
"0.5587088",
"0.5580778",
"0.5564629",
"0.552874",
"0.5520301",
"0.5462281",
"0.54520595",
"0.5449368",
"0.5434517",
"0.54251057",
"0.5422592",
"0.54222375",
"0.5420722",
"0.5416007",
"0.53661805",
"0.53536993"... | 0.0 | -1 |
We can determine whether a transaction has succeded by trying to read the commit log back in its own retryable readonly transaction. | private <R> Boolean checkIfAlreadySucceeded(final CommitLoggedWork<R> work) {
return work.hasRun() && transactNewReadOnly(() -> {
CommitLogManifest manifest = work.getManifest();
if (manifest == null) {
// Work ran but no commit log was created. This might mean that the transaction did not
// write anything to Datastore. We can safely retry because it only reads. (Although the
// transaction might have written a task to a queue, we consider that safe to retry too
// since we generally assume that tasks might be doubly executed.) Alternatively it
// might mean that the transaction wrote to Datastore but turned off commit logs by
// exclusively using save/deleteWithoutBackups() rather than save/delete(). Although we
// have no hard proof that retrying is safe, we use these methods judiciously and it is
// reasonable to assume that if the transaction really did succeed that the retry will
// either be idempotent or will fail with a non-transient error.
return false;
}
return Objects.equals(
union(work.getMutations(), manifest),
ImmutableSet.copyOf(load().ancestor(manifest)));
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean transactionWillSucceed(Transaction transaction) {\n return transactionBuffer.transactionWillSucceed(transaction);\n }",
"protected boolean isTransactionRollback()\n {\n try\n {\n UMOTransaction tx = TransactionCoordination.getInstance().getTransaction();\n ... | [
"0.64952165",
"0.62003446",
"0.5941968",
"0.5917545",
"0.5909908",
"0.5801477",
"0.5801477",
"0.57622594",
"0.5709686",
"0.5704804",
"0.56739265",
"0.5641665",
"0.56104136",
"0.5609664",
"0.5593741",
"0.55511475",
"0.55037665",
"0.54569",
"0.5436136",
"0.5435738",
"0.5422404"... | 0.70262223 | 0 |
A readonly transaction is useful to get strongly consistent reads at a shared timestamp. | <R> R transactNewReadOnly(Supplier<R> work) {
ReadOnlyWork<R> readOnlyWork = new ReadOnlyWork<>(work, getClock());
try {
ofy().transactNew(() -> {
readOnlyWork.run();
return null;
});
} catch (TransientFailureException | DatastoreTimeoutException | DatastoreFailureException e) {
// These are always retryable for a read-only operation.
return transactNewReadOnly(work);
} catch (KillTransactionException e) {
// Expected; we killed the transaction as a safety measure, and now we can return the result.
return readOnlyWork.getResult();
}
throw new AssertionError(); // How on earth did we get here?
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void readOnlyTransaction();",
"protected void maybeToReadonlyTransaction() {\n\t\tTransaction.current().toReadonly();\n\t}",
"public boolean isReadOnly() {\n return type == TransactionType.READ_ONLY;\n }",
"private int readByReadOnlyTransaction(int ts, Operation o, Variable v) {\n o.setValue... | [
"0.6966186",
"0.6881367",
"0.6427099",
"0.6294424",
"0.61269224",
"0.5972739",
"0.57362795",
"0.5735618",
"0.57346326",
"0.5716354",
"0.56775874",
"0.56713927",
"0.55888444",
"0.5556492",
"0.5539873",
"0.55212855",
"0.54767156",
"0.54694563",
"0.54247916",
"0.5423002",
"0.537... | 0.6087136 | 5 |
Execute some work in a transactionless context. | <R> R doTransactionless(Supplier<R> work) {
try {
com.googlecode.objectify.ObjectifyService.push(
com.googlecode.objectify.ObjectifyService.ofy().transactionless());
return work.get();
} finally {
com.googlecode.objectify.ObjectifyService.pop();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void execute(Work work) {\n final Session session = (Session) entityManager.getDelegate();\n session.doWork(work);\n }",
"public void executePendingTransactions()\n\t{\n\t\twhile(!transactionQueue.isEmpty())\n\t\t\ttransactionQueue.poll().doTransaction();\n\t}",
"@Visible... | [
"0.6902534",
"0.6543323",
"0.65217334",
"0.641701",
"0.6277338",
"0.6029179",
"0.6029179",
"0.5996147",
"0.59325486",
"0.5906218",
"0.589039",
"0.58729255",
"0.58577615",
"0.58500254",
"0.5847596",
"0.5809996",
"0.5787205",
"0.57847285",
"0.57633364",
"0.5760736",
"0.5755595"... | 0.66414165 | 1 |
Execute some work with a fresh session cache. This is useful in cases where we want to load the latest possible data from Datastore but don't need pointintime consistency across loads and consequently don't need a transaction. Note that unlike a transaction's fresh session cache, the contents of this cache will be discarded once the work completes, rather than being propagated into the enclosing session. | public <R> R doWithFreshSessionCache(Supplier<R> work) {
try {
com.googlecode.objectify.ObjectifyService.push(
com.googlecode.objectify.ObjectifyService.factory().begin());
return work.get();
} finally {
com.googlecode.objectify.ObjectifyService.pop();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Result withNewSession() {\n return withSession(Collections.emptyMap());\n }",
"protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }",
"public void cacheableQuery() throws HibException;",
"public void clearSessionCache() {\n ... | [
"0.5588314",
"0.5552693",
"0.5448478",
"0.53978413",
"0.5390097",
"0.532175",
"0.52433145",
"0.51593184",
"0.511827",
"0.5115022",
"0.5095395",
"0.50800943",
"0.5048388",
"0.5048388",
"0.5032449",
"0.5027799",
"0.50101113",
"0.50055104",
"0.49768513",
"0.49718925",
"0.4963378... | 0.7411492 | 0 |
Get the time associated with the start of this particular transaction attempt. | DateTime getTransactionTime() {
assertInTransaction();
return TRANSACTION_INFO.get().transactionTime;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }",
"public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}",
"public java.sql.Time getREQ_START_TIME()\n {\n \n return __REQ_START_TIME;\n }",
"public double getStartTim... | [
"0.77687013",
"0.74363434",
"0.7365642",
"0.7284214",
"0.7273043",
"0.7238505",
"0.71752536",
"0.71752536",
"0.71564883",
"0.7145091",
"0.7108363",
"0.7091936",
"0.7069649",
"0.70666826",
"0.70516497",
"0.70516497",
"0.70516497",
"0.7051187",
"0.7051187",
"0.7051187",
"0.7051... | 0.0 | -1 |
Convert an entity POJO to a datastore Entity. | public Entity toEntity(Object pojo) {
return ofy().save().toEntity(pojo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object toPojo(Entity entity) {\n return ofy().load().fromEntity(entity);\n }",
"E toEntity(V dto);",
"public void toEntity(){\n\n }",
"Object toDomain(Object entity, Settings settings);",
"public abstract T convertToEntity(D dto);",
"<T> void toEntity(T entity, int type);",
"public abstra... | [
"0.7236916",
"0.7180474",
"0.7098452",
"0.7095643",
"0.70633334",
"0.7048309",
"0.6880407",
"0.6543641",
"0.649778",
"0.64189583",
"0.6404163",
"0.63960487",
"0.63631785",
"0.63609946",
"0.635179",
"0.6330721",
"0.6263715",
"0.6238398",
"0.61938655",
"0.61356187",
"0.6103357"... | 0.78631085 | 0 |
Convert a datastore entity to a POJO. | public Object toPojo(Entity entity) {
return ofy().load().fromEntity(entity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object toDomain(Object entity, Settings settings);",
"public Entity toEntity(Object pojo) {\n return ofy().save().toEntity(pojo);\n }",
"E toEntity(V dto);",
"public abstract T convertToEntity(D dto);",
"public abstract P toEntity();",
"public void toEntity(){\n\n }",
"<T> void toEntity(T entity... | [
"0.72764343",
"0.70220643",
"0.701351",
"0.69937575",
"0.69847834",
"0.68945646",
"0.6609436",
"0.65858436",
"0.6542463",
"0.6539992",
"0.64962876",
"0.64521974",
"0.6429175",
"0.64033926",
"0.6402891",
"0.63831085",
"0.6325733",
"0.63149554",
"0.6313049",
"0.62645596",
"0.61... | 0.82143855 | 0 |
Create Channels and start CAR | public void start() {
synchronized (car) {
LOG.fine("Validating APPLY Record");
try {
dir = cas.createChannel(epicsTop.buildEpicsChannelName(name + ".DIR"), Dir.CLEAR);
dir.registerListener(new DirListener());
val = cas.createChannel(epicsTop.buildEpicsChannelName(name + ".VAL"), 0);
mess = cas.createChannel(epicsTop.buildEpicsChannelName(name + ".MESS"), "");
omss = cas.createChannel(epicsTop.buildEpicsChannelName(name + ".OMSS"), "");
clid = cas.createChannel(epicsTop.buildEpicsChannelName(name + ".CLID"), 0);
car.start();
for (CadRecord cad : cads) {
cad.start();
cad.getCar().registerListener(new CarListener());
}
} catch (CAException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void start(Channel channel, Object msg);",
"public void initChannel() {\n //or channelFactory\n bootstrap().channel(NioServerSocketChannel.class);\n }",
"public void createChannel() {\r\n\t\tworkChannels.add(new ArrayList<Point>());\r\n\t}",
"private void createChannelAccess(Nx100Type config... | [
"0.60996526",
"0.6049121",
"0.60279614",
"0.59906816",
"0.5945132",
"0.59403044",
"0.59268534",
"0.58801997",
"0.58651847",
"0.5852139",
"0.57714593",
"0.56893194",
"0.566236",
"0.5661892",
"0.5614821",
"0.5603165",
"0.5596545",
"0.55964774",
"0.554111",
"0.5509072",
"0.55060... | 0.5804721 | 10 |
Destroy Channels and stop CAR | public void stop() {
synchronized (car) {
LOG.info("Invalidating APPLY Record");
try {
cas.destroyChannel(dir);
cas.destroyChannel(val);
cas.destroyChannel(mess);
cas.destroyChannel(omss);
cas.destroyChannel(clid);
car.stop();
for (CadRecord cad : cads) {
cad.stop();
}
} catch (Exception e) {
LOG.warning("Exception while shutting down apply record " + e.getMessage());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void destroy()\n {\n lock.lock();\n try {\n if(isDestroyed) return;\n isDestroyed = true;\n } finally {\n lock.unlock();\n }\n for(int i=0; i<numChannel; ++i) \n {\n if(pvaClientChannelArray!=null) pvaClientChannelArray... | [
"0.67939925",
"0.6777248",
"0.6412928",
"0.62906706",
"0.62891763",
"0.627843",
"0.6277571",
"0.62481636",
"0.62450945",
"0.62411046",
"0.62004566",
"0.6182827",
"0.61349005",
"0.6128544",
"0.6124872",
"0.61152107",
"0.60692227",
"0.6067836",
"0.60612655",
"0.60579157",
"0.60... | 0.6099632 | 16 |
Set the Channel value if the new value is different than the old. | static private <T> boolean setIfDifferent(Channel<T> ch, T value) throws CAException, TimeoutException {
if (!value.equals(ch.getFirst())) {
ch.setValue(value);
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void channelChanged(){\r\n if(channel.getText().equals(\"\") || Integer.parseInt(channel.getText())<1 || Integer.parseInt(channel.getText())>83){\r\n System.out.println(\"Channel out of range! resetting to channel 1...\");\r\n channel.setText(\"1\");\r\n System.out.pr... | [
"0.6681638",
"0.59211147",
"0.58107656",
"0.5625814",
"0.5619384",
"0.5446324",
"0.5438387",
"0.5366962",
"0.5348333",
"0.5336647",
"0.5326909",
"0.53131247",
"0.5284229",
"0.52786964",
"0.5258769",
"0.5253935",
"0.5247262",
"0.5185358",
"0.5173855",
"0.51237535",
"0.5120593"... | 0.73306197 | 0 |
This method retrieves the page source. | public static String getPageSource(WebDriver driver)
{
return driver.getPageSource();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getPageSource() {\n \t\treturn getWebDriver().getPageSource();\n \t}",
"public String getPageSource() {\n return driver.get().getPageSource();\n }",
"public String getCurrentPageSource() {\n return driver.getPageSource();\n }",
"public String getUrlSourcePage(String url) thr... | [
"0.7361516",
"0.7294154",
"0.6873508",
"0.6715918",
"0.6549217",
"0.6543825",
"0.64793456",
"0.6285699",
"0.62003803",
"0.6100994",
"0.6073791",
"0.5997852",
"0.5936329",
"0.5930425",
"0.590256",
"0.5862853",
"0.5854955",
"0.58446",
"0.57923836",
"0.5724259",
"0.56994903",
... | 0.6588281 | 4 |
This method retrieves the title. | public static String getTitle(WebDriver driver)
{
return driver.getTitle();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle();",
"public java.lang.String getTitle() {\n return title;\n }",
"public java.lang.String getTitle() {\n return title;\n }... | [
"0.8435975",
"0.83936733",
"0.8379687",
"0.8375169",
"0.8375169",
"0.8375169",
"0.8368451",
"0.8368451",
"0.8368451",
"0.8368451",
"0.8368451",
"0.8353992",
"0.8353992",
"0.83389384",
"0.8334618",
"0.8313309",
"0.8312154",
"0.83118254",
"0.83065027",
"0.83062434",
"0.83062434... | 0.0 | -1 |
This method returns the url. | public static String getUrl(WebDriver driver)
{
return driver.getCurrentUrl();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"java.lang.String getUrl();",
"@Override\n\tpublic String getUrl()\n\t{\... | [
"0.8444516",
"0.8242967",
"0.8242967",
"0.8242967",
"0.8242967",
"0.8242967",
"0.8242967",
"0.81513405",
"0.81379586",
"0.8083075",
"0.8083075",
"0.8019091",
"0.8010781",
"0.7995291",
"0.7989576",
"0.79802155",
"0.7970814",
"0.79583293",
"0.795156",
"0.795156",
"0.7946232",
... | 0.0 | -1 |
This method retrieves all window handles. | public static Set<String> getWindowHandles(WebDriver driver)
{
return driver.getWindowHandles();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Set<String> getAllWindowHandles(WebDriver driver) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (driver != null) {\n\n\t\t\t\tSet<String> allHandles = driver.getWindowHandles();\n\t\t\t\tSystem.out.println(\"Total opened window: \" + allHandles.size());\n\t\t\t\treturn... | [
"0.7350569",
"0.7307652",
"0.7247515",
"0.70414585",
"0.68044645",
"0.61028033",
"0.603161",
"0.60073274",
"0.592711",
"0.5912042",
"0.581105",
"0.5806135",
"0.57964355",
"0.5752727",
"0.5702089",
"0.5682477",
"0.5669074",
"0.551633",
"0.53733635",
"0.5371817",
"0.5371264",
... | 0.72058636 | 3 |
This method launches the driver. | private static WebDriver launchDriver(WebDriver driver)
{
switch (getBrowserType())
{
case InternetExplorer:
{
driver = launchInternetExplorer();
break;
}
case Chrome:
{
driver = launchChrome();
break;
}
default:
{
driver = launchFirefox();
break;
}
}
driver.manage().timeouts().implicitlyWait(getImplicitWaitTime(), TimeUnit.SECONDS);
waitPageLoad = new WebDriverWait(driver, getPageLoadWaitTime());
waitAjaxLoad = new WebDriverWait(driver, getAjaxLoadWaitTime());
javaScriptExecutor = (JavascriptExecutor) driver;
return driver;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void startDriver();",
"public static void start(WebDriver driver)\n\t{\n\t/*\tif (driver == null)\n\t\t{\n\t\t\tdriver = launchDriver(driver);\n\t\t}\n\t*/\n\t\tdriver = launchDriver(driver);\n\t\t\n\t}",
"public Start (WebDriver driver) {\n\t\tthis.driver=driver;\n\t}",
"@BeforeClass\n @Parameters... | [
"0.75753105",
"0.67620605",
"0.66180164",
"0.6591948",
"0.6562971",
"0.6519404",
"0.6492948",
"0.6479158",
"0.6462178",
"0.6445761",
"0.63788915",
"0.6376207",
"0.62472594",
"0.62126905",
"0.61695445",
"0.6161719",
"0.6161719",
"0.6161719",
"0.6150473",
"0.61391246",
"0.60970... | 0.6290098 | 12 |
This method launches Firefox. | private static WebDriver launchFirefox()
{
if (REMOTE_URL != null && !REMOTE_URL.equals("")) {
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
try {
return new RemoteWebDriver(new URL(System.getProperty("RemoteUrl")), capabilities);
}
catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else
{
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
return new FirefoxDriver(profile);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static WebDriver startFirefox() {\n\t\tDesiredCapabilities cap = DesiredCapabilities.firefox();\n\t\tcap.setCapability(\"marionette\", true);\n\t\treturn new FirefoxDriver(cap);\n\t}",
"private void setFirefoxDriver() throws Exception {\n\t\t// Disable cache\n\t\tffProfile.setPreference(\"browser.cache.di... | [
"0.73933494",
"0.69533443",
"0.6907887",
"0.67576164",
"0.6749596",
"0.67216223",
"0.6674054",
"0.66568536",
"0.66560996",
"0.6627828",
"0.6594832",
"0.6554475",
"0.6351696",
"0.6347975",
"0.62526584",
"0.6168682",
"0.6167289",
"0.6133138",
"0.6127779",
"0.61170846",
"0.60756... | 0.72350323 | 1 |
This method launches Internet Explorer. | private static WebDriver launchInternetExplorer()
{
if (REMOTE_URL != null && !REMOTE_URL.equals("")) {
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
try {
return new RemoteWebDriver(new URL(System.getProperty("RemoteUrl")), capabilities);
}
catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else
{
URL IEDriverURL = BrowserDriver.class.getResource("/drivers/IEDriverServer.exe");
File file = new File(IEDriverURL.getFile());
System.setProperty(InternetExplorerDriverService.IE_DRIVER_EXE_PROPERTY, file.getAbsolutePath());
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
return new InternetExplorerDriver(capabilities);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openIe(){\n\n }",
"public static void executeBrowser() throws Exception{\n\t\tinvokeMyBrowser();\n\t}",
"@Test\n\tpublic void launchConfiguredInternetExplorer() {\n\n\t\tSystem.setProperty(\"webdriver.ie.driver\", \"C:\\\\Java Libraries\\\\drivers\\\\IEDriverServer.exe\");\n\n//\t\tSystem.setPro... | [
"0.70791847",
"0.6684001",
"0.64720815",
"0.63740164",
"0.624077",
"0.617122",
"0.61567503",
"0.6061985",
"0.60258836",
"0.6005313",
"0.60011774",
"0.594808",
"0.58871937",
"0.5861129",
"0.5842419",
"0.58159465",
"0.57954216",
"0.5787861",
"0.5697296",
"0.5684235",
"0.5669803... | 0.7076386 | 1 |
This method launches Chrome. | private static WebDriver launchChrome()
{
if (REMOTE_URL != null && !REMOTE_URL.equals("")) {
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
try {
return new RemoteWebDriver(new URL(System.getProperty("RemoteUrl")), capabilities);
}
catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else
{
URL chromeDriverURL = BrowserDriver.class.getResource("/drivers/chromedriver.exe");
File file = new File(chromeDriverURL.getFile());
System.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());
ChromeOptions options = new ChromeOptions();
options.addArguments("--start-maximized");
options.addArguments("--ignore-certificate-errors");
return new ChromeDriver(options);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}",
"public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}",
"public static void startChromeDriver() {\r\n\t\tswitch (operatingS... | [
"0.77890754",
"0.75530386",
"0.74604166",
"0.73265594",
"0.7293045",
"0.72908723",
"0.7237332",
"0.71446615",
"0.7011046",
"0.69917536",
"0.692874",
"0.6768705",
"0.6740742",
"0.6735724",
"0.6730091",
"0.66940004",
"0.66925",
"0.6653716",
"0.6483913",
"0.6456315",
"0.643778",... | 0.7463919 | 2 |
This method launches Chrome. | private static WebDriver launchRemoteDriver()
{
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
try {
if (REMOTE_URL != null && !REMOTE_URL.equals("")) {
return new RemoteWebDriver(new URL(System.getProperty("RemoteUrl")), capabilities);
}
else
return new InternetExplorerDriver();
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}",
"public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}",
"private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL !... | [
"0.77890754",
"0.75530386",
"0.7463919",
"0.74604166",
"0.73265594",
"0.7293045",
"0.72908723",
"0.7237332",
"0.71446615",
"0.7011046",
"0.69917536",
"0.692874",
"0.6768705",
"0.6740742",
"0.6735724",
"0.6730091",
"0.66940004",
"0.66925",
"0.6653716",
"0.6483913",
"0.6456315"... | 0.0 | -1 |
This method retrieves the browserType from the environment variables. | private static BrowserType getBrowserType()
{
String browserType = System.getProperty(BROWSER_KEY);
if (browserType == null || browserType.isEmpty())
{
return BrowserType.Firefox;
}
else
{
int type = Integer.parseInt(browserType);
if (BrowserType.InternetExplorer.getCode() == type)
{
return BrowserType.InternetExplorer;
}
else if (BrowserType.Chrome.getCode() == type)
{
return BrowserType.Chrome;
}
else
{
return BrowserType.Firefox;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static BrowserType getBrowserType() {\n logger.trace(\"Get the BrowserType\");\n return driverThread.get().getBrowserType();\n }",
"public String getBrowserType(){\n\t\treturn browserType;\n\t}",
"public String getBrowser() {\n String browser = null;\n\n try\n {\n ... | [
"0.81423426",
"0.79270965",
"0.7296957",
"0.7229155",
"0.6862061",
"0.68608713",
"0.6821669",
"0.68094736",
"0.6799562",
"0.66296184",
"0.6305533",
"0.6151256",
"0.60480386",
"0.600163",
"0.5992858",
"0.59758765",
"0.59323436",
"0.58079565",
"0.57686293",
"0.57525504",
"0.574... | 0.8343055 | 0 |
This method retrieves the implicit wait time from the environment variables. | private static int getImplicitWaitTime()
{
String implicitWaitTime = System.getProperty(IMPLICIT_WAIT_TIME_KEY);
if (implicitWaitTime == null || implicitWaitTime.isEmpty())
{
return implicitWaitDefaultTime;
}
else
{
return Integer.parseInt(implicitWaitTime);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getwaitTime(){\r\n\t\t String temp=rb.getProperty(\"waitTime\");\r\n\t\t return Integer.parseInt(temp);\r\n\t}",
"public int explicitWait(){\n\t\tString time_out = null;\n\t\ttry {\n\t\t\ttime_out = new AutomationConfigurator().getTimeOut();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n... | [
"0.7316671",
"0.6771555",
"0.66236895",
"0.6458958",
"0.6239888",
"0.6236966",
"0.6213445",
"0.61892134",
"0.617873",
"0.6101981",
"0.6092973",
"0.6043442",
"0.6024738",
"0.59092087",
"0.5877205",
"0.5840875",
"0.5806284",
"0.5805861",
"0.5803681",
"0.5791451",
"0.5777841",
... | 0.75063956 | 0 |
This method retrieves the page load wait time from the environment variables. | private static int getPageLoadWaitTime()
{
String pageLoadWaitTime = System.getProperty(PAGE_LOAD_TIME_KEY);
if (pageLoadWaitTime == null || pageLoadWaitTime.isEmpty())
{
return pageLoadWaitDefaultTime;
}
else
{
return Integer.parseInt(pageLoadWaitTime);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int getAjaxLoadWaitTime()\n\t{\n\t\tString ajaxLoadWaitTime = System.getProperty(AJAX_LOAD_TIME_KEY);\n\t\t\n\t\tif (ajaxLoadWaitTime == null || ajaxLoadWaitTime.isEmpty())\n\t\t{ \n\t\t\treturn ajaxWaitDefaultTime;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Integer.parseInt(ajaxLoadWaitTime);\n\t\t}\n\t... | [
"0.7253538",
"0.6735159",
"0.605449",
"0.58379257",
"0.5834442",
"0.581737",
"0.57389253",
"0.5706528",
"0.56806546",
"0.55976605",
"0.55805546",
"0.55750704",
"0.55441725",
"0.55037534",
"0.55004036",
"0.5492705",
"0.5491463",
"0.5485754",
"0.54746234",
"0.5474098",
"0.54680... | 0.8138557 | 0 |
This method retrieves the ajax load wait time from the environment variables. | private static int getAjaxLoadWaitTime()
{
String ajaxLoadWaitTime = System.getProperty(AJAX_LOAD_TIME_KEY);
if (ajaxLoadWaitTime == null || ajaxLoadWaitTime.isEmpty())
{
return ajaxWaitDefaultTime;
}
else
{
return Integer.parseInt(ajaxLoadWaitTime);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int getPageLoadWaitTime()\n\t{\n\t\tString pageLoadWaitTime = System.getProperty(PAGE_LOAD_TIME_KEY);\n\t\t\n\t\tif (pageLoadWaitTime == null || pageLoadWaitTime.isEmpty())\n\t\t{ \n\t\t\treturn pageLoadWaitDefaultTime;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Integer.parseInt(pageLoadWaitTime);\n\t\t}... | [
"0.74760336",
"0.6601703",
"0.59160984",
"0.5773372",
"0.57683426",
"0.5671239",
"0.5624861",
"0.5608215",
"0.5581404",
"0.5529117",
"0.5525875",
"0.55258405",
"0.5523493",
"0.54726917",
"0.54677075",
"0.54315597",
"0.5421348",
"0.5420284",
"0.5390697",
"0.5378907",
"0.537852... | 0.8243671 | 0 |
This method starts the browser. | public static void start(WebDriver driver)
{
/* if (driver == null)
{
driver = launchDriver(driver);
}
*/
driver = launchDriver(driver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void start() {\n final Context appContext = ContextUtils.getApplicationContext();\n tryObtainingDataDirLock(appContext);\n // We must post to the UI thread to cover the case that the user\n // has invoked Chromium startup by using the (thread-safe)\n // CookieManage... | [
"0.73541605",
"0.70811003",
"0.6959069",
"0.6776329",
"0.6700029",
"0.6695005",
"0.6667051",
"0.66329646",
"0.6595267",
"0.65797895",
"0.65103203",
"0.6493794",
"0.64608073",
"0.6419333",
"0.6371302",
"0.6330133",
"0.62616605",
"0.62582797",
"0.6246889",
"0.6225149",
"0.62058... | 0.0 | -1 |
This method open the browser according to specified url. | public static void open(String url,WebDriver driver)
{
driver.navigate().to(url);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }",
"public void openUrlInBrowser(String URL) {}",
"void openUrl (String url);",
"private... | [
"0.81972134",
"0.81708395",
"0.79850614",
"0.78825796",
"0.7785079",
"0.7756284",
"0.7744853",
"0.77025753",
"0.76768744",
"0.76134706",
"0.7563166",
"0.75556755",
"0.7548937",
"0.7498889",
"0.7420364",
"0.7387885",
"0.7374104",
"0.733763",
"0.73352915",
"0.7315533",
"0.72579... | 0.67113936 | 39 |
This method refreshes the browser. | public static void reload(WebDriver driver)
{
driver.navigate().refresh();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void refreshPage() {\n WebDriverManager.getDriver().navigate().refresh();\n waitForPageToLoad();\n }",
"public static void refreshPage() {\n\t\tLOG.info(\"Refreshing current page.\");\n\t\tConstants.driver.navigate().refresh();\n\n\t}",
"public static void Refresh(){\n if(driver!... | [
"0.7747673",
"0.76437575",
"0.7106498",
"0.7098437",
"0.7012046",
"0.6917785",
"0.6824885",
"0.68011683",
"0.68011683",
"0.68011683",
"0.68011683",
"0.68011683",
"0.68011683",
"0.68011683",
"0.6771829",
"0.6739783",
"0.6711516",
"0.668342",
"0.65801215",
"0.6535556",
"0.65246... | 0.6351614 | 35 |
This method navigates the browser back to the previous page. | public static void back(WebDriver driver)
{
driver.navigate().back();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void navigateToBack() {\n WebDriverManager.getDriver().navigate().back();\n }",
"public static void back() {\n driver.navigate().back();\n }",
"public void back() {\n driver.navigate().back();\n }",
"public static void navigateBack() {\n\t\tLOG.info(\"Navigate to back page from... | [
"0.8278459",
"0.8203865",
"0.81508374",
"0.80685985",
"0.79975176",
"0.7857368",
"0.78523546",
"0.7818269",
"0.76107705",
"0.75689006",
"0.7538683",
"0.7442249",
"0.7420076",
"0.73135674",
"0.7283744",
"0.72527033",
"0.72388035",
"0.72285885",
"0.72194767",
"0.7130064",
"0.71... | 0.72509724 | 16 |
This method navigates the browser forward to the next page. | public static void forward(WebDriver driver)
{
driver.navigate().forward();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void forwardPage()\n {\n page++;\n open();\n }",
"public void navigateToForward() {\n WebDriverManager.getDriver().navigate().forward();\n }",
"public void goToNextPage() {\n nextPageButton.click();\n }",
"public static void navigateForward() {\n\t\tLOG.info(\"... | [
"0.7895481",
"0.7812595",
"0.7673134",
"0.7632271",
"0.69960415",
"0.687922",
"0.6877487",
"0.67923635",
"0.6709063",
"0.6646182",
"0.6602393",
"0.6597271",
"0.65914756",
"0.65813833",
"0.65756756",
"0.6539661",
"0.6530862",
"0.6509054",
"0.64693314",
"0.64678204",
"0.6455536... | 0.6815595 | 7 |
This method retrieves the text in the alert. | public static String getAlert(WebDriver driver)
{
return driver.switchTo().alert().getText();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getAlertText() {\n\t\tAlert popUp = null;\n\t\ttry {\n\t\t\tpopUp = getDriver().switchTo().alert();\n\t\t} catch (NoAlertPresentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn popUp.getText().trim();\n\t}",
"public String getAlertText() {\n ... | [
"0.844424",
"0.8372258",
"0.8305796",
"0.82890177",
"0.7796511",
"0.76195145",
"0.76038265",
"0.7221865",
"0.7111625",
"0.69363153",
"0.6914029",
"0.68854296",
"0.6880595",
"0.68800855",
"0.68800855",
"0.68800855",
"0.68800855",
"0.68800855",
"0.68800855",
"0.68800855",
"0.68... | 0.7304703 | 7 |
This method clicks on the OK button of the alert. | public static void clickOkOnAlert(WebDriver driver)
{
driver.switchTo().alert().accept();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}",
"public static void AlertAccept() {\n\t\tAlert alt = Browser.Driver.switchTo().alert();\n\t\talt.accept();\n\t}",
"public static void alertbox_Accept() throws CheetahException {\n\t\ttry {\n\t\t\tSystem.out.println(\"Step i... | [
"0.7792605",
"0.74333847",
"0.7364229",
"0.7324037",
"0.7252805",
"0.7250095",
"0.7185566",
"0.70363796",
"0.6978632",
"0.69551766",
"0.69117624",
"0.6871999",
"0.68686724",
"0.68541896",
"0.6828958",
"0.6808315",
"0.6794179",
"0.67936504",
"0.6778626",
"0.676379",
"0.6758525... | 0.7888372 | 0 |
This method clicks on the Cancel button of the alert. | public static void clickCancelOnAlert(WebDriver driver)
{
driver.switchTo().alert().dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n alertDialog.cancel();\n }",
"public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}",
"public void clickO... | [
"0.8002941",
"0.79038566",
"0.77761483",
"0.7673316",
"0.76485676",
"0.7604511",
"0.7556911",
"0.75351804",
"0.75323105",
"0.7507797",
"0.7507387",
"0.75053245",
"0.7490948",
"0.74901414",
"0.74901414",
"0.74901414",
"0.7488127",
"0.74792653",
"0.7448767",
"0.7444341",
"0.743... | 0.79335815 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.