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 |
|---|---|---|---|---|---|---|
ORADB Procedure AINK_INT_ATU.ATUALIZA_ALTA_OBITO Evento EA = Estorno Alga | public void atualizaAltaObitoEstornoAlta(final AinTiposAltaMedica tipoAltaMedica,
final AipPacientes paciente, String nomeMicrocomputador, final Date dataFimVinculoServidor) throws ApplicationBusinessException {
final String codTipoAltaMedica = tipoAltaMedica == null ? null
: tipoAltaMedica.getCodigo();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getAlertaPorAgendamento(Evento ultimoEvento)\n\t{\n\t\t// Busca o tempo de atraso da ultima execucao com o agendamento especificado\n\t\t// Caso o alarme ainda nao possua eventos registrados entao nao considera este\n\t\t// para o estudo do tempo de atraso\n\t\tDate dtAtual\t\t= Calendar.getInstance... | [
"0.6095909",
"0.59571284",
"0.5898231",
"0.5848757",
"0.5811012",
"0.57740206",
"0.57715714",
"0.57025903",
"0.56860167",
"0.5598379",
"0.5562766",
"0.5557048",
"0.55148983",
"0.5506113",
"0.54919815",
"0.5478327",
"0.5472735",
"0.5443785",
"0.5428088",
"0.5406576",
"0.538545... | 0.0 | -1 |
ORADB Package AINK_INT_ATU.RN_INT_REG_MOV_INT ORADB AINP_INT_REG_MOV_INT A package AINK_INT_ATU.RN_INT_REG_MOV_INT simplesmente chama a procedure AINP_INT_REG_MOV_INT | public RegistrarMovimentoInternacoesVO registrarMovimentoInternacoes(
final Integer seqInternacao, final Integer matriculaServidorDigita,
final Short vinCodigoServidorDigita, final Date dthrInternacao,
final Short numeroQuarto, final Integer matriculaServidorProfessor,
final Short vinCodigoServidorProfe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface iLL11Ll1 {\n C6860liLi OooO00o(C6773llLi v) throws IOException;\n}",
"public interface InstructionCodes {\n\n int NOP = 0;\n int ICONST = 2;\n int FCONST = 3;\n int SCONST = 4;\n int ICONST_0 = 5;\n int ICONST_1 = 6;\n int ICONST_2 = 7;\n int ICONST_3 = 8;\n int ICO... | [
"0.5592035",
"0.54406524",
"0.53741515",
"0.5362635",
"0.534873",
"0.53348213",
"0.5306398",
"0.5294052",
"0.5242556",
"0.520784",
"0.5199304",
"0.51964873",
"0.5184662",
"0.5183407",
"0.51554656",
"0.51539004",
"0.51454204",
"0.5132013",
"0.51239395",
"0.5119346",
"0.5117811... | 0.0 | -1 |
Test of getConnection method, of class TitleDao. | public void testGetConnection() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void getConnectionTest() {\n\t\ttry {\r\n\t\t\tConnection conn=CartDao.getConnection();\r\n\t\t\tif(conn==null) System.out.println(\"disconnect\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Test\n public void ... | [
"0.7476079",
"0.7436974",
"0.7326196",
"0.70572627",
"0.6991622",
"0.69850063",
"0.6829529",
"0.67997825",
"0.6776868",
"0.6747429",
"0.6734217",
"0.67171955",
"0.6651019",
"0.663121",
"0.6442396",
"0.6382522",
"0.6382522",
"0.63650453",
"0.63644814",
"0.63342017",
"0.6311744... | 0.68840295 | 6 |
Test of save method, of class TitleDao. | @Test
public void testSave() throws SQLException{
System.out.println("save");
//when(c.prepareStatement(any(String.class))).thenReturn(stmt);
//mockStatic(DriverManager.class);
//expect(DriverManager.getConnection("jdbc:mysql://10.200.64.182:3306/testdb", "jacplus", "jac567"))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Title t = new Title();\r\n t.setIsbn(\"test\");\r\n t.setTitle(\"aaaaaaaaaaaaaaaaaa\");\r\n t.setAuthor(\"kkkkkkkkkkkkkk\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int r... | [
"0.72887",
"0.71223295",
"0.70689523",
"0.7039345",
"0.70196587",
"0.6913537",
"0.67793316",
"0.67709166",
"0.67344475",
"0.66694474",
"0.66465783",
"0.66397655",
"0.66175497",
"0.6607285",
"0.6589062",
"0.6573164",
"0.6560644",
"0.6535286",
"0.6534797",
"0.6508081",
"0.64910... | 0.74123317 | 0 |
Test of update method, of class TitleDao. | @Test
public void testUpdate() {
System.out.println("update");
Title t = new Title();
t.setIsbn("test");
t.setTitle("aaaaaaaaaaaaaaaaaa");
t.setAuthor("kkkkkkkkkkkkkk");
t.setType("E");
int expResult = 1;
int result = TitleDao.update(t);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void updateSuccess() {\n String newEventName = \"Coffee meeting\";\n Event eventToUpdate = (Event)genericDao.getById(5);\n eventToUpdate.setName(newEventName);\n genericDao.saveOrUpdate(eventToUpdate);\n Event retrievedEvent = (Event)genericDao.getById(5);\n ass... | [
"0.735713",
"0.7335771",
"0.72908616",
"0.72814286",
"0.7280123",
"0.7269688",
"0.7244093",
"0.7241929",
"0.7237074",
"0.72088265",
"0.72004926",
"0.72002506",
"0.7149411",
"0.7145831",
"0.71381736",
"0.71330833",
"0.71164995",
"0.71072453",
"0.71060413",
"0.70673114",
"0.703... | 0.8833994 | 0 |
Test of delete method, of class TitleDao. | @Test
public void testDelete() {
System.out.println("delete");
String isbn = "1222111131";
int expResult = 1;
int result = TitleDao.delete(isbn);
assertEquals(expResult, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }",
"@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }",
"@Test\n void deleteSuccess() {\n dao.delete(... | [
"0.81105965",
"0.808855",
"0.8049701",
"0.7928862",
"0.7922758",
"0.7901943",
"0.7740529",
"0.755442",
"0.7473846",
"0.74298674",
"0.7425112",
"0.7402854",
"0.73656255",
"0.7325901",
"0.7300274",
"0.72875255",
"0.72774494",
"0.72421736",
"0.72217",
"0.7182825",
"0.7174457",
... | 0.8192269 | 0 |
Test of gettitleByIsbn method, of class TitleDao. | @Test
public void testGettitleByIsbn() {
System.out.println("gettitleByIsbn");
String isbn = "ww11221133";
Title expResult = new Title();
expResult.setIsbn("ww11221133");
expResult.setTitle("sssssssddddddddd");
expResult.setAuthor("ssssssdddddddddddd");
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void findByIsbn(String isbn) {\n\t\tResultSet rs;\n\t\ttry (PreparedStatement stmt = LibraryConnection.getConnection()\n\t\t\t\t.prepareStatement(\"SELECT * FROM book WHERE isbn=?\")) {\n\t\t\tstmt.setString(1, isbn);\n\t\t\trs = stmt.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\t//\n\t\t\t}\n\t\t\t// TO... | [
"0.62895757",
"0.62399274",
"0.6227343",
"0.61845577",
"0.6123977",
"0.6123935",
"0.6111183",
"0.60753554",
"0.60587835",
"0.6052554",
"0.6026635",
"0.59461963",
"0.5885216",
"0.58538896",
"0.584611",
"0.58060735",
"0.5805184",
"0.5777074",
"0.5764991",
"0.57188386",
"0.57074... | 0.8826467 | 0 |
Test of getAllEmployees method, of class TitleDao. | public void testGetAllTitles() {
System.out.println("getAllEmployees");
List expResult = null;
List result = TitleDao.getAllTitles();
assertEquals(expResult, result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n public void testGetAllEMployees() throws Exception {\r\n try {\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n List<Employee> result = instance.getAllEMployees();\r\n assertTrue(result != null);\r\n assertTrue(result.size() > 0);\r\n ... | [
"0.7958691",
"0.7547557",
"0.72038066",
"0.69973814",
"0.69509774",
"0.6874223",
"0.68581074",
"0.6831528",
"0.6821113",
"0.6779828",
"0.6768527",
"0.6757027",
"0.67074037",
"0.6705862",
"0.670024",
"0.667703",
"0.66749924",
"0.66665155",
"0.66501224",
"0.66118526",
"0.656395... | 0.82363844 | 0 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);
initializeAll();
return rootView;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.65525705 | 36 |
Reads in a list of Java Classes and reverse engineers their design. | public void main(ArrayList<String> files) throws IOException {
DesignParser.CLASSES = files;
this.model = new Model();
for (String className : CLASSES) {
// System.out.println("====================");
// ASM's ClassReader does the heavy lifting of parsing the compiled
// Java class
// System.out.pri... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String[] readClasses();",
"private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasse... | [
"0.717051",
"0.71188664",
"0.6379817",
"0.6263304",
"0.61672604",
"0.61484355",
"0.59923667",
"0.5899662",
"0.584997",
"0.5812699",
"0.5804499",
"0.57599634",
"0.575182",
"0.5733382",
"0.5729339",
"0.57149094",
"0.571024",
"0.570593",
"0.56849664",
"0.5647138",
"0.5644053",
... | 0.63712454 | 3 |
TODO Autogenerated method stub | public Integer getIntValue() {
return this.intValue;
} | {
"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 |
Created by HKoehler on 2/13/17. | @Repository
public interface UsersRepository extends CrudRepository<User, Integer> {
// select * from user username = ?
public User findByUsername(String username);
public User findById(Integer id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"p... | [
"0.5972761",
"0.59068763",
"0.58479065",
"0.5759101",
"0.5753646",
"0.5742075",
"0.57363266",
"0.5713862",
"0.5713862",
"0.5697412",
"0.5665389",
"0.5655142",
"0.5655142",
"0.5655142",
"0.5655142",
"0.5655142",
"0.5650644",
"0.56291157",
"0.5607128",
"0.5598091",
"0.55821097"... | 0.0 | -1 |
select from user username = ? | public User findByUsername(String username); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"public User queryUserByUsername(String username);",
"@Override\n\tpublic User findUserByUsername... | [
"0.73713624",
"0.7301289",
"0.70930755",
"0.7090895",
"0.7052485",
"0.70115334",
"0.7000895",
"0.6910534",
"0.6854749",
"0.6850894",
"0.68405414",
"0.6834772",
"0.6817636",
"0.6809801",
"0.6807331",
"0.6790366",
"0.6790366",
"0.6787846",
"0.67621464",
"0.6750603",
"0.6731032"... | 0.651427 | 45 |
function to make a connection to database | private static void connectDatabase(){
// register the driver
try{
Class.forName(DRIVER).newInstance();
connection = DriverManager.getConnection(CONNECTION_URL);
} catch (IllegalAccessException | InstantiationException | ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD... | [
"0.7747933",
"0.772792",
"0.76631194",
"0.7641637",
"0.75979364",
"0.7594369",
"0.757883",
"0.7507183",
"0.748824",
"0.74809736",
"0.743954",
"0.7432107",
"0.74296606",
"0.74265444",
"0.7421608",
"0.74198824",
"0.74104494",
"0.73669726",
"0.7345161",
"0.73434806",
"0.7335565"... | 0.7505686 | 8 |
execute query to get RESULTSET (For Select statement) | public static ResultSet executeSelectQuery(String query){
Statement statement = null;
ResultSet resultSet = null;
CachedRowSetImpl cachedRowSet = null;
try{
connectDatabase();
statement = connection.createStatement();
resultSet = statement.executeQuery(query);
cachedRowSet = new CachedRowSetImpl(); ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Statement queryToRetrieveData();",
"private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}",
"ResultSet runSQL(String query) ... | [
"0.68805134",
"0.68429685",
"0.6753886",
"0.67522484",
"0.67100817",
"0.66441137",
"0.66373473",
"0.6598374",
"0.6542881",
"0.65116155",
"0.65116155",
"0.6511462",
"0.65107214",
"0.65107214",
"0.6491245",
"0.6481365",
"0.6467095",
"0.64463156",
"0.6426228",
"0.63956064",
"0.6... | 0.6078054 | 40 |
used to execute query (drop statement) | public static int executeQuery(String query, String parameter){
PreparedStatement statement = null;
int result =0;
try{
connectDatabase(); // connect to database
statement = connection.prepareStatement(query);
statement.setString(1,parameter);
result = statement.executeUpdate();
} catch (SQLExceptio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String execute() throws SQLException {\n\t\t/*conn = DataBase.getConnection();\n\t\tst = conn.createStatement();\n\t\tString sql=\"drop table user\";\n\t\tst.execute(sql);*/\n\t\treturn \"SUCCESS\";\n\n\t}",
"public void dropDB() throws SQLException {\n\t \t\tStatement stmt = cnx.createStatement();\n\t \t... | [
"0.7590281",
"0.7261244",
"0.7231258",
"0.7165107",
"0.7064796",
"0.7030054",
"0.6973041",
"0.6810375",
"0.66671795",
"0.6647401",
"0.6627237",
"0.66151655",
"0.6612467",
"0.6599543",
"0.6534839",
"0.65342516",
"0.6481481",
"0.6480745",
"0.6468919",
"0.6467899",
"0.64587396",... | 0.0 | -1 |
used to execute prepared statement (Insert statements) | public static int executePreparedStatement(String query, User user){
PreparedStatement statement = null;
try{
connectDatabase();
statement = connection.prepareStatement(query);
// set the parameters
statement.setString(1,user.getUuid().toString());
statement.setString(2,user.getName());
statement.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void prepare(PreparedStatement statement) {\n }",
"public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\... | [
"0.70985365",
"0.6936304",
"0.68744075",
"0.6756609",
"0.67483175",
"0.67205614",
"0.6707839",
"0.6701498",
"0.6699772",
"0.6694249",
"0.6633648",
"0.6621757",
"0.6429219",
"0.64127713",
"0.64038247",
"0.63844436",
"0.6382411",
"0.63668793",
"0.6328903",
"0.63236105",
"0.6302... | 0.0 | -1 |
used to execute prepared statement (Insert statements) | public static int executePreparedStatement(String query, Fee fee){
System.out.println(query);
PreparedStatement statement = null;
try{
connectDatabase();
statement = connection.prepareStatement(query);
// set the parameters
statement.setString(1,fee.getUuid().toString());
statement.setString(2,fee.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void prepare(PreparedStatement statement) {\n }",
"public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\... | [
"0.70985365",
"0.6936304",
"0.68744075",
"0.6756609",
"0.67483175",
"0.67205614",
"0.6707839",
"0.6701498",
"0.6699772",
"0.6694249",
"0.6633648",
"0.6621757",
"0.6429219",
"0.64127713",
"0.64038247",
"0.63844436",
"0.6382411",
"0.63668793",
"0.6328903",
"0.63236105",
"0.6302... | 0.0 | -1 |
used to execute prepared statement (Insert statements) | public static int executePreparedStatement(String query, Student student){
PreparedStatement statement = null;
try{
connectDatabase();
statement = connection.prepareStatement(query);
// set the parameters
statement.setString(1,student.getUuid().toString());
statement.setString(2,student.getName());
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void prepare(PreparedStatement statement) {\n }",
"public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\... | [
"0.70985365",
"0.6936304",
"0.68744075",
"0.6756609",
"0.67483175",
"0.67205614",
"0.6707839",
"0.6701498",
"0.6699772",
"0.6694249",
"0.6633648",
"0.6621757",
"0.6429219",
"0.64127713",
"0.64038247",
"0.63844436",
"0.6382411",
"0.63668793",
"0.6328903",
"0.63236105",
"0.6302... | 0.0 | -1 |
create table if doesn't exists | public static int createTable(String query,String tableName){
DatabaseMetaData databaseMetaData ;
ResultSet resultSet = null;
Statement statement = null;
int result = 0;
try{
connectDatabase();
databaseMetaData = connection.getMetaData();
// find if any table with same name exists
resultSet = data... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createTableIfNotExists() {\n SQLiteDatabase db = this.getWritableDatabase();\n\n db.execSQL(\"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME + \" (\"\n + _id + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + smilePercentage + \" INTEGER NOT NULL, \"\n ... | [
"0.74073094",
"0.729245",
"0.7289896",
"0.7191344",
"0.71258307",
"0.71064",
"0.7082085",
"0.7051151",
"0.701551",
"0.70130306",
"0.7008877",
"0.6963152",
"0.694406",
"0.6900065",
"0.6897009",
"0.6879395",
"0.68699056",
"0.6858299",
"0.6843846",
"0.68017614",
"0.6801164",
"... | 0.0 | -1 |
drop the table from database | public static boolean dropTable(String tableName){
String query = "drop table "+tableName;
Statement statement = null;
boolean result = false;
try{
connectDatabase();
System.out.println("Query: "+query);
statement = connection.createStatement();
result = statement.execute(query);
} catch (SQLExcep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void dropTable();",
"@Override\r\n public void dropTable() {\n if(tableIsExist(TABLE_NAME)){\r\n String sql = \"drop table \" + TABLE_NAME;\r\n database.execSQL(sql);\r\n }\r\n }",
"public void dropTable() {\n }",
"public void doDropTable();",
"public voi... | [
"0.8266843",
"0.81444675",
"0.7793651",
"0.7770651",
"0.7769884",
"0.7751074",
"0.7746234",
"0.7688741",
"0.76444757",
"0.7599999",
"0.75737655",
"0.7557478",
"0.7511712",
"0.7404756",
"0.74030125",
"0.73906916",
"0.7347507",
"0.7332235",
"0.7324074",
"0.72802824",
"0.7262295... | 0.0 | -1 |
disconnect driver from database | private static void disconnectDatabase(){
try{
if (connection != null) connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void disconnect() {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // close connection and statement, shutdown driver\n try {\n statement.close();\n connection.close();\n DriverM... | [
"0.7890126",
"0.75321496",
"0.74755454",
"0.7256365",
"0.7211845",
"0.7160182",
"0.7126746",
"0.7094679",
"0.7072543",
"0.7046826",
"0.7030023",
"0.6993305",
"0.693733",
"0.69131285",
"0.6846578",
"0.680377",
"0.6796509",
"0.6795464",
"0.6791471",
"0.67883176",
"0.67873394",
... | 0.76589215 | 1 |
/ access modifiers changed from: protected / JADX WARNING: Removed duplicated region for block: B:11:0x002f | public C0308c.a a() {
Account account;
O o;
Set set;
C0308c.a aVar = new C0308c.a();
O o2 = this.f4537c;
if (o2 instanceof b) {
GoogleSignInAccount b2 = ((b) o2).b();
if (b2 != null) {
account = b2.f();
aVar.a(accoun... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }",
"public void mo115190b() {\n }",
"public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }",
"publ... | [
"0.69935524",
"0.6712143",
"0.6643254",
"0.66423047",
"0.6561024",
"0.6539829",
"0.6478152",
"0.646296",
"0.6433761",
"0.6433744",
"0.64267766",
"0.64097655",
"0.6386395",
"0.637205",
"0.63563186",
"0.63302755",
"0.6328473",
"0.6312858",
"0.63104147",
"0.6302255",
"0.63012326... | 0.0 | -1 |
The constructor is private, do it doesn't get instantiated. All the methods then are static. | private DTOFactory() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private CommonMethods() {\n }",
"private Util() { }",
"priva... | [
"0.7809122",
"0.7769044",
"0.76757354",
"0.76757354",
"0.76335883",
"0.7625371",
"0.7597698",
"0.7597698",
"0.7597698",
"0.7597698",
"0.7551976",
"0.7512903",
"0.7507407",
"0.7455245",
"0.7455245",
"0.7427752",
"0.74238545",
"0.74181676",
"0.7417695",
"0.73813045",
"0.7380845... | 0.0 | -1 |
Get's an entity bean of the user, using the username, and then creates a DTO with that data. It is not setting permissions or menu | public static UserDTOEx getUserDTO(String username, Integer entityId)
throws NamingException, SessionInternalError {
LOG.debug("getting the user " + username);
UserDTO user = new UserDAS().findByUserName(username, entityId);
if (user == null)
return null;
return getUserDTOEx(user);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"UserDTO getUserByUsername(String username);",
"UserDTO getUserByUsername(String username);",
"UserDTO findUserByUsername(String username);",
"private UserDTO getUserDTO(String username) {\n\t\tUserDTO userDTO = userRepository.getUserDTO(username);\n\t\tuserDTO.setUserTournaments(userRepository.getUserTournam... | [
"0.7562058",
"0.7562058",
"0.7085537",
"0.70807046",
"0.7032341",
"0.6971654",
"0.69699395",
"0.69328856",
"0.67583853",
"0.6681315",
"0.6626831",
"0.6411995",
"0.6410008",
"0.63822794",
"0.6381838",
"0.6324199",
"0.6305948",
"0.6294975",
"0.6269029",
"0.62528306",
"0.6238669... | 0.74683255 | 2 |
/ int width, height; width = Par.SCREEN_SIZE.width / 4; height = Par.SCREEN_SIZE.height / 4; setPreferredSize ( new Dimension(width,height) ); setSize ( width, height ); | protected void createDialogSize ()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Dimension getPreferredSize(){\n return new Dimension(400,350);\n }",
"@Override\n\tpublic Dimension getPreferredSize(){\n\t\treturn new Dimension(640, 480);\n\t}",
"private void basicSize(){\n setSize(375,400);\n }",
"public void settings() { size(1200, 800); }",
"public void initSize() {... | [
"0.74481833",
"0.7359949",
"0.72864044",
"0.7280318",
"0.72567385",
"0.72201943",
"0.71786416",
"0.71669674",
"0.7104578",
"0.70931536",
"0.708876",
"0.70247126",
"0.6984826",
"0.6980318",
"0.69658655",
"0.6957214",
"0.69370365",
"0.6914641",
"0.688324",
"0.6870994",
"0.68392... | 0.0 | -1 |
Checks if the star can be plotted. | public boolean isEnabled ( ) {
return enabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean validStars (float stars) {\n if (stars >= 0 && stars <= 5) return true;\n else return false;\n }",
"protected boolean canPaintGraph() {\r\n\t\treturn pv.canPaintGraph;\r\n\t}",
"@Override\r\n public boolean isKnown ()\r\n {\r\n Shape shape = getShape();\r\n\r\n ... | [
"0.6765907",
"0.6662946",
"0.6074313",
"0.60323447",
"0.6015488",
"0.5998622",
"0.5971572",
"0.5948651",
"0.5869527",
"0.5864418",
"0.58575076",
"0.5835988",
"0.5835988",
"0.57954484",
"0.5763899",
"0.5759213",
"0.5716498",
"0.56914586",
"0.56803316",
"0.56513643",
"0.5648784... | 0.0 | -1 |
Enables to plot the stars. | public void enable ( ) {
enabled = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setStars(float stars) {\n this.stars = stars;\n }",
"public void drawStars()\r\n\t{\r\n\t\tIterator<Star> iterator = stars.iterator();\r\n\t\twhile (iterator.hasNext())\r\n\t\t{\r\n\t\t\tStar s = iterator.next();\r\n\t\t\tstarCircles.add(drawStar(s.x, s.y));\r\n\t\t}\r\n\t}",
"public void... | [
"0.66454107",
"0.65850407",
"0.6428928",
"0.6164384",
"0.59801847",
"0.5962801",
"0.5839372",
"0.5834246",
"0.5825541",
"0.563972",
"0.5621661",
"0.5619157",
"0.56110585",
"0.56090254",
"0.55966747",
"0.5546106",
"0.5492338",
"0.54776806",
"0.54734963",
"0.5420202",
"0.541754... | 0.0 | -1 |
Disables to plot the stars. | public void disable ( ) {
enabled = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void disable(){\n\n bar.setVisible(false);\n bar.removeAll();\n\n }",
"private void hideTemporaryUntilFixed() {\n //\n// jButton8.setVisible(false);// Add cursors button (cursors for the graph to the right)\n// jButton9.setVisible(false);// Remove cursors button (curs... | [
"0.6309069",
"0.6185533",
"0.6058149",
"0.5939736",
"0.5889677",
"0.58614874",
"0.5824387",
"0.5820836",
"0.5789314",
"0.5774945",
"0.5772302",
"0.57669103",
"0.57619387",
"0.5759812",
"0.5757593",
"0.57338786",
"0.56898254",
"0.5638707",
"0.56267536",
"0.5611074",
"0.5579755... | 0.0 | -1 |
Sets to use the color that the star object represents. | public void useStarObjectColor ( ) {
color = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setColor(Color c) { color.set(c); }",
"public void setColor(Color color);",
"void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }",
"public void setColor(Color c);",
"public void setColor()\n {\n if(wall != null) // only if it's... | [
"0.6898835",
"0.6775982",
"0.6751404",
"0.6750604",
"0.67319393",
"0.6709971",
"0.66826427",
"0.6625477",
"0.6625477",
"0.6608175",
"0.66028655",
"0.6586461",
"0.655638",
"0.6554524",
"0.6523099",
"0.6455661",
"0.6452633",
"0.64224696",
"0.6416998",
"0.6410908",
"0.6395355",
... | 0.7546169 | 0 |
Returns true if the mark is filled. | public boolean isFilled ( ) {
return fill_flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isFilled() {\n return filled;\n }",
"public boolean isFilled() \n\t{\n\t\treturn filled;\n\t}",
"public boolean isFilled() {\r\n return this.filled;\r\n }",
"public boolean isFull() {\n\t\treturn markCount == 9;\n\t}",
"public boolean isFilled() {\n return isFilled;\n ... | [
"0.80041957",
"0.795755",
"0.78584427",
"0.77816004",
"0.75466406",
"0.7371811",
"0.724256",
"0.7234566",
"0.7078599",
"0.7056007",
"0.69921553",
"0.6979539",
"0.6944259",
"0.6887575",
"0.6882802",
"0.6872512",
"0.6870068",
"0.68626124",
"0.6790912",
"0.66717815",
"0.6622283"... | 0.7975884 | 1 |
Sets a flag to fill the mark or not. | public void setFilled ( boolean flag ) {
fill_flag = flag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mark()\n {\n mark = true;\n }",
"public void setFill(boolean fill) {\n isFilled = fill;\n }",
"void setFill(boolean fill);",
"public void clearMark()\n {\n mark = false;\n }",
"public void setFill(boolean b){\n\t\tthis.fill = b;\n\t}",
"public void changeMa... | [
"0.7448248",
"0.7255389",
"0.7247532",
"0.7178418",
"0.7143567",
"0.71021676",
"0.7005439",
"0.6662825",
"0.6662825",
"0.6646045",
"0.65748614",
"0.6547489",
"0.65203726",
"0.64580065",
"0.64568317",
"0.6433382",
"0.63869214",
"0.63634306",
"0.636279",
"0.6358053",
"0.6356156... | 0.78823113 | 0 |
Gets the line width. | public int getLineWidth ( ) {
return line_width;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLineWidth() {\r\n return LineWidth;\r\n }",
"@Override\n public double getLineWidth() {\n return graphicsEnvironmentImpl.getLineWidth(canvas);\n }",
"public int getLineWidth() {\n return (int) mPaintLine.getStrokeWidth();\n }",
"public double getLineWidt... | [
"0.83673346",
"0.7936005",
"0.7932134",
"0.7753947",
"0.7744655",
"0.7263074",
"0.7087408",
"0.7070384",
"0.7056463",
"0.69946784",
"0.69907504",
"0.6931779",
"0.6921621",
"0.6908347",
"0.6904924",
"0.69014823",
"0.69014823",
"0.69014823",
"0.6893129",
"0.6872104",
"0.6872104... | 0.85272497 | 0 |
Sets the line width. | public void setLineWidth ( int width ) {
line_width = width;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLineWidth(int width)\n {\n if (width > 0)\n lineWidth = width;\n else \n lineWidth = 1;\n }",
"public void setLineWidth(int width) {\n mPaintLine.setStrokeWidth(width);\n }",
"@Override\n public void setLineWidth(double width) {\n graphicsEnvironmentImpl.set... | [
"0.79114836",
"0.78693867",
"0.772497",
"0.760093",
"0.7570479",
"0.75673556",
"0.7366579",
"0.7168795",
"0.7130512",
"0.70584863",
"0.6853711",
"0.68410736",
"0.6725997",
"0.66606456",
"0.6649177",
"0.66216123",
"0.6615755",
"0.6615755",
"0.66092527",
"0.66034913",
"0.651836... | 0.85604143 | 0 |
Gets the fixed radius. | public int getFixedRadius ( ) {
return plot_radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getRadius();",
"double getRadius();",
"public double getRadius() { return radius.get(); }",
"private double getRadius() {\n\t\treturn Math.min(getWidth(), getHeight()) / 2.0 * RADIUS_MODIFIER;\n\t}",
"public float getRadius() {\r\n\t\treturn Float.parseFloat(getProperty(\"radius\").toString());\r\n\t}... | [
"0.7694284",
"0.7672368",
"0.7616352",
"0.75060385",
"0.75044143",
"0.74919033",
"0.7488225",
"0.7480117",
"0.7480117",
"0.74720204",
"0.74508345",
"0.7435205",
"0.73931044",
"0.73924136",
"0.7351457",
"0.73336333",
"0.73322177",
"0.73294127",
"0.7328784",
"0.7321757",
"0.731... | 0.83203727 | 0 |
Gets the magnitude system definition. | public MagnitudeSystem getMagnitudeSystem ( ) {
return system;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getMagnitude()\n {\n return magnitude;\n }",
"public float getMagnitude() {\n\t\treturn Float.parseFloat(getProperty(\"magnitude\").toString());\n\t}",
"public float getMagnitude() {\r\n\t\treturn Float.parseFloat(getProperty(\"magnitude\").toString());\r\n\t}",
"public int getMagni... | [
"0.7183847",
"0.71772623",
"0.71406555",
"0.7123308",
"0.7079373",
"0.6766411",
"0.66086715",
"0.66076404",
"0.6559412",
"0.6552777",
"0.65515864",
"0.65144265",
"0.6509235",
"0.6493585",
"0.6430523",
"0.6359505",
"0.6339287",
"0.6305858",
"0.6273273",
"0.6247367",
"0.618378"... | 0.8154146 | 0 |
Sets the magnitude system definition. | public void setMagnitudeSystem ( MagnitudeSystem system ) {
this.system = system;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMagnitude(int magnitude)\r\n {\r\n this.magnitude = magnitude; \r\n }",
"public void setMagnitude()\n {\n magnitude = (float) Math.sqrt(Math.pow(fx, 2) + Math.pow(fy, 2) + Math.pow(fz, 2));\n }",
"public void setMinMagnitude(double magnitude);",
"public Magni... | [
"0.7598669",
"0.7512084",
"0.68439704",
"0.63164145",
"0.59205467",
"0.59145623",
"0.5885285",
"0.58361965",
"0.57727075",
"0.56041163",
"0.55960995",
"0.5590291",
"0.5577305",
"0.5527886",
"0.55103415",
"0.547429",
"0.5394423",
"0.53195906",
"0.5286913",
"0.52327055",
"0.520... | 0.7818497 | 0 |
Gets the converted magnitude of the specified star. | public double getMagnitude ( Star star ) {
try {
if (star instanceof CatalogStar)
return ((CatalogStar)star).getMagnitude(getMagnitudeSystem());
} catch ( UnsupportedMagnitudeSystemException exception ) {
System.err.println(exception);
}
return star.getMag();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getMagnitude();",
"public double mag() {\n return Math.sqrt(mag2());\n }",
"public T magnitude();",
"public float getMagnitude() {\n return (float) Math.sqrt(Math.pow(latComponent, 2) + Math.pow(longComponent, 2));\n }",
"public T magnitudeSquared();",
"public float getMagnitude... | [
"0.6535321",
"0.6525331",
"0.6344047",
"0.632845",
"0.63201135",
"0.6262595",
"0.6235676",
"0.6177206",
"0.61729664",
"0.6171875",
"0.61214375",
"0.60850304",
"0.6032597",
"0.6020505",
"0.59906715",
"0.59635174",
"0.58974296",
"0.58233464",
"0.58226687",
"0.58101815",
"0.5796... | 0.8270364 | 0 |
Gets the radius depending on the specified magnitude. | public int getRadius ( double mag ) {
if (radius_mag_dependent) {
int radius = (int)(plot_ratio * ( limiting_mag - mag )) + 1;
if (radius < plot_radius)
radius = plot_radius;
return radius;
}
return plot_radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private double magnitudeToRadius(double mag) {\n\t\tif (mag > 6.0) {\n\t\t\treturn 0.25;\n\t\t} else if (mag > 5.0) {\n\t\t\treturn 0.3;\n\t\t} else if (mag > 4.0) {\n\t\t\treturn 0.4;\n\t\t} else if (mag > 3.0) {\n\t\t\treturn 0.55;\n\t\t} else if (mag > 2.0) {\n\t\t\treturn 0.7;\n\t\t} else if (mag > 1.0) {\n\t\... | [
"0.7544503",
"0.6494054",
"0.6462735",
"0.6358883",
"0.6332302",
"0.62956923",
"0.62946343",
"0.62791634",
"0.62791634",
"0.6278867",
"0.6275028",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.62684065",
"0.... | 0.7483337 | 1 |
Returns true if the size is not determined depending on the magnitude | public boolean isSizeFixed ( ) {
return (radius_mag_dependent == false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"boolean hasSize();",
"public boolean isNormalSize() {\n\t\treturn isLenWithin(5, 10);\n\t}",
"boolean hasTotalSize();",
"public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }",
"public boolean hasSi... | [
"0.73291117",
"0.73291117",
"0.73291117",
"0.73291117",
"0.713433",
"0.6928643",
"0.68819404",
"0.68819404",
"0.6770972",
"0.6721159",
"0.6705043",
"0.6705043",
"0.66079754",
"0.6468529",
"0.6447802",
"0.64386904",
"0.6432052",
"0.63764787",
"0.6368178",
"0.6336659",
"0.63295... | 0.7088361 | 5 |
Sets the fixed radius. | public void setFixedRadius ( int radius ) {
radius_mag_dependent = false;
plot_radius = radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRadius(double value) {\n radius = value;\n }",
"public void setRadius(int radius);",
"public void setRadius(double r) { radius.set(clamp(r, RADIUS_MIN, RADIUS_MAX)); }",
"private void setRadius(float radius) {\n\t\tthis.radius = radius;\n\t}",
"public void setRadius( double r ) \r\n ... | [
"0.76306677",
"0.7602088",
"0.75282055",
"0.7462314",
"0.74302125",
"0.7429882",
"0.7224388",
"0.71815646",
"0.71672934",
"0.7144026",
"0.7138204",
"0.71297634",
"0.71288675",
"0.7127707",
"0.71019363",
"0.70753294",
"0.70521396",
"0.70105815",
"0.69788355",
"0.69788355",
"0.... | 0.8149603 | 0 |
Sets the parameters to calculate a radius of circle to plot. | public void setDependentSizeParameters ( double new_ratio, double new_mag, int new_radius ) {
radius_mag_dependent = true;
plot_ratio = new_ratio;
limiting_mag = new_mag;
plot_radius = new_radius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRadius(int radius);",
"public void setRadius(double radius) {\r\n this.radius = radius;\r\n }",
"public void setRadius(double radius){\n this.radius = radius;\n }",
"public void setRadius(double radius) {\n this.radius = radius;\n }",
"public void se... | [
"0.7439322",
"0.7345272",
"0.7334862",
"0.7277085",
"0.72558755",
"0.72442913",
"0.7237125",
"0.7181075",
"0.71719235",
"0.71666324",
"0.7152259",
"0.71512896",
"0.71475065",
"0.7132395",
"0.7108317",
"0.709715",
"0.7066573",
"0.70425826",
"0.70425826",
"0.6963371",
"0.691857... | 0.0 | -1 |
Gets the limiting magnitude. | public double getLimitingMag ( ) {
return limiting_mag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getProperLimitingMag ( ) {\r\n\t\tif (getLimitingMag() != null)\r\n\t\t\treturn (double)getLimitingMag().floatValue();\r\n\r\n\t\treturn 0.0;\r\n\t}",
"public float getMagnitude()\n {\n return magnitude;\n }",
"public int getMagnitude()\r\n {\r\n return magnitude;\r\n }"... | [
"0.72261953",
"0.71564543",
"0.71431893",
"0.71261233",
"0.7117312",
"0.7094194",
"0.7036706",
"0.69579375",
"0.68915045",
"0.67705697",
"0.67491835",
"0.6729165",
"0.67183644",
"0.6597136",
"0.65679604",
"0.6525539",
"0.6478896",
"0.6469145",
"0.6460016",
"0.6433634",
"0.640... | 0.8073561 | 0 |
Sets the limiting magnitude. | public void setLimitingMag ( double limiting_mag ) {
this.limiting_mag = limiting_mag;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMinMagnitude(double magnitude);",
"public void setMagnitude(int magnitude)\r\n {\r\n this.magnitude = magnitude; \r\n }",
"public void setMagnitude()\n {\n magnitude = (float) Math.sqrt(Math.pow(fx, 2) + Math.pow(fy, 2) + Math.pow(fz, 2));\n }",
"public void ... | [
"0.7474387",
"0.740088",
"0.7023371",
"0.6998664",
"0.6936793",
"0.6690582",
"0.66403526",
"0.65857387",
"0.6495811",
"0.6362383",
"0.6287631",
"0.6268846",
"0.61568815",
"0.6144486",
"0.61310065",
"0.612518",
"0.6123912",
"0.6104787",
"0.61019427",
"0.60950845",
"0.6066512",... | 0.7880068 | 0 |
Plots a star at the specified position. | public void plot ( Graphics g, int x, int y, StarPosition star ) {
Color c = color;
if (c == null && star != null) {
if (star instanceof Star)
c = ((Star)star).getColor();
}
if (c == null)
c = Color.black;
g.setColor(c);
int radius = 0;
if (star instanceof Star) {
radius = getR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void star(float x, float y, float r, float R) {\n float angle = TWO_PI / 5;\n float halfAngle = angle/2.0f;\n beginShape();\n noStroke();\n for (float a = 0; a < TWO_PI; a += angle) {\n float sx = x + cos(a) * r;\n float sy = y + sin(a) * r;\n vertex(sx, sy);\n sx ... | [
"0.61464",
"0.6008863",
"0.57080907",
"0.55894375",
"0.5492942",
"0.54388183",
"0.54086095",
"0.5382871",
"0.5265921",
"0.5202161",
"0.51962805",
"0.519377",
"0.51804215",
"0.5159814",
"0.511345",
"0.509733",
"0.50583655",
"0.5036592",
"0.50362337",
"0.5009006",
"0.49733454",... | 0.64304304 | 0 |
Handle error in case fetch news fail | @Override
public void fetchNewsFail() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onError() {\n Log.e(TAG, \"Error loading news detail\");\n }",
"@Override\n\tpublic void onNewsReceiveError() {\n\t\tsetProgressBarIndeterminateVisibility(false);\n\t\t// reset fetcher task\n\t\tmFetcherTask = null;\n\t}",
"@Override\n public void onFailure(Call<... | [
"0.7238255",
"0.70413846",
"0.6781311",
"0.6762284",
"0.64967227",
"0.6388663",
"0.6077693",
"0.594039",
"0.59369856",
"0.58929366",
"0.5862558",
"0.5834391",
"0.5811814",
"0.58015287",
"0.57507807",
"0.5747379",
"0.57207173",
"0.57136685",
"0.57051164",
"0.57000065",
"0.5696... | 0.8263774 | 0 |
used to decrement process while in processor | public void timeToRunDec()
{
this.time_to_run -- ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void decrement() {\n --processCount_;\n if (processCount_ == 0) {\n process_.setReady();\n }\n }",
"public void decrement() {\n sync.decrement();\n }",
"public void decrementWorkload() {\n workload--;\n }",
"void decrementTick();",
"public void crunch(){\n ... | [
"0.796949",
"0.6966138",
"0.68856907",
"0.6589896",
"0.65081096",
"0.65020645",
"0.64932775",
"0.64815646",
"0.64711297",
"0.64711297",
"0.6450854",
"0.6355011",
"0.63470966",
"0.6316227",
"0.6314457",
"0.62808883",
"0.62427545",
"0.6233989",
"0.6196397",
"0.61931765",
"0.616... | 0.5959179 | 44 |
Erabiltzaileak bi pasahitzak berdinak direla interfazeak kontrolatzen du, beraz bi pasaitzak berdinak direla suposatuko da. | @Test
public void testGehituErabiltzaile() {
ErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();
ErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile("Martin", "123456","123456");
assertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());
ErabiltzaileLista.getEra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"protected void FileTartKiir()\r\n {\n String sSzoveg = null ;\r\n \r\n sSzoveg = m_cHRMFile.GetDatum() + \"\\n\" ;\r\n sSzoveg = sSzoveg + m_cHRMFile.GetMegjegyzes() + \"\\n\" ;\r\n \r\n sSzoveg = sSzoveg + IKonstansok.s... | [
"0.6295181",
"0.60574293",
"0.6026799",
"0.60226756",
"0.5996278",
"0.5932742",
"0.59060043",
"0.5889869",
"0.58844703",
"0.5880096",
"0.58444256",
"0.5835606",
"0.58347446",
"0.5831567",
"0.5827497",
"0.5788849",
"0.578021",
"0.5776963",
"0.577255",
"0.5761321",
"0.5745709",... | 0.57311076 | 25 |
Erabiltzailerik ez badago ondo gorde eta kargatu egiten da. | @Test
public void testKargatuGorde() throws IOException {
ErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();
assertEquals(0, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());
ErabiltzaileLista.getErabiltzaileLista().gorde();
ErabiltzaileLista.getErabiltzaileLista().erreseteatuE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setT... | [
"0.6773143",
"0.6669334",
"0.6444828",
"0.64350396",
"0.6412121",
"0.63847697",
"0.6347505",
"0.6324359",
"0.6289984",
"0.62837994",
"0.6239029",
"0.62381583",
"0.6208349",
"0.61961174",
"0.61856025",
"0.6154876",
"0.6147282",
"0.6146048",
"0.6119517",
"0.61132663",
"0.610800... | 0.0 | -1 |
Tests that things are destroyed in opposite order from where they began | @Test
public void testDestructionOrder() {
ServiceHandle<Foo> fooHandle = locator.getServiceHandle(Foo.class);
Assert.assertNotNull(fooHandle);
Foo foo = fooHandle.getService();
Assert.assertNotNull(foo);
// Kill them all! Mwmuaaaaaa
fooHandle.destr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void removeDestroyedObjects ()\n {\n Collection<Asteroid> newAsteroids = new ArrayList<>(this.game.getAsteroids().size() * 2); // Avoid reallocation and assume every asteroid spawns successors.\n this.game.getAsteroids().forEach(asteroid -> {\n if (asteroid.isDestroyed()) {\n ... | [
"0.6239134",
"0.6177749",
"0.6048758",
"0.5991657",
"0.5976565",
"0.59759814",
"0.59759814",
"0.5905338",
"0.5886777",
"0.5805801",
"0.5800001",
"0.5783058",
"0.5778807",
"0.57428473",
"0.5718837",
"0.5702418",
"0.5690618",
"0.5688384",
"0.5682747",
"0.56822807",
"0.5668618",... | 0.66476905 | 0 |
Tests the destroy on a perlookup factory produced object is called | @Test
public void testFactoryCreatedServiceDestruction() {
ServiceHandle<Widget> widgetHandle = locator.getServiceHandle(Widget.class);
Assert.assertNotNull(widgetHandle);
Widget widget = widgetHandle.getService();
Assert.assertNotNull(widget);
widgetHandle.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testUserDestructionOfFactory() {\n ServiceHandle<SprocketFactory> sprocketFactoryHandle1 = locator.getServiceHandle(SprocketFactory.class);\n Assert.assertNotNull(sprocketFactoryHandle1);\n \n SprocketFactory sprocketFactory1 = sprocketFactoryHandle1.getService();... | [
"0.7226893",
"0.7072904",
"0.7072904",
"0.6945815",
"0.69288605",
"0.6927559",
"0.6927559",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0.69153404",
"0... | 0.69421655 | 4 |
Tests a real destruction of a singleton factory but ensure it still works (with a different factory) after the explicit user destruction | @Test
public void testUserDestructionOfFactory() {
ServiceHandle<SprocketFactory> sprocketFactoryHandle1 = locator.getServiceHandle(SprocketFactory.class);
Assert.assertNotNull(sprocketFactoryHandle1);
SprocketFactory sprocketFactory1 = sprocketFactoryHandle1.getService();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testFactoryCreatedServiceDestruction() {\n ServiceHandle<Widget> widgetHandle = locator.getServiceHandle(Widget.class);\n Assert.assertNotNull(widgetHandle);\n \n Widget widget = widgetHandle.getService();\n Assert.assertNotNull(widget);\n \n ... | [
"0.75173354",
"0.6496477",
"0.64824134",
"0.64639044",
"0.6250735",
"0.6221397",
"0.6197674",
"0.6148154",
"0.6121599",
"0.6093939",
"0.6011432",
"0.5919851",
"0.5884146",
"0.57985216",
"0.57527167",
"0.57346684",
"0.57275903",
"0.57237494",
"0.5720956",
"0.56894654",
"0.5676... | 0.78576434 | 0 |
Another way to declare instance mainActivity = Robolectric.buildActivity(MainActivity.class).create().start().resume().get(); | @Before
public void setUp() throws Exception {
mainActivity = Robolectric.setupActivity(MainActivity.class);
addItemActivity = Robolectric.setupActivity(AddItemActivity.class);
addToDBActivity = Robolectric.setupActivity(AddToDBActivity.class);
listActivity = Robolectric.setupActivit... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Before\n public void setup() {\n activity = Robolectric.setupActivity(MainActivity.class);\n }",
"@Before\n public void setUp() throws Exception {\n context = InstrumentationRegistry.getContext();\n mainActivity = (MainActivity) context;\n }",
"@Test\n public void openMainA... | [
"0.8212573",
"0.7223777",
"0.69679785",
"0.68858206",
"0.67633665",
"0.67587453",
"0.65708995",
"0.6523891",
"0.6354256",
"0.62921894",
"0.62287104",
"0.6228396",
"0.62067974",
"0.6201966",
"0.6201966",
"0.6200787",
"0.6197259",
"0.6138147",
"0.6121681",
"0.61143464",
"0.6102... | 0.7182773 | 2 |
Check all required activities exist | @Test
public void testInitAllActivity() throws Exception {
assertNotNull(mainActivity);
assertNotNull(addItemActivity);
assertNotNull(addToDBActivity);
assertNotNull(listActivity);
assertNotNull(listItemActivity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isActivityExist(long activityId);",
"private boolean checkPermissions(Activity activity) {\n String[] permissions = getRequiredAndroidPermissions();\n return handler.areAllPermissionsGranted(activity, permissions);\n }",
"public boolean hasAll(Intent intent, String... extras) {\n ... | [
"0.59483457",
"0.59138864",
"0.5650618",
"0.5558191",
"0.55475134",
"0.5483297",
"0.54538953",
"0.5433342",
"0.535607",
"0.53269476",
"0.5316203",
"0.53156215",
"0.52948725",
"0.5261678",
"0.5259151",
"0.52584565",
"0.5256528",
"0.5255436",
"0.5237159",
"0.5227525",
"0.522477... | 0.64344734 | 0 |
Check all required elements exist in MainActivity | @Test
public void lookUpMainActivity(){
ListView lv = (ListView) mainActivity.findViewById(R.id.listView);
EditText et = (EditText) mainActivity.findViewById(R.id.newListEditText);
Button addNewList = (Button) mainActivity.findViewById(R.id.addNewListButton);
assertNotNull("ListView... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void checkElements() {\n mActivityTestRule.launchActivity(intentForWeb()); // launch the activity with the intent\n\n onWebView().check(webContent(hasElementWithId(\"email_input\")));\n onWebView().check(webContent(hasElementWithId(\"password_input\")));\n onWebView().... | [
"0.72395474",
"0.64284766",
"0.6405973",
"0.63673323",
"0.63492054",
"0.62980145",
"0.6283195",
"0.6277817",
"0.62371016",
"0.6127241",
"0.60643744",
"0.6050116",
"0.60184085",
"0.60140145",
"0.5983982",
"0.5926597",
"0.5865847",
"0.58522016",
"0.576381",
"0.5744844",
"0.5738... | 0.6176804 | 9 |
Check all required elements exist in ListActivity | @Test
public void lookUpListActivity(){
ListView lv = (ListView) listActivity.findViewById(R.id.listView);
Button addItem = (Button) listActivity.findViewById(R.id.addItemButton);
Button uncheckItem = (Button) listActivity.findViewById(R.id.uncheckItemsButton);
assertNotNull("ListVi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void myMeetingList_ShouldNotBeEmpty() {\n onView(withId(R.id.recyclerview)).check(matches(hasMinimumChildCount(1)));\n }",
"private Boolean checkForEmptyList() {\n Boolean emptyListAvailable = tin_perLitrePrice.getText().toString().trim().isEmpty() ||\n tin_fuelQ... | [
"0.63671625",
"0.63547134",
"0.6321257",
"0.6162915",
"0.61426294",
"0.611939",
"0.60129946",
"0.6006651",
"0.5977286",
"0.59702426",
"0.5945233",
"0.5886987",
"0.58483094",
"0.58463866",
"0.5842401",
"0.58258694",
"0.582314",
"0.58199364",
"0.5812682",
"0.5782786",
"0.577792... | 0.6530608 | 0 |
Check all required elements exist in ListItemActivity | @Test
public void lookUpListItemActivity(){
TextView tv = (TextView) listItemActivity.findViewById(R.id.textView4);
Spinner spinner = (Spinner) listItemActivity.findViewById(R.id.itemTypeSpinner);
ListView lv = (ListView) listItemActivity.findViewById(R.id.itemListView);
EditText et ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void checkItemsAvailability() {\n if (noItemsText != null && itemList != null && itemRecyclerView != null) {\n if (itemList.size() < 1) {\n itemRecyclerView.setVisibility(View.GONE);\n noItemsText.setVisibility(View.VISIBLE);\n } else {\n ... | [
"0.66765696",
"0.63296676",
"0.6269475",
"0.62560135",
"0.61447704",
"0.60377765",
"0.60167813",
"0.6007237",
"0.5990335",
"0.5967624",
"0.59375715",
"0.58786607",
"0.5871641",
"0.5857121",
"0.58334666",
"0.58094144",
"0.5788761",
"0.57885593",
"0.57731926",
"0.5771989",
"0.5... | 0.63295203 | 2 |
Check all required elements exist in AddToDBActivity | @Test
public void lookUpAddToDBActivity(){
TextView itemType = (TextView) addToDBActivity.findViewById(R.id.textView);
TextView itemName = (TextView) addToDBActivity.findViewById(R.id.textView2);
TextView itemUnit = (TextView) addToDBActivity.findViewById(R.id.textView3);
TextView se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean checkforCreating(Object element) {\n\t\tif (element == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (element instanceof Entity) {\n\t\t\tEntity entity = (Entity) element;\n\t\t\tObject entitryValue = entity.getValue(\"autocreate\");\n\t\t\tif (entitryValue != null && entitryValue instanceof Boolean)... | [
"0.58607143",
"0.57775474",
"0.5754373",
"0.5720668",
"0.5704387",
"0.56712323",
"0.565714",
"0.56377316",
"0.562514",
"0.5619591",
"0.55981994",
"0.55755305",
"0.5568827",
"0.55658484",
"0.55292547",
"0.55273473",
"0.55206305",
"0.5508233",
"0.5506915",
"0.55001456",
"0.5435... | 0.5165997 | 53 |
Check all required elements exist in AddItemActivity | @Test
public void lookUpAddItemActivity(){
TextView addItemToList = (TextView) addItemActivity.findViewById(R.id.textView5);
EditText itemName = (EditText) addItemActivity.findViewById(R.id.itemNameEditText);
EditText itemType = (EditText) addItemActivity.findViewById(R.id.itemTypeEditText);... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void checkRepeatablefields() {\n\t\ttry {\n\t\t\tif (AndroidLocators.xpath(\"//*[@class='android.widget.LinearLayout']/android.widget.Button[@text='ADD']\")\n\t\t\t\t\t.isDisplayed()) {\n\t\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='ADD']\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(... | [
"0.6657677",
"0.6180489",
"0.6156637",
"0.61130285",
"0.6050403",
"0.60446256",
"0.60407597",
"0.6037281",
"0.59542096",
"0.5920496",
"0.58742416",
"0.5869524",
"0.5820646",
"0.5800392",
"0.5795443",
"0.5757251",
"0.5737537",
"0.57292235",
"0.57073134",
"0.57000524",
"0.56845... | 0.61054456 | 4 |
Created by DELL on 21092018. | public interface GameObject {
public void draw(Canvas canvas);
public void update();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }... | [
"0.5859994",
"0.57860607",
"0.57412374",
"0.56413263",
"0.5631004",
"0.5580155",
"0.5547613",
"0.55244017",
"0.55244017",
"0.5490843",
"0.54545176",
"0.54364157",
"0.54341745",
"0.5430539",
"0.5419113",
"0.541696",
"0.5415467",
"0.5414667",
"0.5414667",
"0.5414667",
"0.541466... | 0.0 | -1 |
Checks if the app has permission to write to device storage If the app does not has permission then the user will be prompted to grant permissions | public static void verifyStoragePermissions(Activity activity) {
// Check if we have write permission
int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permission != PackageManager.PERMISSION_GRANTED) {
// We don't have pe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is... | [
"0.8097663",
"0.78686756",
"0.7785815",
"0.7749146",
"0.75859135",
"0.75059026",
"0.7503026",
"0.747842",
"0.7466319",
"0.7440092",
"0.74310154",
"0.7410359",
"0.7323657",
"0.73232085",
"0.7311546",
"0.7242026",
"0.72263616",
"0.72082335",
"0.7178857",
"0.7167418",
"0.7164691... | 0.6788066 | 60 |
testNoTimestamp should parse 1 poorly formed vcard and not crash. | @Test
public void testNoTimestamp() throws IOException {
InputStream fileStream;
fileStream = mTestResources.openRawResource(
com.android.bluetooth.tests.R.raw.no_timestamp_call_log);
BluetoothPbapVcardList pbapVCardList = new BluetoothPbapVcardList(mAccount, fileStream,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }",
... | [
"0.70359004",
"0.6287448",
"0.62373066",
"0.6227229",
"0.6143322",
"0.6007169",
"0.59525734",
"0.59191716",
"0.59077305",
"0.590747",
"0.572363",
"0.5637619",
"0.5636034",
"0.5622603",
"0.56028914",
"0.55845356",
"0.5579158",
"0.556591",
"0.55631787",
"0.5549407",
"0.5538276"... | 0.62626815 | 2 |
testMissedCall should parse one phonecall correctly. | @Test
public void testMissedCall() throws IOException {
InputStream fileStream;
fileStream = mTestResources.openRawResource(
com.android.bluetooth.tests.R.raw.single_missed_call);
BluetoothPbapVcardList pbapVCardList = new BluetoothPbapVcardList(mAccount, fileStream,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void invalidCaleeNumber(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"ABCD\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }",
"@Test\n public void initiallyAllPhoneCallsHaveTheSameCallee() {\n PhoneCall call =... | [
"0.6978409",
"0.6588169",
"0.65777475",
"0.64908504",
"0.6091406",
"0.60909325",
"0.6077294",
"0.5980793",
"0.59537107",
"0.5900797",
"0.56577843",
"0.5643008",
"0.5635208",
"0.5605885",
"0.5579819",
"0.55772316",
"0.55506885",
"0.55289555",
"0.5433565",
"0.5414125",
"0.54082... | 0.6680683 | 1 |
testUnknownCall should parse two calls with no phone number. | @Test
public void testUnknownCall() throws IOException {
InputStream fileStream;
fileStream = mTestResources.openRawResource(
com.android.bluetooth.tests.R.raw.unknown_number_call);
BluetoothPbapVcardList pbapVCardList = new BluetoothPbapVcardList(mAccount, fileStream,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void invalidCaleeNumber(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"ABCD\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }",
"@Test\n public void invalidCallerNumber(){\n PhoneCall call = new PhoneCall(\"ABCD... | [
"0.69046247",
"0.6684245",
"0.6433246",
"0.6228207",
"0.5925494",
"0.5729493",
"0.5728536",
"0.5667589",
"0.5555113",
"0.55352205",
"0.5457192",
"0.5456662",
"0.5418571",
"0.53066",
"0.52841157",
"0.5251588",
"0.5245675",
"0.5202118",
"0.51858383",
"0.5174708",
"0.51737696",
... | 0.6828368 | 1 |
Find Entries in call log with type matching number and date. If number or date is null it will match any number or date respectively. | private boolean verifyCallLog(String number, String date, String type) {
String[] query = new String[]{Calls.NUMBER, Calls.DATE, Calls.TYPE};
Cursor cursor = mTargetContext.getContentResolver()
.query(Calls.CONTENT_URI, query, Calls.TYPE + "= " + type, null,
Calls... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List findRecordsFrom(String informationType, Date date) throws DatabaseException;",
"public CallLog findCallLogFromCallId(String callId);",
"private ArrayList<CallLogsData> getCallLogEntry() {\n ArrayList<CallLogsData> calllogsList = new ArrayList<CallLogsData>();\n try {\n File... | [
"0.58799046",
"0.5497713",
"0.52275294",
"0.51424545",
"0.51267874",
"0.48181388",
"0.4753321",
"0.47140512",
"0.47063622",
"0.46276075",
"0.45892686",
"0.4579865",
"0.45306274",
"0.4515415",
"0.45088693",
"0.44835022",
"0.44608998",
"0.4432655",
"0.4420194",
"0.441578",
"0.4... | 0.6832618 | 0 |
Get time zone from device and adjust date to the device's time zone. | private static String adjDate(String date) {
TimeZone tz = TimeZone.getDefault();
long dt = Long.valueOf(date) - tz.getRawOffset();
return Long.toString(dt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getTimeZone();",
"public TimeZone getTimeZone() { return this.timeZone; }",
"public TimeZone getTimeZone(){\r\n return TimeZone.getDefault();\r\n }",
"public TimeZone getTimeZone()\n {\n return timeZone;\n }",
"private String getTimeZone(TimeZone standardTimeZone, Date date... | [
"0.6194893",
"0.6164745",
"0.61509275",
"0.6136602",
"0.60537636",
"0.6034165",
"0.60268474",
"0.59869635",
"0.59866303",
"0.59297955",
"0.5906373",
"0.5898949",
"0.5896141",
"0.58753467",
"0.586514",
"0.58217907",
"0.5818689",
"0.5818689",
"0.5797594",
"0.57658917",
"0.57501... | 0.0 | -1 |
System.out.println("Agente microred entrando al comportamiento revisar sistema"); | @Override
protected void onTick() {
leerFromMatlab();
if ((voltajeMR > 120 * 1.1 && voltajeMR < 120 * 0.9) || (frecuenciaMR > 60 * 1.1 && frecuenciaMR < 60 * 0.9)) {
alarmaMR = true;
System.out.println("Alarma de condiciones no deseadas de microred encendi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }",
"public static void saludo(){\n System.out.println(\"Bienvenido al Sistema\");\n }",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}"... | [
"0.7050005",
"0.6939074",
"0.67512834",
"0.67223614",
"0.66239804",
"0.6622863",
"0.6589292",
"0.65400386",
"0.6537732",
"0.6528383",
"0.65277",
"0.6527067",
"0.65231735",
"0.6504406",
"0.64960283",
"0.64936286",
"0.6443448",
"0.64330035",
"0.6428175",
"0.64263695",
"0.636946... | 0.0 | -1 |
Check if the current thread holds the DPMS lock, and if not, do a WTF. (Doing this check too much may be costly, so don't call it in a hot path.) | final void ensureLocked() {
if (Thread.holdsLock(mLockDoNoUseDirectly)) {
return;
}
Slogf.wtfStack(LOG_TAG, "Not holding DPMS lock.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void wtfIfInLock() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n Slogf.wtfStack(LOG_TAG, \"Shouldn't be called with DPMS lock held\");\n }\n }",
"@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean tryLock() {\n\t\treturn fals... | [
"0.7945637",
"0.66476",
"0.66476",
"0.63614774",
"0.62939763",
"0.62431854",
"0.6207696",
"0.6186089",
"0.61487836",
"0.61103237",
"0.6090285",
"0.60219425",
"0.598861",
"0.598861",
"0.5971418",
"0.5934179",
"0.59153414",
"0.590948",
"0.5906947",
"0.58998173",
"0.58784777",
... | 0.77702445 | 1 |
Calls wtfStack() if called with the DPMS lock held. | private void wtfIfInLock() {
if (Thread.holdsLock(mLockDoNoUseDirectly)) {
Slogf.wtfStack(LOG_TAG, "Shouldn't be called with DPMS lock held");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void check() {\n if (stack == null) {\n stack = Thread.currentThread().getStackTrace();\n } else {\n IllegalStateException ex =\n new IllegalStateException(\"This is the stack of the previous call\");\n ex.setStackTrace(stack);\n throw ex;\n }\n }",
... | [
"0.6391784",
"0.62633306",
"0.61991596",
"0.58856833",
"0.58530575",
"0.57495344",
"0.5692859",
"0.56389546",
"0.56195724",
"0.56195724",
"0.56195724",
"0.56073266",
"0.5585479",
"0.5574241",
"0.547557",
"0.5444011",
"0.54311514",
"0.5420782",
"0.5410771",
"0.54000944",
"0.53... | 0.6176418 | 3 |
If personal apps were suspended by the admin, suspend the newly installed one. | private void handleNewPackageInstalled(String packageName, int userHandle) {
if (!getUserData(userHandle).mAppsSuspended) {
return;
}
final String[] packagesToSuspend = { packageName };
// Check if package is considered not suspendable?
if (mInjector.getPackageManager... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void suspend() {\n\t\tisSuspended = true;\n\t\tSystem.out.println(\"Suspend account successfully.\");\n\t}",
"private boolean updatePersonalAppsSuspension(int profileUserId, boolean unlocked) {\n final boolean shouldSuspend;\n synchronized (getLockObject()) {\n final ActiveAdmin profileO... | [
"0.69016206",
"0.64634687",
"0.63127255",
"0.6142409",
"0.600616",
"0.5975678",
"0.59638274",
"0.5895815",
"0.58788306",
"0.5873148",
"0.5823802",
"0.57872486",
"0.572235",
"0.5696731",
"0.56942624",
"0.5689541",
"0.5667979",
"0.56465846",
"0.56400716",
"0.56115544",
"0.55438... | 0.6207909 | 3 |
Invalidate the binder API caches. The invalidation itself does not require any locking, but this specific call should be protected by getLockObject() to ensure that the invalidation is synchronous with cached queries, for those queries that are served under getLockObject(). | static void invalidateBinderCaches() {
DevicePolicyManager.invalidateBinderCaches();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}",
"private void invalidateCache() {\n\t}",
"void invalidateCache();",
"@Override\n\tpublic void invalidateCache() {\n\t\t\n\t}",
"@RequiresLock(\"S... | [
"0.6729815",
"0.64169633",
"0.6305107",
"0.6251224",
"0.60728997",
"0.60025585",
"0.5954818",
"0.58832985",
"0.58403754",
"0.5838096",
"0.5815746",
"0.5761845",
"0.56944007",
"0.56822616",
"0.568118",
"0.5627804",
"0.5610845",
"0.557265",
"0.5567981",
"0.5563959",
"0.55514175... | 0.70506096 | 0 |
Creates and loads the policy data from xml. | @NonNull
DevicePolicyData getUserData(int userHandle) {
synchronized (getLockObject()) {
DevicePolicyData policy = mUserData.get(userHandle);
if (policy == null) {
policy = new DevicePolicyData(userHandle);
mUserData.append(userHandle, policy);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }",
"private void readPolicyAssertions(List<Object> policyAssertions, PolicyComponent policyComponent, ProcessorContext context){\n if (policyComponent.get... | [
"0.6054908",
"0.52119315",
"0.5181396",
"0.5129455",
"0.5103556",
"0.5060322",
"0.5026836",
"0.4974246",
"0.49678156",
"0.49240372",
"0.4847408",
"0.48230404",
"0.48203042",
"0.481691",
"0.4801602",
"0.47948366",
"0.47823647",
"0.47514835",
"0.47380456",
"0.47179154",
"0.4680... | 0.0 | -1 |
Load information about device and profile owners of the device, populating mOwners and pushing owner info to other system services. This is called at a fairly early stage of system server initialiation (via DevicePolicyManagerService's ctor), so care should to be taken to not interact with system services that are init... | void loadOwners() {
synchronized (getLockObject()) {
mOwners.load();
setDeviceOwnershipSystemPropertyLocked();
if (mOwners.hasDeviceOwner()) {
setGlobalSettingDeviceOwnerType(
mOwners.getDeviceOwnerType(mOwners.getDeviceOwnerPackageName... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GuardedBy(\"getLockObject()\")\n private void applyProfileRestrictionsIfDeviceOwnerLocked() {\n final int doUserId = mOwners.getDeviceOwnerUserId();\n if (doUserId == UserHandle.USER_NULL) {\n if (VERBOSE_LOG) Slogf.d(LOG_TAG, \"No DO found, skipping application of restriction.\");\n ... | [
"0.62174475",
"0.57815945",
"0.55236953",
"0.53205097",
"0.5297575",
"0.5190671",
"0.5087754",
"0.49839273",
"0.49209607",
"0.49172407",
"0.48724374",
"0.48709545",
"0.4822829",
"0.47693563",
"0.47667423",
"0.4746899",
"0.4730726",
"0.47206154",
"0.4707176",
"0.46875033",
"0.... | 0.79119885 | 0 |
Checks if the device is in COMP mode, and if so migrates it to managed profile on a corporate owned device. | @GuardedBy("getLockObject()")
private void migrateToProfileOnOrganizationOwnedDeviceIfCompLocked() {
if (VERBOSE_LOG) Slogf.d(LOG_TAG, "Checking whether we need to migrate COMP ");
final int doUserId = mOwners.getDeviceOwnerUserId();
if (doUserId == UserHandle.USER_NULL) {
if (VE... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isOrganizationOwnedDeviceWithManagedProfile() {\n if (!mHasFeature) {\n return false;\n }\n return getOrganizationOwnedProfileUserId() != UserHandle.USER_NULL;\n }",
"private OwnedState calculateIsRunningOnManagedProfile(Context context) {\n ... | [
"0.60791737",
"0.530532",
"0.515935",
"0.50624114",
"0.50426966",
"0.50376105",
"0.48821503",
"0.4818353",
"0.4800873",
"0.47876415",
"0.4754082",
"0.4613527",
"0.45954865",
"0.45941058",
"0.4555259",
"0.45312622",
"0.452288",
"0.45082378",
"0.45073694",
"0.44935375",
"0.4475... | 0.757913 | 0 |
The following policies can be already controlled via parent instance, skip if so. | @GuardedBy("getLockObject()")
private void moveDoPoliciesToProfileParentAdminLocked(
ActiveAdmin doAdmin, ActiveAdmin parentAdmin) {
if (parentAdmin.mPasswordPolicy.quality == PASSWORD_QUALITY_UNSPECIFIED) {
parentAdmin.mPasswordPolicy = doAdmin.mPasswordPolicy;
}
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addPolicy(Policy policy) throws APIManagementException {\n\n if (policy instanceof APIPolicy) {\n APIPolicy apiPolicy = (APIPolicy) policy;\n //Check if there's a policy exists before adding the new policy\n Policy existingPolicy = getAPIPolicy(userNameWithoutCha... | [
"0.61780685",
"0.60265005",
"0.5761445",
"0.57088166",
"0.5578462",
"0.556815",
"0.5565554",
"0.5518347",
"0.5494827",
"0.5487851",
"0.548674",
"0.54243815",
"0.5400439",
"0.539985",
"0.5397048",
"0.53702873",
"0.5357237",
"0.5353913",
"0.53491855",
"0.53479016",
"0.5303019",... | 0.58924204 | 2 |
If the device is in Device Owner mode, apply the restriction on adding a managed profile. | @GuardedBy("getLockObject()")
private void applyProfileRestrictionsIfDeviceOwnerLocked() {
final int doUserId = mOwners.getDeviceOwnerUserId();
if (doUserId == UserHandle.USER_NULL) {
if (VERBOSE_LOG) Slogf.d(LOG_TAG, "No DO found, skipping application of restriction.");
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isOrganizationOwnedDeviceWithManagedProfile() {\n if (!mHasFeature) {\n return false;\n }\n return getOrganizationOwnedProfileUserId() != UserHandle.USER_NULL;\n }",
"@objid (\"6680b948-597e-4df9-b9a2-de8dc499acb3\")\n void setOwnerProfile(Profi... | [
"0.637551",
"0.6227578",
"0.6213518",
"0.6167164",
"0.6130399",
"0.60967046",
"0.59793496",
"0.5819342",
"0.56504405",
"0.56017643",
"0.55505776",
"0.54657865",
"0.54417634",
"0.5407356",
"0.53259426",
"0.5257031",
"0.52469087",
"0.5230075",
"0.5215341",
"0.520931",
"0.519729... | 0.79575855 | 0 |
Apply default restrictions that haven't been applied to profile owners yet. | private void maybeSetDefaultProfileOwnerUserRestrictions() {
synchronized (getLockObject()) {
for (final int userId : mOwners.getProfileOwnerKeys()) {
final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userId);
// The following restrictions used to be applied... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GuardedBy(\"getLockObject()\")\n private void applyProfileRestrictionsIfDeviceOwnerLocked() {\n final int doUserId = mOwners.getDeviceOwnerUserId();\n if (doUserId == UserHandle.USER_NULL) {\n if (VERBOSE_LOG) Slogf.d(LOG_TAG, \"No DO found, skipping application of restriction.\");\n ... | [
"0.7066457",
"0.6044068",
"0.59811205",
"0.59700024",
"0.57108355",
"0.55431414",
"0.5511218",
"0.5399377",
"0.5295403",
"0.5282397",
"0.52480674",
"0.5214006",
"0.5126595",
"0.5052156",
"0.5050899",
"0.4992863",
"0.49853674",
"0.4969909",
"0.48495734",
"0.4843664",
"0.483858... | 0.819948 | 0 |
Apply default restrictions that haven't been applied to a given admin yet. | private void maybeSetDefaultRestrictionsForAdminLocked(
int userId, ActiveAdmin admin, Set<String> defaultRestrictions) {
if (defaultRestrictions.equals(admin.defaultEnabledRestrictionsAlreadySet)) {
return; // The same set of default restrictions has been already applied.
}
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void maybeSetDefaultProfileOwnerUserRestrictions() {\n synchronized (getLockObject()) {\n for (final int userId : mOwners.getProfileOwnerKeys()) {\n final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userId);\n // The following restrictions used to b... | [
"0.59422845",
"0.5865228",
"0.57258546",
"0.5578644",
"0.5406486",
"0.52587783",
"0.5195283",
"0.5183611",
"0.51688975",
"0.5133775",
"0.5120989",
"0.51124877",
"0.509588",
"0.50868315",
"0.5079259",
"0.5064428",
"0.5061511",
"0.50610864",
"0.5044632",
"0.50434893",
"0.503211... | 0.73142606 | 0 |
Fix leftover restrictions and autotime policy during COMP > COPE migration. When a COMP device with requireAutoTime policy set was migrated to an organizationowned profile, a DISALLOW_CONFIG_DATE_TIME restriction is set on user 0 from the DO user, which becomes unremovable by the organizationowned profile owner. Fix th... | private void fixupAutoTimeRestrictionDuringOrganizationOwnedDeviceMigration() {
for (UserInfo ui : mUserManager.getUsers()) {
final int userId = ui.id;
if (isProfileOwnerOfOrganizationOwnedDevice(userId)) {
final ActiveAdmin parent = getProfileOwnerAdminLocked(userId).par... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setAutoTimeRequired(ComponentName who, boolean required) {\n if (!mHasFeature) {\n return;\n }\n Objects.requireNonNull(who, \"ComponentName is null\");\n final CallerIdentity caller = getCallerIdentity(who);\n\n boolean requireAutoTimeChange... | [
"0.58669776",
"0.5811851",
"0.5503726",
"0.54551387",
"0.51331747",
"0.50301766",
"0.48473594",
"0.48285818",
"0.468155",
"0.46675447",
"0.46660355",
"0.4651763",
"0.46109352",
"0.46015325",
"0.45875072",
"0.4585651",
"0.4581817",
"0.45621657",
"0.45581907",
"0.45377532",
"0.... | 0.8126803 | 0 |
Set an alarm for an upcoming event expiration warning, expiration, or postexpiration reminders. Clears alarm if no expirations are configured. | private void setExpirationAlarmCheckLocked(Context context, int userHandle, boolean parent) {
final long expiration = getPasswordExpirationLocked(null, userHandle, parent);
final long now = System.currentTimeMillis();
final long timeToExpire = expiration - now;
final long alarmTime;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTestAlarm() \n {\n \t// start with now\n java.util.Calendar c = java.util.Calendar.getInstance();\n c.setTimeInMillis(System.currentTimeMillis());\n\n int nowHour = c.get(java.util.Calendar.HOUR_OF_DAY);\n int nowMinute = c.get(java.util.Calendar.MINUTE);\n\n int mi... | [
"0.6501922",
"0.63954747",
"0.6345694",
"0.63292897",
"0.6172082",
"0.6159196",
"0.6154708",
"0.61110914",
"0.6074349",
"0.60547817",
"0.60010886",
"0.59970754",
"0.5823266",
"0.5809345",
"0.5782889",
"0.57553196",
"0.57458097",
"0.5671013",
"0.5645764",
"0.5640894",
"0.56368... | 0.6111425 | 7 |
Find the admin for the component and userId bit of the uid, then check the admin's uid matches the uid. | private ActiveAdmin getActiveAdminForUidLocked(ComponentName who, int uid) {
ensureLocked();
final int userId = UserHandle.getUserId(uid);
final DevicePolicyData policy = getUserData(userId);
ActiveAdmin admin = policy.mAdminMap.get(who);
if (admin == null) {
throw ne... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isGroupAdmin(int userId){\n return userId == groupAdmin;\n }",
"public boolean isUserAdmin(int userId){\n if (getAdminUserFromId(userId)!=null){\n return true;\n }\n else{\n return false;\n }\n }",
"public AdminUser getAdminUserFromI... | [
"0.5926892",
"0.5867603",
"0.5766109",
"0.5702224",
"0.55920994",
"0.5569734",
"0.5541723",
"0.5487627",
"0.5474564",
"0.54588425",
"0.530981",
"0.5298733",
"0.52859426",
"0.52811295",
"0.52732116",
"0.52613795",
"0.52613795",
"0.5197199",
"0.5169832",
"0.5153793",
"0.5152015... | 0.63984215 | 0 |
Send an update to one specific admin, get notified when that admin returns a result. | boolean sendAdminCommandLocked(ActiveAdmin admin, String action, Bundle adminExtras,
BroadcastReceiver result, boolean inForeground) {
Intent intent = new Intent(action);
intent.setComponent(admin.info.getComponent());
if (UserManager.isDeviceInDemoMode(mContext)) {
inten... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean updateAdminInfo(Admin admin) {\n\t\tint i = adminDao.updateAdminInfo(admin);\r\n\t\treturn i > 0?true:false;\r\n\t}",
"public boolean update(Admin admin) {\n\t\treturn adminDao.update(admin);\n\t}",
"public void updateAdmin(Admin admin) {\n\t\tadminDao.updateAdmin(admin);\r\n\t\t\... | [
"0.6819163",
"0.67209405",
"0.6718682",
"0.66892624",
"0.6588156",
"0.6550314",
"0.65185505",
"0.6457585",
"0.643505",
"0.64231443",
"0.6062549",
"0.6046647",
"0.58600736",
"0.585058",
"0.5819886",
"0.5777013",
"0.5772122",
"0.5730071",
"0.57108146",
"0.5695507",
"0.5685871",... | 0.53191376 | 61 |
Send an update to all admins of a user that enforce a specified policy. | void sendAdminCommandLocked(String action, int reqPolicy, int userHandle, Bundle adminExtras) {
final DevicePolicyData policy = getUserData(userHandle);
final int count = policy.mAdminList.size();
for (int i = 0; i < count; i++) {
final ActiveAdmin admin = policy.mAdminList.get(i);
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void notifyAdmins(){\n \tfor(PlayerHandler player : players){\n \t\tif(player.isAdmin()){\n \t\t\tplayer.notify(1);\n \t\t}\n \t}\n }",
"private void sendAdminCommandToSelfAndProfilesLocked(String action, int reqPolicy,\n int userHandle, Bundle adminExtras) {\n int[] pr... | [
"0.6220538",
"0.6199017",
"0.61685205",
"0.5667491",
"0.56644404",
"0.55927926",
"0.5564459",
"0.5559358",
"0.552879",
"0.5392525",
"0.5392027",
"0.5392027",
"0.537095",
"0.5332302",
"0.53128767",
"0.5292996",
"0.5268022",
"0.52539665",
"0.5206474",
"0.51976043",
"0.5190875",... | 0.65206516 | 0 |
Send an update intent to all admins of a user and its profiles. Only send to admins that enforce a specified policy. | private void sendAdminCommandToSelfAndProfilesLocked(String action, int reqPolicy,
int userHandle, Bundle adminExtras) {
int[] profileIds = mUserManager.getProfileIdsWithDisabled(userHandle);
for (int profileId : profileIds) {
sendAdminCommandLocked(action, reqPolicy, profileId, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sendAdminCommandLocked(String action, int reqPolicy, int userHandle, Bundle adminExtras) {\n final DevicePolicyData policy = getUserData(userHandle);\n final int count = policy.mAdminList.size();\n for (int i = 0; i < count; i++) {\n final ActiveAdmin admin = policy.mAdminList.... | [
"0.6225696",
"0.60088587",
"0.5960985",
"0.5885123",
"0.56998765",
"0.56216764",
"0.5535979",
"0.5499308",
"0.53328943",
"0.5282243",
"0.52747685",
"0.52248436",
"0.5192815",
"0.5167302",
"0.5153968",
"0.5141983",
"0.51304585",
"0.51236844",
"0.51162857",
"0.50915754",
"0.508... | 0.6480224 | 0 |
Sends a broadcast to each profile that share the password unlock with the given user id. | private void sendAdminCommandForLockscreenPoliciesLocked(
String action, int reqPolicy, int userHandle) {
final Bundle extras = new Bundle();
extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(userHandle));
if (isSeparateProfileChallengeEnabled(userHandle)) {
sendAdmin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sendUserSwitchBroadcasts(int oldUserId, int newUserId) {\n int i = oldUserId;\n int i2 = newUserId;\n long ident = Binder.clearCallingIdentity();\n if (i >= 0) {\n try {\n List<UserInfo> profiles = this.mInjector.getUserManager().getProfiles(i, fals... | [
"0.63937587",
"0.57499474",
"0.56292427",
"0.54360646",
"0.53817767",
"0.53570235",
"0.5341136",
"0.53282565",
"0.52826065",
"0.5258035",
"0.51716286",
"0.51713485",
"0.5163226",
"0.51584953",
"0.5123443",
"0.51114297",
"0.50816697",
"0.5077842",
"0.50613207",
"0.50576425",
"... | 0.0 | -1 |
ManagedProvisioning/DPC sets DISALLOW_ADD_USER. Clear to recover to the original state | private void clearDeviceOwnerUserRestriction(UserHandle userHandle) {
if (mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, userHandle)) {
mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER, false, userHandle);
}
// When a device owner is set, the system autom... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void addPrivilegedUser(ActionEvent actionEvent) {\n if (addUserMenu.getSelectionModel().getSelectedItem() != null) {\n for (User user : server.getUser()) {\n if (user.getName().equals(addUserMenu.getSelectionModel().getSelectedItem())) {\n selectedAddUser... | [
"0.5460776",
"0.54388666",
"0.5397026",
"0.539012",
"0.5268401",
"0.5164107",
"0.5148915",
"0.51084256",
"0.50714207",
"0.5051265",
"0.5028247",
"0.50153023",
"0.4994522",
"0.49731898",
"0.49672627",
"0.49672627",
"0.495816",
"0.4904756",
"0.4904172",
"0.48938498",
"0.4886433... | 0.5635054 | 0 |
For admins targeting R+ reset various password constraints to default values when quality is set to a value that makes those constraints that have no effect. | private void resetInactivePasswordRequirementsIfRPlus(int userId, ActiveAdmin admin) {
if (passwordQualityInvocationOrderCheckEnabled(admin.info.getPackageName(), userId)) {
final PasswordPolicy policy = admin.mPasswordPolicy;
if (policy.quality < PASSWORD_QUALITY_NUMERIC) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tprotected void performDefaults() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\tspiLength.setSelection(preferenceStore.getDefaultInt(DEFAULT_PASSWORD_LENGTH));\n\t\tbtnUseLowercase.setSelection(preferenceStore.getDefaultBoolean(USE_LOWERCA... | [
"0.6005981",
"0.57895285",
"0.57589734",
"0.56013334",
"0.55651075",
"0.5376818",
"0.5299592",
"0.5287649",
"0.52600485",
"0.5257807",
"0.5254162",
"0.52318937",
"0.5211894",
"0.520101",
"0.5196412",
"0.5189272",
"0.5173509",
"0.5140387",
"0.512439",
"0.5106596",
"0.5099628",... | 0.643963 | 0 |
Update password quality values in policy cache for all users in the same user group as the given user. The cached password quality for user X is the aggregated quality among all admins who have influence of user X's screenlock, i.e. it's equivalent to the return value of getPasswordQuality(null, user X, false). Caches ... | private void updatePasswordQualityCacheForUserGroup(@UserIdInt int userId) {
final List<UserInfo> users;
if (userId == UserHandle.USER_ALL) {
users = mUserManager.getUsers();
} else {
users = mUserManager.getProfiles(userId);
}
for (UserInfo userInfo : use... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void resetInactivePasswordRequirementsIfRPlus(int userId, ActiveAdmin admin) {\n if (passwordQualityInvocationOrderCheckEnabled(admin.info.getPackageName(), userId)) {\n final PasswordPolicy policy = admin.mPasswordPolicy;\n if (policy.quality < PASSWORD_QUALITY_NUMERIC) {\n ... | [
"0.5579981",
"0.55369395",
"0.5066438",
"0.5020351",
"0.5018411",
"0.48973787",
"0.48424232",
"0.4782885",
"0.47342587",
"0.47088036",
"0.47088036",
"0.4654165",
"0.46262458",
"0.4569204",
"0.45536023",
"0.454464",
"0.45374715",
"0.4524763",
"0.4518527",
"0.44719547",
"0.4464... | 0.76834774 | 0 |
Get the list of active admins for an affected user: The active admins associated with the userHandle itself The parent active admins for each managed profile associated with the userHandle | @GuardedBy("getLockObject()")
private List<ActiveAdmin> getActiveAdminsForAffectedUserLocked(int userHandle) {
if (isManagedProfile(userHandle)) {
return getUserDataUnchecked(userHandle).mAdminList;
}
return getActiveAdminsForUserAndItsManagedProfilesLocked(userHandle,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GuardedBy(\"getLockObject()\")\n private List<ActiveAdmin> getActiveAdminsForUserAndItsManagedProfilesLocked(int userHandle,\n Predicate<UserInfo> shouldIncludeProfileAdmins) {\n ArrayList<ActiveAdmin> admins = new ArrayList<>();\n mInjector.binderWithCleanCallingIdentity(() -> {\n ... | [
"0.7865015",
"0.64265954",
"0.62826294",
"0.6259215",
"0.6129457",
"0.605493",
"0.6038907",
"0.60306823",
"0.59865165",
"0.5921207",
"0.58745575",
"0.58612597",
"0.5859846",
"0.5855417",
"0.5797391",
"0.5701624",
"0.5679855",
"0.5623616",
"0.5623466",
"0.5581101",
"0.55730265... | 0.81195325 | 0 |
Returns the list of admins on the given user, as well as parent admins for each managed profile associated with the given user. Optionally also include the admin of each managed profile. Should not be called on a profile user. | @GuardedBy("getLockObject()")
private List<ActiveAdmin> getActiveAdminsForUserAndItsManagedProfilesLocked(int userHandle,
Predicate<UserInfo> shouldIncludeProfileAdmins) {
ArrayList<ActiveAdmin> admins = new ArrayList<>();
mInjector.binderWithCleanCallingIdentity(() -> {
for ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GuardedBy(\"getLockObject()\")\n private List<ActiveAdmin> getActiveAdminsForAffectedUserLocked(int userHandle) {\n if (isManagedProfile(userHandle)) {\n return getUserDataUnchecked(userHandle).mAdminList;\n }\n return getActiveAdminsForUserAndItsManagedProfilesLocked(userHandle... | [
"0.61697733",
"0.5970059",
"0.5837457",
"0.5689767",
"0.56881285",
"0.5625537",
"0.54973716",
"0.54434633",
"0.53028816",
"0.52674025",
"0.5203198",
"0.5200535",
"0.51981235",
"0.5173579",
"0.51356965",
"0.51122147",
"0.5105237",
"0.5079936",
"0.5077513",
"0.50467837",
"0.498... | 0.66104645 | 0 |
Return a single admin's expiration cycle time, or the min of all cycle times. Returns 0 if not configured. | @Override
public long getPasswordExpirationTimeout(ComponentName who, int userHandle, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return 0L;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getExpiration();",
"@Override\n public final long getDefaultExpireDuration() {\n Object durationObject = properties.get(DEFAULT_EXPIRE_DURATION);\n if(durationObject == null){\n return 0;\n } else {\n try {\n return Long.parseLong(durationObject.t... | [
"0.5998237",
"0.5843431",
"0.57417756",
"0.57174003",
"0.5699261",
"0.5668663",
"0.5636962",
"0.5488856",
"0.5485616",
"0.5482099",
"0.54245746",
"0.53987694",
"0.537719",
"0.537629",
"0.53533757",
"0.53491944",
"0.5326094",
"0.53159153",
"0.5314816",
"0.53120047",
"0.5302585... | 0.0 | -1 |
Return a single admin's expiration date/time, or the min (soonest) for all admins. Returns 0 if not configured. | private long getPasswordExpirationLocked(ComponentName who, int userHandle, boolean parent) {
long timeout = 0L;
if (who != null) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent);
return admin != null ? admin.passwordExpirationDate : timeout;
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getExpiration();",
"long getExpirationDate();",
"@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}",
"public Date getDefaultTrialExpirationDate(){\n if(AccountType.STANDARD.equals(accountType)){\n Calendar cal = Calendar.getInstance();\n\... | [
"0.63879055",
"0.6367129",
"0.61932635",
"0.61895233",
"0.614657",
"0.60629815",
"0.5968114",
"0.5947517",
"0.5917858",
"0.5909917",
"0.590017",
"0.58895475",
"0.5859141",
"0.5784209",
"0.5770285",
"0.57464683",
"0.5742426",
"0.57419187",
"0.5721226",
"0.5721226",
"0.5720482"... | 0.5969585 | 6 |
Calculates strictest (maximum) value for a given password property enforced by admin[s]. | private int getStrictestPasswordRequirement(ComponentName who, int userHandle,
boolean parent, Function<ActiveAdmin, Integer> getter, int minimumPasswordQuality) {
if (!mHasFeature) {
return 0;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getPropertyBalanceMax();",
"@Override\r\n\tpublic Integer findAdminPassword(Admin admin) {\n\t\treturn adminMapper.findAdminPassword(admin);\r\n\t}",
"public long getPropertyBalanceMax()\n {\n return iPropertyBalanceMax.getValue();\n }",
"public boolean setPropertyBalanceMax(long aVa... | [
"0.6624931",
"0.635839",
"0.62906826",
"0.6045383",
"0.604223",
"0.58464044",
"0.58387303",
"0.5808723",
"0.57633287",
"0.57569814",
"0.5745988",
"0.57399565",
"0.57353604",
"0.5733635",
"0.5708272",
"0.56354594",
"0.563365",
"0.55802447",
"0.557458",
"0.55412835",
"0.5521985... | 0.68088394 | 0 |
Calculates strictest (maximum) value for a given password property enforced by admin[s]. | @Override
public PasswordMetrics getPasswordMinimumMetrics(@UserIdInt int userHandle,
boolean deviceWideOnly) {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)
&& (isSystemUid(caller) ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int getStrictestPasswordRequirement(ComponentName who, int userHandle,\n boolean parent, Function<ActiveAdmin, Integer> getter, int minimumPasswordQuality) {\n if (!mHasFeature) {\n return 0;\n }\n Preconditions.checkArgumentNonnegative(userHandle, \"Invalid userI... | [
"0.68088394",
"0.6624931",
"0.635839",
"0.62906826",
"0.6045383",
"0.604223",
"0.58464044",
"0.58387303",
"0.5808723",
"0.57633287",
"0.57569814",
"0.5745988",
"0.57399565",
"0.57353604",
"0.5733635",
"0.5708272",
"0.56354594",
"0.563365",
"0.55802447",
"0.557458",
"0.5541283... | 0.0 | -1 |
Only allow setting password on an unsecured user | private boolean setPasswordPrivileged(@NonNull String password, int flags,
CallerIdentity caller) {
if (isLockScreenSecureUnchecked(caller.getUserId())) {
throw new SecurityException("Cannot change current password");
}
return resetPasswordInternal(password, 0, null, flag... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPassword(String pass);",
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(String password);",
"void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;",
"void setPassword(String ps) {\n this.password =... | [
"0.7067059",
"0.69578105",
"0.69578105",
"0.69578105",
"0.68404615",
"0.67811793",
"0.67294234",
"0.6706213",
"0.6634181",
"0.6571227",
"0.6561327",
"0.65588456",
"0.6540671",
"0.6537239",
"0.6521997",
"0.64860636",
"0.6481721",
"0.6481721",
"0.6481721",
"0.6481721",
"0.64817... | 0.66658074 | 8 |
Update the profile's timeout | private void updateMaximumTimeToLockLocked(@UserIdInt int userId) {
if (isManagedProfile(userId)) {
updateProfileLockTimeoutLocked(userId);
}
mInjector.binderWithCleanCallingIdentity(() -> {
// Update the device timeout
final int parentId = getProfileParentId... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTimeout(double timeout){\n this.timeout = timeout;\n }",
"public void setTimeout(Integer timeout) {\n\t\tthis.timeout = timeout;\n\t}",
"public void setTimeout(int newTimeout) {\n this.timeout = newTimeout;\n }",
"public Double iisProfileTimeoutInSeconds() {\n return th... | [
"0.6551637",
"0.62246674",
"0.6221363",
"0.6218587",
"0.6194861",
"0.61884546",
"0.61884546",
"0.61723065",
"0.6166549",
"0.6145481",
"0.6128552",
"0.61222184",
"0.61050004",
"0.61046463",
"0.60705054",
"0.6051978",
"0.6051589",
"0.60436237",
"0.5977797",
"0.596088",
"0.59593... | 0.0 | -1 |
Return a single admin's strong auth unlock timeout or minimum value (strictest) of all admins if who is null. Returns 0 if not configured for the provided admin. | @Override
public long getRequiredStrongAuthTimeout(ComponentName who, int userId, boolean parent) {
if (!mHasFeature) {
return DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS;
}
Preconditions.checkArgumentNonnegative(userId, "Invalid userId");
final CallerIdentity cal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private long getPasswordExpirationLocked(ComponentName who, int userHandle, boolean parent) {\n long timeout = 0L;\n\n if (who != null) {\n ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent);\n return admin != null ? admin.passwordExpirationDate : timeout... | [
"0.6853426",
"0.66243243",
"0.6054732",
"0.58975524",
"0.5810107",
"0.5639722",
"0.5615599",
"0.5555111",
"0.55412376",
"0.5518287",
"0.5498225",
"0.5401934",
"0.54008174",
"0.5388829",
"0.5388829",
"0.53412867",
"0.5314168",
"0.5298757",
"0.5292728",
"0.5288469",
"0.52626276... | 0.6611315 | 2 |
Enforce one the following conditions are met: (1) The device has a Device Owner, and one of the following holds: (1.1) The caller is the Device Owner (1.2) The caller is another app in the same user as the device owner, AND The caller is the delegated certificate installer. (1.3) The caller is a Profile Owner and the c... | @VisibleForTesting
public void enforceCallerCanRequestDeviceIdAttestation(CallerIdentity caller)
throws SecurityException {
/**
* First check if there's a profile owner because the device could be in COMP mode (where
* there's a device owner and profile owner on the same devi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void enforceCanSetDeviceOwnerLocked(\n CallerIdentity caller, @Nullable ComponentName owner, @UserIdInt int deviceOwnerUserId,\n boolean hasIncompatibleAccountsOrNonAdb) {\n if (!isAdb(caller)) {\n Preconditions.checkCallAuthorization(\n hasCalling... | [
"0.6639701",
"0.65492636",
"0.6339653",
"0.59227675",
"0.5905763",
"0.56623036",
"0.5660328",
"0.5509728",
"0.54351825",
"0.53367424",
"0.5310881",
"0.5303446",
"0.5256384",
"0.52524585",
"0.5227514",
"0.52066225",
"0.52002645",
"0.51974136",
"0.51522285",
"0.51496965",
"0.51... | 0.7149879 | 0 |
Get attestation flags, if any. | @Override
public boolean generateKeyPair(ComponentName who, String callerPackage, String algorithm,
ParcelableKeyGenParameterSpec parcelableKeySpec, int idAttestationFlags,
KeymasterCertificateChain attestationChain) {
final int[] attestationUtilsFlags = translateIdAttestationFlags(i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getFlags();",
"public int getFlags();",
"public int getApplicationFlags() {\n return getActivityInfo().flags;\n }",
"public boolean getAtmStatus();",
"long getFlags();",
"public abstract int flags();",
"public int getAccessFlags() {\n return access_flags;\n }",
"IntsRef... | [
"0.6770146",
"0.6770146",
"0.6559093",
"0.6507717",
"0.6441653",
"0.62677735",
"0.6242487",
"0.6183224",
"0.6151609",
"0.61329675",
"0.60887545",
"0.6077828",
"0.6042294",
"0.5984904",
"0.5963943",
"0.5951479",
"0.59298986",
"0.59039545",
"0.58701545",
"0.5867927",
"0.5851354... | 0.0 | -1 |
Set the scopes of a device owner or profile owner delegate. | @Override
public void setDelegatedScopes(ComponentName who, String delegatePackage,
List<String> scopeList) throws SecurityException {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkStringNotEmpty(delegatePackage, "Delegate package is null or empty");
Pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setDelegateOwner(Object owner);",
"public void setScopes(String scopes) {\n\t\tset(\"scope\", scopes);\n\t}",
"@GuardedBy(\"getLockObject()\")\n private void applyProfileRestrictionsIfDeviceOwnerLocked() {\n final int doUserId = mOwners.getDeviceOwnerUserId();\n if (doUserId == UserHandle... | [
"0.53896445",
"0.5366827",
"0.5295842",
"0.5171295",
"0.5148249",
"0.50593513",
"0.50164056",
"0.5011017",
"0.49761674",
"0.48930293",
"0.48766756",
"0.48381564",
"0.48312145",
"0.48251274",
"0.48185024",
"0.48083282",
"0.4782076",
"0.47575223",
"0.47212684",
"0.46937832",
"0... | 0.66990834 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.