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
Returns the result of interpreting the object as an instance of 'Date'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseDate(Date object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDate()\n\t{\n\t\tif (m_nType == AT_DATE)\n\t\t\treturn (Date)m_oData;\n\t\telse\n\t\t\treturn null;\n\t}", "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "Date getForDate();", "public Date getA...
[ "0.63971055", "0.62849087", "0.62680197", "0.6195192", "0.6140788", "0.61381894", "0.6131427", "0.61252975", "0.61252975", "0.61252975", "0.6017774", "0.6003553", "0.59408414", "0.5928483", "0.58894444", "0.5888109", "0.58864653", "0.5839179", "0.58336496", "0.58122224", "0.5...
0.7304325
0
Returns the result of interpreting the object as an instance of 'Number'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseNumber(survey.Number object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseNumber(org.uis.lenguajegrafico.lenguajegrafico.Number object)\n {\n return null;\n }", "public static Number asNumber(Object value) {\n Number num = null;\n if (value == null) {\n num = null;\n } else if (value instanceof Number) {\n num = (Number) val...
[ "0.7606843", "0.73100626", "0.6889564", "0.6746775", "0.6645003", "0.6506001", "0.649376", "0.63764834", "0.63683254", "0.62805074", "0.6221022", "0.6020551", "0.6020551", "0.6020551", "0.6002307", "0.5987251", "0.59283024", "0.5903467", "0.58911395", "0.5886268", "0.584494",...
0.6431455
7
Returns the result of interpreting the object as an instance of 'Has Other'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseHasOther(HasOther object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isOther() {\n\t\t\treturn this == OTHER;\n\t\t}", "Object getIf();", "public T caseBooleanOperation(BooleanOperation object) {\n\t\treturn null;\n\t}", "public boolean isSetOther()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n ...
[ "0.5995248", "0.5513991", "0.5490398", "0.541011", "0.5378951", "0.537196", "0.534477", "0.534477", "0.53354436", "0.5308548", "0.5281917", "0.5202513", "0.52007294", "0.5184488", "0.5184488", "0.5184488", "0.5184488", "0.5184488", "0.5184488", "0.5184488", "0.51510143", "0...
0.72279537
0
Returns the result of interpreting the object as an instance of 'Scale'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseScale(Scale object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ScaleType getScale();", "public Scale getScale() {\n return this.scale;\n }", "public float getScale();", "int getScale();", "public Integer getScale() {\n return _scale;\n }", "public Integer getScale() {\n return _scale;\n }", "@Override\n public float getScale() {\n ...
[ "0.77208203", "0.70889723", "0.7070053", "0.7029235", "0.69284093", "0.69284093", "0.6787331", "0.6769643", "0.6752455", "0.67468363", "0.6746097", "0.67254066", "0.6714896", "0.6708277", "0.6682729", "0.6660025", "0.6655483", "0.6615217", "0.6604188", "0.6600048", "0.6591954...
0.7914496
0
Returns the result of interpreting the object as an instance of 'Answer'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseAnswer(Answer object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseQuestion(Question object) {\n\t\treturn null;\n\t}", "public String getAnswer() {\n return answer;\n }", "public T caseAnswerTemplate(AnswerTemplate object) {\n\t\treturn null;\n\t}", "public ProtocolResult getAnswer(){\n\t\t\n\t\tif( hasReachedTimeout() ){\n\t\t\taddError(Locale.getSt...
[ "0.6667333", "0.6464338", "0.63941795", "0.6342327", "0.6263777", "0.62072337", "0.6203106", "0.6165594", "0.60947675", "0.60472983", "0.60140043", "0.6009403", "0.5975091", "0.5949217", "0.58954585", "0.5854091", "0.5809794", "0.57794404", "0.5743168", "0.5726161", "0.569552...
0.7862462
0
Returns the result of interpreting the object as an instance of 'Has Options'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseHasOptions(HasOptions object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "boolean hasOptions();", "public boolean hasOptions() {\n return options_ != null;\n }", "public boolean hasOptions() {\n return options_ != null;\n }", "publi...
[ "0.6692606", "0.6692606", "0.6692606", "0.6692606", "0.6692606", "0.6692606", "0.6195256", "0.6195256", "0.6195256", "0.6195256", "0.6195256", "0.6195256", "0.5959989", "0.5959989", "0.5959989", "0.5959989", "0.5959989", "0.5959989", "0.5888935", "0.5888935", "0.5835919", "...
0.7205135
0
Returns the result of interpreting the object as an instance of 'Answer Template'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseAnswerTemplate(AnswerTemplate object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseAnswerTemplateRef(AnswerTemplateRef object) {\n\t\treturn null;\n\t}", "public T caseAnswer(Answer object) {\n\t\treturn null;\n\t}", "public T caseQuestion(Question object) {\n\t\treturn null;\n\t}", "public String getAnswer() {\n return answer;\n }", "@Override\n\tpublic String ans...
[ "0.7017297", "0.6932498", "0.6387322", "0.5786483", "0.5719212", "0.5706996", "0.569035", "0.5624421", "0.55902517", "0.55506474", "0.5533915", "0.5461248", "0.54346067", "0.54091996", "0.532536", "0.5316283", "0.5283261", "0.52673954", "0.52543926", "0.52205473", "0.5176289"...
0.7909223
0
Returns the result of interpreting the object as an instance of 'Table'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseTable(Table object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object caseTable(Table object) {\r\n\t\treturn null;\r\n\t}", "public T caseTransitionTable(TransitionTable object) {\n\t\treturn null;\n\t}", "public T caseTableQuestion(TableQuestion object) {\n\t\treturn null;\n\t}", "public Table getTable() { return this.table; }", "Table getTable();", "public...
[ "0.7125858", "0.6649899", "0.6452791", "0.6219586", "0.6202561", "0.6194807", "0.616091", "0.61545646", "0.61344063", "0.6132228", "0.6115325", "0.6062965", "0.60475636", "0.60188645", "0.59475243", "0.5914877", "0.5848475", "0.5841526", "0.58391166", "0.5741658", "0.57358307...
0.73550236
1
Returns the result of interpreting the object as an instance of 'Table Question'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseTableQuestion(TableQuestion object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseQuestion(Question object) {\n\t\treturn null;\n\t}", "Question getQuestion();", "public T caseAnswer(Answer object) {\n\t\treturn null;\n\t}", "public T caseTable(Table object) {\n\t\treturn null;\n\t}", "public T caseTable(Table object) {\n\t\treturn null;\n\t}", "public final Question ques...
[ "0.6639668", "0.5776357", "0.5683786", "0.56208223", "0.56208223", "0.54970324", "0.54419225", "0.53616583", "0.5306614", "0.52940583", "0.52526563", "0.52293295", "0.52019894", "0.51904446", "0.51883936", "0.518072", "0.5158115", "0.5152115", "0.5147907", "0.5133049", "0.508...
0.7570874
0
Returns the result of interpreting the object as an instance of 'Answer Template Ref'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseAnswerTemplateRef(AnswerTemplateRef object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseAnswerTemplate(AnswerTemplate object) {\n\t\treturn null;\n\t}", "public T caseAnswer(Answer object) {\n\t\treturn null;\n\t}", "public T caseQuestion(Question object) {\n\t\treturn null;\n\t}", "public T caseRef(Ref object) {\r\n\t\treturn null;\r\n\t}", "public T caseDefinitionReference(Defi...
[ "0.7584461", "0.6938436", "0.6292086", "0.5788844", "0.5626551", "0.5578136", "0.5559958", "0.554721", "0.5543789", "0.5523231", "0.54946876", "0.5410774", "0.5377302", "0.5373735", "0.53621185", "0.5310867", "0.5292611", "0.5282949", "0.5271661", "0.5268778", "0.52654964", ...
0.7798454
0
Returns the result of interpreting the object as an instance of 'Option'. This implementation returns null; returning a nonnull result will terminate the switch.
public T caseOption(Option object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseoption(option object) {\n\t\treturn null;\n\t}", "public T caseDefOption(DefOption object)\n {\n return null;\n }", "public T caseHasOptions(HasOptions object) {\n\t\treturn null;\n\t}", "public T caseTransitionOption(TransitionOption object) {\n\t\treturn null;\n\t}", "public T caseChois...
[ "0.7225626", "0.6660585", "0.63976824", "0.6180273", "0.609526", "0.596656", "0.5887705", "0.5732856", "0.56814843", "0.5658478", "0.560296", "0.5573221", "0.55666566", "0.55484015", "0.5545103", "0.5522184", "0.5490225", "0.5482848", "0.54616576", "0.5442644", "0.54194564", ...
0.76821434
1
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a nonnull result will terminate the switch, but this is the last case anyway.
@Override public T defaultCase(EObject object) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T caseECU(ECU object) {\r\n\t\treturn null;\r\n\t}", "public T caseExpr(Expr object) {\n\t\treturn null;\n\t}", "public T defaultCase(EObject object)\n {\n return null;\n }", "public T defaultCase(EObject object)\n {\n return null;\n }", "public T caseEjecuciones(Ejecuciones object)\n {\n...
[ "0.6622443", "0.6619279", "0.6467942", "0.6467942", "0.641526", "0.64107317", "0.63816476", "0.63614696", "0.63606054", "0.6333966", "0.6332895", "0.6330184", "0.6322177", "0.63195795", "0.6310167", "0.6287978", "0.6287978", "0.628769", "0.628769", "0.628769", "0.628769", "...
0.62447363
46
/Metodo para generar el par de claves publicaprivada
public void generateNewKeyPair(String alias, Context context) throws Exception { Calendar start = Calendar.getInstance(); Calendar end = Calendar.getInstance(); // expires 1 year from today end.add(Calendar.YEAR, 1); KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(context) .setAlias(alias) .setSubject(new X500Principal("CN=" + alias)) .setSerialNumber(BigInteger.TEN) .setStartDate(start.getTime()) .setEndDate(end.getTime()) .build(); // use the Android keystore KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA",ANDROID_KEYSTORE); gen.initialize(spec); // generates the keypair gen.generateKeyPair(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Plato(){\n\t\t\n\t}", "private void __sep__Constructors__() {}", "public Propiedad(){\n\t}", "ConjuntoTDA claves();", "private void CreateOriginClass(String[] p) {\n String classname = p[2];\n int count = Integer.parseInt(p[1]);\n classt.maxid++;\n int classid = classt.ma...
[ "0.60904825", "0.6073616", "0.58053213", "0.57760197", "0.5753701", "0.5742683", "0.5716676", "0.5710706", "0.57059383", "0.5691104", "0.5682697", "0.5677273", "0.5669516", "0.5623507", "0.56200105", "0.5601494", "0.5575124", "0.5562001", "0.5558655", "0.5541842", "0.5538053"...
0.0
-1
/Obtener cifrador de RSA
public Cipher getCipherRSA() throws NoSuchPaddingException, NoSuchAlgorithmException { return Cipher.getInstance("RSA/NONE/PKCS1Padding"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RSA() {\n \t\n \t//generisanje random key-eva\n Random random = new Random();\n BigInteger p = new BigInteger(512, 30, random);\n BigInteger q = new BigInteger(512, 30, random);\n \n //Nadjemo fi(n)\n BigInteger lambda = lcm(p.subtract(BigInteger.ONE), q.subtr...
[ "0.7152615", "0.6996927", "0.6914355", "0.68790406", "0.6658784", "0.6566166", "0.65497875", "0.64552546", "0.6444258", "0.63926005", "0.63048655", "0.61919177", "0.6189174", "0.6176828", "0.61763906", "0.61490643", "0.6146706", "0.61295676", "0.61220616", "0.6111193", "0.610...
0.6163838
15
/Obtener cifrador de AES
public Cipher getCipherAES() throws NoSuchPaddingException, NoSuchAlgorithmException { return Cipher.getInstance("AES_256/ECB/PKCS5Padding"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private AES() {\r\n\r\n }", "private AES() {\n }", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(pl...
[ "0.73208237", "0.7271575", "0.70203996", "0.70064306", "0.6935506", "0.6911741", "0.67561156", "0.6743485", "0.67354107", "0.667558", "0.6498892", "0.64181095", "0.63963765", "0.6387976", "0.63512355", "0.63481677", "0.6333614", "0.6299482", "0.6285045", "0.6241229", "0.62057...
0.6548334
10
/Generar clave secreta AES256
public SecretKey generarClaveSecreta() throws NoSuchAlgorithmException { KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); keyGenerator.init(256); SecretKey secretKey = keyGenerator.generateKey(); return secretKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "private static SecretKeySpec generateKey(final String pas...
[ "0.7238935", "0.6709636", "0.67095196", "0.6692355", "0.6623828", "0.6619437", "0.65211564", "0.63288283", "0.6276225", "0.6268303", "0.6246205", "0.62043226", "0.6198902", "0.61825985", "0.61775595", "0.613104", "0.6104491", "0.60641456", "0.6053151", "0.6050688", "0.6026397...
0.79806757
0
Generates multiple fragments from the incoming bytes
public Fragment[] encode(byte[] bytes, int length, boolean[] generateFragment) { int wantFragments = 0; for (int i=0; i<generateFragment.length; i++) if (generateFragment[i]) wantFragments ++; // System.outt.println(Systemm.currentTimeMillis()+" XXX before encode("+bytes.length+" bytes, "+wantFragments+" fragments) free="+Runtime.getRuntime().freeMemory()+" total="+Runtime.getRuntime().totalMemory()); int numWords = (length + 3) / 4; int wordsPerGroup = (numSurvivors * Lfield); int numGroups = (numWords + (wordsPerGroup - 1)) / wordsPerGroup; int wordsPerFragment = numGroups * Lfield; int buffer[] = new int[numFragments * Lfield]; Fragment frag[] = new Fragment[numFragments]; for (int i = 0; i < numFragments; i++) { if (generateFragment[i]) frag[i] = new Fragment(wordsPerFragment * 4); else frag[i] = null; } //System.outt.println(bytes.length+" bytes => "+numFragments+" fragments with "+wordsPerFragment+" words ("+numGroups+" groups)"); for (int g=0; g<numGroups; g++) { int offset = g * wordsPerGroup * 4; int wordsHere = Math.min((length - offset + 3)/4, wordsPerGroup); Arrays.fill(buffer, 0); for (int i=0; i<wordsHere; i++) { byte b0 = (offset+4*i+0 < length) ? bytes[offset+4*i+0] : 0; byte b1 = (offset+4*i+1 < length) ? bytes[offset+4*i+1] : 0; byte b2 = (offset+4*i+2 < length) ? bytes[offset+4*i+2] : 0; byte b3 = (offset+4*i+3 < length) ? bytes[offset+4*i+3] : 0; buffer[i] = (b0<<24) | ((b1<<16)&0xFF0000) | ((b2<<8)&0xFF00) | (b3&0xFF); } encodeChunk(buffer); for (int i=0; i<numFragments; i++) { if (generateFragment[i]) { for (int j=0; j<Lfield; j++) { frag[i].payload[4*(g*Lfield + j) + 0] = (byte) ((buffer[i * Lfield + j] ) & 0xFF); frag[i].payload[4*(g*Lfield + j) + 1] = (byte) ((buffer[i * Lfield + j] >> 8) & 0xFF); frag[i].payload[4*(g*Lfield + j) + 2] = (byte) ((buffer[i * Lfield + j] >> 16) & 0xFF); frag[i].payload[4*(g*Lfield + j) + 3] = (byte) ((buffer[i * Lfield + j] >> 24) & 0xFF); } } } } // System.out.println(Systemm.currentTimeMillis()+" XXX after encode("+bytes.length+" bytes, "+wantFragments+" fragments) free="+Runtime.getRuntime().freeMemory()+" total="+Runtime.getRuntime().totalMemory()); return frag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public ByteString getBlocksBuffer();", "byte[] inflate(byte[] data) throws IOException;", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream...
[ "0.5624795", "0.560925", "0.550721", "0.5344065", "0.52892685", "0.51964396", "0.5179478", "0.5169321", "0.5168859", "0.5131858", "0.512657", "0.5102021", "0.5033923", "0.49960983", "0.4991556", "0.49878204", "0.4983546", "0.4949906", "0.49421892", "0.49317557", "0.4930737", ...
0.67987025
0
ByteArrayInputStream byteinput = new ByteArrayInputStream(bytes); ObjectInputStream objectInput = new ObjectInputStream(byteinput); // System.out.println(Systemm.currentTimeMillis()+" XXX after decode("+firstFrag.getPayload().length+" bytes per fragment) free="+Runtime.getRuntime().freeMemory()+" total="+Runtime.getRuntime().totalMemory()); return (Serializable) objectInput.readObject();
protected PastContent deserialize(byte[] bytes, Endpoint endpoint, PastContentDeserializer pcd) throws IOException, ClassNotFoundException { SimpleInputBuffer sib = new SimpleInputBuffer(bytes); short type = sib.readShort(); return pcd.deserializePastContent(sib, endpoint, type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object decode(InputStream is) ;", "@Override\n public void deserialize(ByteBuffer buf) {\n }", "GeneratedMessage deserialize(InputStream in) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException;", "void decodeObject();", "InputStream deserialize(I...
[ "0.6285144", "0.58701855", "0.5749994", "0.57269317", "0.56848854", "0.56696576", "0.56367344", "0.5630385", "0.5624975", "0.56228685", "0.5599833", "0.55854374", "0.5580661", "0.55672944", "0.55502623", "0.5524965", "0.54981637", "0.5441382", "0.543142", "0.54166234", "0.540...
0.5371656
24
Instantiates a new taxon.
public Taxon(String pLang, String pName) { this.lang = pLang; this.name = pName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EasytaxTaxations() {\n this(\"easytax_taxations\", null);\n }", "public AbstractTaxon() {\n // Setter arrays\n querySetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n insertSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>(...
[ "0.69375175", "0.6780897", "0.6561235", "0.63929975", "0.616421", "0.6002456", "0.5878747", "0.57764816", "0.5773862", "0.5748656", "0.55968434", "0.5563553", "0.54678404", "0.5426843", "0.53785986", "0.5357621", "0.531891", "0.5305403", "0.5305195", "0.52834845", "0.5277075"...
0.5436539
13
TODO: keep an eye o this, it may be need to be replaced by a builder pattern
public static User create(String firstName, String lastName, String nickName) { User user = new User(); user.setNickName(nickName); user.setFirstName(firstName); user.setLastName(lastName); return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Builder() {\n\t\t}", "private Builder() {}", "private BuilderUtils() {}", "private Builder()\n {\n }", "private Builder() {\n }", "private Builder() {\n }", "abstract Object build();", "public static Builder builder(){ return new Builder(); }", "Object build();",...
[ "0.6604218", "0.646222", "0.6295276", "0.6109445", "0.60901946", "0.60901946", "0.6067456", "0.5908532", "0.5902475", "0.5845838", "0.5839939", "0.5827745", "0.5799911", "0.5782901", "0.57721984", "0.5744923", "0.5718203", "0.5711067", "0.5711067", "0.5711067", "0.57037055", ...
0.0
-1
very very good! solution 1: dfs
private int numIslands_dfs(char[][] grid) { int m = grid.length; int n = grid[0].length; // 很多解法是将grid[i][j] 设置成0,这样也可以,只是会改变输入,可以讨论。 boolean[] visited = new boolean[m * n]; // 这里就不用map了,一个一维数组就可以。 int numOfIslands = 0; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { if (grid[i][j] == '1' && !visited[i * n + j]) { ++ numOfIslands; dfs(grid, i, j, visited); } } } return numOfIslands; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }", "@Override\n public void dfs() {\n\n }", "public void dfs() {...
[ "0.7261955", "0.6872659", "0.6645531", "0.645097", "0.63396245", "0.63244367", "0.6311427", "0.6294973", "0.6232488", "0.6216808", "0.6200822", "0.6182929", "0.61793846", "0.6176005", "0.61662173", "0.61485326", "0.6141163", "0.61405957", "0.6137575", "0.6077257", "0.6072283"...
0.0
-1
Simulates a processing delay by causing the thread to sleep for one second.
@MessageMapping("/hello") @SendTo("/topic/greetings") public AnotherSimpleMessage publishMessage(SimpleMessage simpleMessage) throws InterruptedException { Thread.sleep(1000); return new AnotherSimpleMessage("Hello " + simpleMessage.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delay(){\n try {\n Thread.sleep((long) ((samplingTime * simulationSpeed.factor)* 1000));\n } catch (InterruptedException e) {\n started = false;\n }\n }", "public static void delay() {\n\n long ONE_SECOND = 1_000;\n\n try {\n Thre...
[ "0.80161244", "0.79293984", "0.7896057", "0.7646267", "0.74662477", "0.7410577", "0.729555", "0.72908616", "0.72666377", "0.7233674", "0.72317857", "0.7195369", "0.7162874", "0.7153321", "0.71190995", "0.710099", "0.71007955", "0.7068008", "0.7053218", "0.70199305", "0.699219...
0.0
-1
/ renamed from: a
public static Pair<Integer, Integer> m31085a(byte[] bArr) { zzss zzss = new zzss(bArr); int a = m31084a(zzss); int b = m31087b(zzss); int a2 = zzss.mo32193a(4); if (a == 5 || a == 29) { b = m31087b(zzss); if (m31084a(zzss) == 22) { a2 = zzss.mo32193a(4); } } int i = f29312c[a2]; zzsk.m31080a(i != -1); return Pair.create(Integer.valueOf(b), Integer.valueOf(i)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: a
public static byte[] m31086a(byte[] bArr, int i, int i2) { byte[] bArr2 = f29310a; byte[] bArr3 = new byte[(bArr2.length + i2)]; System.arraycopy(bArr2, 0, bArr3, 0, bArr2.length); System.arraycopy(bArr, i, bArr3, f29310a.length, i2); return bArr3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: a
private static int m31084a(zzss zzss) { int a = zzss.mo32193a(5); if (a == 31) { return zzss.mo32193a(6) + 32; } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed fr...
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064...
0.0
-1
/ renamed from: b
private static int m31087b(zzss zzss) { int a = zzss.mo32193a(4); if (a == 15) { return zzss.mo32193a(24); } zzsk.m31080a(a < 13); return f29311b[a]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "v...
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.588663...
0.0
-1
If we are replacing token equal to property own name, i.e. property is referencing equally named property from higher context
@Override public String replace(String s) { if (this.propertyName.equals(s)) { if (this.parentContext != null) { return this.parentContext.findProperty(s); } // Property is referencing equally named property from higher context // but there is no higher context return s; } // Property is referencing NOT equally named property from its context or higher context return this.context.findProperty(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "boolean hasPropertyLike(String name);", "boolean containsProperty(String name);", "private boolean processPhysicalPropertyToken(final ParseToken token) {\n if (physicBloc...
[ "0.6421162", "0.5709722", "0.56821036", "0.5589328", "0.5484429", "0.53334826", "0.5271401", "0.51427674", "0.51153594", "0.51153594", "0.5105536", "0.5089068", "0.5071549", "0.50386655", "0.50337", "0.50315", "0.50263923", "0.50235593", "0.50127846", "0.49626514", "0.4959218...
0.637825
1
creates a new calendar event.
public CalendarEvent(String title, String date, String timeOccurring, EventType type) { this.title = title; this.date = date; this.timeOccurring = timeOccurring; this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Event createEvent();", "Event createEvent();", "@Override\n\tpublic void createEvent(CalendarCreate calendar) {\n\t\tprojectDao.createEvent(calendar);\n\t\t\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\tprivate void createCalendarEntry(){\r\n\t\t\r\n\t\tUri calendars = Uri.parse(CALENDAR_URI);\r\n\t\t ...
[ "0.7223362", "0.7223362", "0.72230166", "0.6890362", "0.6846721", "0.6826045", "0.6739449", "0.6683953", "0.6659339", "0.6611338", "0.66065764", "0.66005695", "0.6570048", "0.654911", "0.65486586", "0.6528633", "0.6510968", "0.65107924", "0.6494594", "0.64656425", "0.6457774"...
0.5591725
89
parses the full title from a calendar rss item title. Used when reading a calendar rss feed.
public CalendarEvent(String fullTitle) { Log.d(TAG, fullTitle); int firstSpaceLoc = fullTitle.indexOf(' '); if(firstSpaceLoc != -1) { this.date = fullTitle.substring(0, firstSpaceLoc); int useSpaceNum = 1; try { this.timeOccurring = fullTitle.substring(firstSpaceLoc + 1, fullTitle.indexOf('M') + 1); useSpaceNum = 2; //if we do find a time use the third space found in the fullTitle to get the title from the xml. } catch (Exception e){ this.timeOccurring = "06:00 AM"; // if their is no specific time found in the title string, just set the time occuring to "12am". useSpaceNum = 0; Log.d(TAG, "\tNo time for calendar event found."); } finally { this.title = fullTitle.substring(Utils.findNthIndexOf(fullTitle," ", useSpaceNum) + 1); // the rest of the title tag should be the name of the event.; parseEventType(); logEvent(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final String parseForTitle(String rawInput,String input, DataInputStream dis)\r\n {\r\n int i,j,k,l; \r\n\tint titleLength=0; // Keep track of title length as only first 25 characters are displayed.\r\n\tint start=0;\r\n\tString temp;\r\n\tStringBuffer title=new StringBuffer(\"\");\r\n\tboolean foundTag=false...
[ "0.6748804", "0.66250694", "0.650232", "0.6484587", "0.6471276", "0.63424444", "0.6222559", "0.62171304", "0.6207965", "0.61832744", "0.61832744", "0.61832744", "0.61832744", "0.61832744", "0.60691905", "0.6063891", "0.60169816", "0.6015139", "0.5967903", "0.5948759", "0.5926...
0.65821123
2
attempts to retrieve the event type by just looking at the title of the calendarEvent. this then sets the EventType of the CalendarEvent to the found Event type.
private void parseEventType() { //TODO: add a list of all the school holidays to checkfor the 'holiday' event type. String tempTitle = title.toLowerCase(); if(tempTitle.contains("no school") || tempTitle.contains("teacher's institute") || tempTitle.contains("teacher's work day") || tempTitle.contains("snow day")) { //example: no school this.type = EventType.noSchool; } else if(tempTitle.contains("late start")) {//example: late start wednesday this.type = EventType.lateStart; } else if(tempTitle.contains("last day")) {//example last day before spring break; this.type = EventType.lastDayBeforeBreak; } else if(tempTitle.contains("end of")) { //example: end of first semester this.type = EventType.endOf; } else if(tempTitle.contains("meeting")) { this.type = EventType.meeting; } else { this.type = EventType.regular; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEventtype(java.lang.String newValue) {\n\tthis.eventtype = newValue;\n}", "public void setEventType(String eventType)\n {\n this.eventType = eventType;\n }", "public void setEventType(String eventType){\n this.eventType = eventType;\n }", "public java.lang.String getEven...
[ "0.61595017", "0.57161915", "0.5692308", "0.55431384", "0.54861695", "0.5482308", "0.5473887", "0.5472342", "0.54574883", "0.5446303", "0.53789", "0.5378289", "0.53714985", "0.5370941", "0.5260555", "0.52259636", "0.5212707", "0.5173579", "0.5149593", "0.5148135", "0.51444817...
0.68082833
0
checks if 2 CalendarEvents are equal to eachother. This ignores case in strings.
public boolean equals(Object obj) { if(obj instanceof CalendarEvent) { CalendarEvent event = (CalendarEvent) obj; if (event.getDate().equalsIgnoreCase(this.date) && event.getTimeOccurring().equalsIgnoreCase(this.getTimeOccurring()) && event.getTitle().equalsIgnoreCase(this.title) && event.getType() == this.type) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isSame(Calendar first, Calendar second)\n {\n return (first.get(Calendar.DAY_OF_MONTH) == second.get(Calendar.DAY_OF_MONTH))\n && (first.get(Calendar.MONTH) == second.get(Calendar.MONTH))\n && (first.get(Calendar.YEAR) == second.get(Calendar.YEAR));\n }", ...
[ "0.6778056", "0.625549", "0.611598", "0.60889167", "0.60460126", "0.60460126", "0.6032409", "0.601851", "0.5992185", "0.5977717", "0.59614575", "0.5951497", "0.593017", "0.5924125", "0.5828539", "0.5823679", "0.5820236", "0.5818802", "0.5811319", "0.5800113", "0.579584", "0...
0.6343141
1
Created by sasiddi on 4/13/17.
public interface FollowerService { void follow(Follower follower); void unfollow(Follower follower); List<Follower> getTopFollowers(); List<Follower> getFollowers(Long personId); List<Follower> getFollowing(Long personId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "private ...
[ "0.61556035", "0.60000694", "0.5826338", "0.5804371", "0.57733387", "0.5732617", "0.57005686", "0.568391", "0.56695795", "0.56648153", "0.56543165", "0.5610174", "0.5604709", "0.5598388", "0.558981", "0.558981", "0.558981", "0.558981", "0.558981", "0.558981", "0.558981", "0...
0.0
-1
TODO Autogenerated method stub
@Override public List<ProjectMember> selectProjectMemeber(int projectno) { return pDao.selectProjectMemeber(projectno); }
{ "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
TODO Autogenerated method stub
@Override public int inviteEmailCheck(String useremail, int projectno) { return pDao.inviteEmailCheck(useremail, projectno); }
{ "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
TODO Autogenerated method stub
@Override public int changeAuth(Member_Project member_project) { return pDao.changeAuth(member_project); }
{ "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
the orientation of the track
@Override public Orientation getOrientation() { return this.route.getOrientation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double getOrientation();", "public Orientation getOrientation(){return this.orientation;}", "public int getOrientation(){ return mOrientation; }", "public int getOrientation()\n\t{\n\t\treturn orientation;\n\t}", "public String orientation() {\n\t\tif (orientation == null)\n\t\t\tarea();\n\...
[ "0.7701757", "0.7382791", "0.72574246", "0.72195214", "0.7203263", "0.71205354", "0.71109605", "0.70876414", "0.70568794", "0.7040932", "0.6986526", "0.6952115", "0.69449705", "0.6905642", "0.6904253", "0.68296915", "0.6824799", "0.6811656", "0.67325175", "0.6730859", "0.6727...
0.6571668
29
Returns the current owner of this track, either unclaimed if the track has not been claimed, or the owner that corresponds with the color of the player that successfully claimed the route of which this track is a part.
@Override public Baron getBaron() { return this.route.getBaron(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }", "public String getOwner() {\r\n if (mOwner==null) {\r\n return \"n/a\";\r\n }\r\n return mOwner;\r\n }", "Participant getOwner();", "public Player getOwner() {\n\t\tif ...
[ "0.7152414", "0.70408857", "0.7011184", "0.69879377", "0.68778217", "0.6844946", "0.6844946", "0.68194884", "0.6787506", "0.676399", "0.67448664", "0.67448664", "0.66962624", "0.669044", "0.6678866", "0.66750264", "0.6664547", "0.66627777", "0.663094", "0.6629092", "0.6612562...
0.0
-1
Returns the route of which this track is a part.
@Override public Route getRoute() { return this.route; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRoute() {\n return route;\n }", "public java.lang.String getRoute () {\n\t\treturn route;\n\t}", "io.envoyproxy.envoy.type.metadata.v3.MetadataKind.Route getRoute();", "public String getRoutePoint() {\n\t\t\treturn routePoint;\n\t\t}", "public Route getRoute();", "public com.vm...
[ "0.68417525", "0.68283033", "0.6579555", "0.65740377", "0.65414053", "0.63755417", "0.6347526", "0.62882227", "0.6268932", "0.6148196", "0.61287755", "0.60622084", "0.6034914", "0.60028076", "0.59931016", "0.59672654", "0.596699", "0.5952021", "0.5926717", "0.5883306", "0.588...
0.6230257
9
the row of the track in the map
@Override public int getRow() { return this.row; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RowCoordinates getRowCoordinates();", "public int getRow()\n {\n return row;\n }", "public int getRow() { return _row; }", "public int getRow()\r\n {\r\n return row;\r\n }", "public int getRow()\n {\n return row;\n }", "public int getRow() {\r\n return row;\r\n }", "...
[ "0.6619964", "0.6496246", "0.6472541", "0.64710885", "0.64024305", "0.636395", "0.63534856", "0.63329333", "0.63329333", "0.63329333", "0.63329333", "0.63329333", "0.63329333", "0.6307922", "0.6299785", "0.6291958", "0.6291958", "0.6291958", "0.6285855", "0.6262174", "0.62621...
0.61898154
29
the column of the track in the map
@Override public int getCol() { return this.col; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getColumn();", "public int getColumn();", "public int getColumn()\n {\n return col;\n }", "public int getColumn()\t \t\t{ return column; \t}", "public int getColumn(){\n return this.column;\n }", "int getCol();", "public int col() {\r\n return col;\r\n }", "int atColumn()...
[ "0.68682474", "0.6850081", "0.6826356", "0.68254447", "0.681461", "0.67875415", "0.6759361", "0.67176086", "0.6692634", "0.6690934", "0.66829705", "0.66799265", "0.66456133", "0.6630777", "0.66233397", "0.6614666", "0.6614666", "0.6600659", "0.65859544", "0.65749747", "0.6574...
0.645196
33
compare the location between two object
@Override public boolean collocated(Space other) { return this.row == other.getRow() && this.col == other.getCol(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean compareLocation(Location location){\n return location.getBlockX()==this.location.getBlockX() && location.getBlockY()==this.location.getBlockY() && location.getBlockZ() == this.location.getBlockZ();\n }", "public boolean sameLocation(SearchResult other) {\n\t\t\treturn this.location.comp...
[ "0.692155", "0.68117785", "0.6757325", "0.6465276", "0.6258613", "0.6258193", "0.62248534", "0.62137055", "0.61955535", "0.61874133", "0.61633056", "0.6159094", "0.6125289", "0.61104286", "0.6109212", "0.60138553", "0.6007327", "0.6002935", "0.5971689", "0.5943084", "0.592104...
0.6275761
4
Parse and process the outcome of the C&C Parser
public SentenceItem(String parse){ String[] split = pattern.split(parse); this.origWord = split[0]; this.word = split[1].replaceAll("[,.:]", ""); this.POS = split[2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CParserResult getParserResult();", "public void parse()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstatus = program();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "void parse();", "private static void handleParser(char c) {\n if(c == '\\n'){\r\n return;\r\n }\r\n switch (stat...
[ "0.6973089", "0.6406651", "0.640534", "0.6342899", "0.61762553", "0.6162539", "0.60993683", "0.60709363", "0.5999775", "0.5898796", "0.58766806", "0.58605945", "0.5809598", "0.579468", "0.57851136", "0.57576823", "0.573491", "0.57278496", "0.57261795", "0.56909066", "0.568260...
0.0
-1
Created by kings on 7/26/2016.
public interface IMyComment { void getMyComment(String teacherId,int page,int pageSize,Response.Listener<MyEvaluate> listener,Response.ErrorListener errorListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpu...
[ "0.6138765", "0.59542966", "0.58932036", "0.58641", "0.58235824", "0.58235824", "0.5807127", "0.5805196", "0.573657", "0.5718147", "0.5684801", "0.56715614", "0.563988", "0.5605165", "0.55989695", "0.5595164", "0.55933785", "0.557303", "0.5552002", "0.5544652", "0.5543918", ...
0.0
-1
as seen in : To prevent someone from accidentally instantiating the contract class, give it an empty constructor.
public LogContract(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Contract() {\n }", "private StoneContract() {\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public ContractMethod() {\n }", "public BaseContract() {}", "private CatalogContract() {}", "public Contract() {\n // initialise instance variables\n gener...
[ "0.87095106", "0.8479795", "0.84582895", "0.8385022", "0.8202874", "0.8156671", "0.8035301", "0.8030842", "0.8020866", "0.80008465", "0.7889526", "0.78751326", "0.7853224", "0.7819118", "0.7817783", "0.77587765", "0.77584475", "0.77584475", "0.77534217", "0.77475107", "0.7747...
0.7092714
32
Because the API returns a unix timestamp (measured in seconds), it must be converted to milliseconds in order to be converted to valid date.
public static String getDbDateString(Date date){ SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); return sdf.format(date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }...
[ "0.61039966", "0.60458", "0.60196155", "0.58991104", "0.58914113", "0.58690035", "0.573019", "0.5686542", "0.5660879", "0.5626849", "0.5601367", "0.5594061", "0.55472124", "0.55421567", "0.5529675", "0.55176914", "0.55165005", "0.5514211", "0.55047846", "0.5504351", "0.549557...
0.0
-1
Converts a dateText to a long Unix time representation
public static Date getDateFromDb(String dateText) { SimpleDateFormat dbDateFormat = new SimpleDateFormat(DATE_FORMAT); try { return dbDateFormat.parse(dateText); } catch ( ParseException e ) { e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long DateStringToUnixTimeStamp(String sDateTime) {\n DateFormat formatter;\n Date date = null;\n long unixtime = 0;\n formatter = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n try {\n date = formatter.parse(sDateTime);\n unixtime = date.getTime()...
[ "0.61590976", "0.5890443", "0.5888251", "0.57738763", "0.57632595", "0.5719648", "0.56850785", "0.55365413", "0.5520261", "0.5510672", "0.54839", "0.5482481", "0.54610366", "0.5455942", "0.54348385", "0.53890055", "0.53528166", "0.53193104", "0.5296634", "0.52955717", "0.5284...
0.0
-1
Because the API returns a unix timestamp (measured in seconds), it must be converted to milliseconds in order to be converted to valid date.
public static String getDbDateString(Date date){ SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); return sdf.format(date); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void dateUtilTest() {\n String orgStr = \"2016-01-05 10:00:17\";\n Date orgDate = new Date(1451959217000L);\n Assert.assertTrue(DateStrValueConvert.dateFormat(orgDate).equals(orgStr));\n Assert.assertTrue(DateStrValueConvert.dateConvert(orgStr).equals(orgDate));\n }...
[ "0.6105553", "0.6045479", "0.60206366", "0.58985317", "0.58906037", "0.5867934", "0.57289654", "0.568783", "0.565861", "0.5624976", "0.5600139", "0.559196", "0.554576", "0.55437255", "0.55279255", "0.5518389", "0.5515636", "0.55155975", "0.55064225", "0.55048764", "0.5495291"...
0.0
-1
Generates the database of potions that we will check against when we want to craft. Sorted in highest order
private static void generate_potions_list(File fp) { potions_database = new ArrayList<Potion>(); String line; String[] potion_info; String[] ingredients = new String[2]; //2 ingredients per potion try { Scanner scnr = new Scanner(fp); while(scnr.hasNextLine()) { line = scnr.nextLine(); potion_info = line.split(line,','); ingredients[0] = potion_info[1]; ingredients[1] = potion_info[2]; Potion pot = new Potion(potion_info[0], ingredients, Integer.parseInt(potion_info[3])); potions_database.add(pot); } scnr.close(); } catch(FileNotFoundException e) { System.out.println("The file was not located. Check file name."); } //sort the database by potion value Collections.sort(potions_database, new PotionComparator()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Map getMapPotionIds() {\n/* 350 */ if (mapPotionIds == null) {\n/* */ \n/* 352 */ mapPotionIds = new LinkedHashMap<>();\n/* 353 */ mapPotionIds.put(\"water\", new int[1]);\n/* 354 */ mapPotionIds.put(\"awkward\", new int[] { 16 });\n/* 355 */ mapPotionIds.put(\"...
[ "0.605174", "0.6029654", "0.59874094", "0.58591044", "0.5587478", "0.55364114", "0.5518189", "0.54643446", "0.5448633", "0.54477704", "0.5422069", "0.53608316", "0.5350029", "0.53449005", "0.5325674", "0.53180397", "0.5305522", "0.5289496", "0.52613217", "0.52596146", "0.5246...
0.6095405
0
find the art entry
@Override public void deleteArtById(Long artId) { Art art = artRepository.findById(artId).get(); // now delete it artRepository.delete(art); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ArtifactInfo getArtInfo(String wrksName, String artName) throws CartagoException {\n ICartagoController ctrl = CartagoEnvironment.getInstance().getController( \"/main/\"+wrksName); //.getId().getFullName());\n return ctrl.getArtifactInfo(artName);\n }", "public Artista findArtista(int ...
[ "0.6495936", "0.60553634", "0.58131725", "0.5759642", "0.57171166", "0.5682737", "0.5671012", "0.5597709", "0.54932034", "0.54809904", "0.54197663", "0.5322933", "0.53055876", "0.5304128", "0.5278603", "0.52121633", "0.5188384", "0.5183319", "0.51803374", "0.5152743", "0.5150...
0.0
-1
No cambiar nada de aca hacia abajo
public static void main(String[] args){ Ejercicio4 ejercicio4 = new Ejercicio4(); ArrayList<Integer> resultado = ejercicio4.listaDePrimerosCienPositivos(); for (Integer i = 0; i < resultado.size(); i++) { System.out.println(resultado.get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void verificar_que_se_halla_creado() {\n\t\t\n\...
[ "0.7112022", "0.6651317", "0.66313004", "0.66009706", "0.63892436", "0.62173206", "0.6216086", "0.6176508", "0.6176106", "0.61631644", "0.6158619", "0.61543965", "0.6144344", "0.61095375", "0.6083925", "0.6062488", "0.60508925", "0.6049391", "0.6043135", "0.60263234", "0.6022...
0.0
-1
System.out.println("client read complete"); ctx.pipeline().channel().writeAndFlush("read complete");
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n/* 313 */ processPendingReadCompleteQueue();\n/* 314 */ ctx.fireChannelReadComplete();\n/* */ }", "@Override\n\tpublic void channelReadComplete(ChannelHandlerContext ctx) throws Exception {\n\t}", "@Override\n publi...
[ "0.756757", "0.7342573", "0.72577757", "0.7099754", "0.6997904", "0.68454206", "0.6782052", "0.675481", "0.66265553", "0.66214144", "0.66100264", "0.6569652", "0.6479395", "0.6476147", "0.64033234", "0.6362259", "0.6302461", "0.6241456", "0.6223349", "0.61805236", "0.6170148"...
0.74169964
1
TODO Autogenerated method stub StandAloneDataSource ds = new StandAloneDataSource();
public static void main(String[] args) throws SQLException { StandAloneDataSource ds = new StandAloneDataSource("jdbc:postgresql://localhost:9999/NACID/", "postgres", "postgres"); ApplicationsDB db = new ApplicationsDB(ds, new NomenclaturesDB(ds)); List<PersonRecord> persons = db.selectRecords(SQL, PersonRecord.class); List<CountryRecord> countries = db.selectRecords(CountryRecord.class,null); Map<Integer, CountryRecord> countriesMap = new HashMap<Integer, CountryRecord>(); for (CountryRecord c:countries) { countriesMap.put(c.getId(), c); } Set<Integer> ids = new HashSet<Integer>(); for (PersonRecord p:persons) { List<PersonRecord> personsByCivilIdType = db.selectRecords(PersonRecord.class, "civil_id = ? and civil_id_type = ? order by id", p.getCivilId(), p.getCivilIdType()); for (int i = 0; i < personsByCivilIdType.size(); i++) { PersonRecord pr = personsByCivilIdType.get(i); ids.add(pr.getId()); } } persons = db.selectRecords(PersonRecord.class, "id in ( " + StringUtils.join(ids, ",") + ") order by civil_id, civil_id_type"); for (PersonRecord p:persons) { CountryRecord birthCountry = countriesMap.get(p.getBirthCountryId()); CountryRecord citizenship = countriesMap.get(p.getCitizenshipId()); System.out.println(p.getFName() + "\t" + p.getSName() + "\t" + p.getLName() + "\t" + p.getCivilIdType() + "\t`" + p.getCivilId() + "\t" + (birthCountry == null ? "" : birthCountry.getName()) + "\t" + (citizenship == null ? "" : citizenship.getName()) + "\t" + p.getBirthDate() + "\t" + p.getBirthCity()); } System.out.println(StringUtils.join(persons, "\n")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public void setDataSource(DataSource ds);", "public static DataSource getDs() ...
[ "0.69577026", "0.69577026", "0.69577026", "0.69577026", "0.69577026", "0.69577026", "0.67633057", "0.6557053", "0.6510212", "0.6480676", "0.6410348", "0.6388901", "0.63759995", "0.637339", "0.63723594", "0.63210195", "0.6319749", "0.6266972", "0.6241926", "0.6238306", "0.6236...
0.0
-1
vry6ta PersonRecorda s poveche popylneni danni
private static int getBetterPerson(List<PersonRecord> persons) { Integer bestCnt = 0; Integer result = null; for (PersonRecord p:persons) { int cnt = 0; if (p.getBirthCountryId() != null) { cnt++; } if (!StringUtils.isEmpty(p.getBirthCity())) { cnt++; } if (p.getBirthDate() != null) { cnt++; } if (p.getCitizenshipId() != null) { cnt++; } if (bestCnt < cnt) { bestCnt = cnt; result = p.getId(); } } return result == null ? persons.get(0).getId() : result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int insert(EhrPersonFile record);", "public static void showResultPerson( Result<Record> result){\n \t for (Record r : result) {\n// Integer id = r.getValue(PERSON.PERSO_ID);\n String firstName = r.getValue(PERSON.PERSO_FIRSTNAME);\n String lastName = r.getValue(PERSON.PERSO_LA...
[ "0.60748833", "0.6022963", "0.59399337", "0.5825807", "0.5714433", "0.56989115", "0.5664487", "0.5605862", "0.5601808", "0.5549943", "0.5547185", "0.55447316", "0.5523812", "0.550499", "0.55046886", "0.5496611", "0.5489307", "0.5470829", "0.54305154", "0.54261386", "0.541546"...
0.0
-1
This method create a new Maze3d in a thread. All the mazes saved in an HashMap.
@Override public void generateMaze(String[] arr) { int z = Integer.parseInt(arr[arr.length-1]); int y = Integer.parseInt(arr[arr.length-2]); int x = Integer.parseInt(arr[arr.length-3]); String name = arr[arr.length-4]; Future<Maze3d> fCallMaze = threadpool.submit(new Callable<Maze3d>() { @Override public Maze3d call() throws Exception { MyMaze3dGenerator mg = new MyMaze3dGenerator(x, y, z); Maze3d m = mg.generate(x, y, z); return m; } }); try { hMaze.put(name, fCallMaze.get()); hPosition.put(name, fCallMaze.get().getStart()); } catch (InterruptedException | ExecutionException e) { // TODO Auto-generated catch block e.printStackTrace(); } String[] messege = ("maze is ready:" + name).split(":"); setChanged(); notifyObservers(messege); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Maze3d generate(int x, int y, int z) throws Exception;", "public Maze3d() {\r\n\t\tthis.maze = null;\r\n\t\tthis.startPosition = null;\r\n\t\tthis.goalPosition = null;\r\n\t}", "public Maze3d(int y,int z,int x)\r\n\t{\r\n\t\tthis.maze = new int[y][z][x];\r\n\t\tfor(int i = 0;i<y;i++)\r\n\t\t{\r\n\t\t\tfor(int ...
[ "0.67135483", "0.6428343", "0.5766156", "0.5734004", "0.56560814", "0.56540614", "0.5649824", "0.5627071", "0.5594449", "0.5579036", "0.55371594", "0.5506536", "0.54722965", "0.5461949", "0.5417241", "0.5386068", "0.53835267", "0.53353393", "0.5327652", "0.526096", "0.5240372...
0.63784873
2
This method gets a Maze name and sends the Controller this maze.
@Override public Maze3d sendGame(String arr) { Maze3d temp = hMaze.get(arr); return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showSaveMaze(String message);", "@ConfDisplayName(\"Controller type\")\r\n\t@ConfXMLTag(\"ControllerName\")\r\n\tpublic void setControllerName(String name) {\r\n\t\tcontrollerName = name;\r\n\t\ttry {\r\n\t\t\tcontrollerParams = (ControllerParams) Class.forName(controllerName + \"Params\")\r\n\t\t\t\...
[ "0.56656843", "0.56447446", "0.54570615", "0.54341525", "0.5352988", "0.5297924", "0.52346337", "0.5200623", "0.5184759", "0.5165198", "0.5152394", "0.5139305", "0.5126874", "0.51181245", "0.5048163", "0.5034064", "0.5015893", "0.5008034", "0.50026464", "0.49738023", "0.49652...
0.5153746
10
This method gets a name of a maze and sends the Controller a CrossSection of this maze
@Override public int[][] crossSection(String[] arr) { sb = new StringBuilder(); int i = arr.length - 2; if (arr[i].equals("for")) { for (int j = i + 1; j < arr.length; j++) { sb.append(arr[j]); } } String name = sb.toString(); int index = (arr[--i].charAt(0)) - 48; char crossBy = arr[--i].charAt(0); Maze3d maze = hMaze.get(name); int[][] myMaze = null; switch (crossBy) { case 'x': myMaze = maze.getCrossSectionByX(index); break; case 'X': myMaze = maze.getCrossSectionByX(index); break; case 'y': myMaze = maze.getCrossSectionByY(index); break; case 'Y': myMaze = maze.getCrossSectionByY(index); break; case 'z': myMaze = maze.getCrossSectionByZ(index); break; case 'Z': myMaze = maze.getCrossSectionByZ(index); break; default: setChanged(); notifyObservers("Error, pkease try again"); break; } return myMaze; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void crossBySection(Maze3d maze, String name, int section, char typeSection) {\r\n\t\tif(typeSection=='x')\r\n\t\t\tcontroller.crossSection(maze.getCrossSectionByX(section), typeSection, name , section);\r\n\t\telse if(typeSection=='y')\r\n\t\t\tcontroller.crossSection(maze.getCrossSectionByY...
[ "0.6191518", "0.5306996", "0.5170222", "0.5093175", "0.47945857", "0.47548294", "0.47148532", "0.47028223", "0.46862042", "0.46746853", "0.466227", "0.46563601", "0.46345443", "0.46185338", "0.46074048", "0.45759815", "0.45701718", "0.4559512", "0.45591676", "0.4554196", "0.4...
0.5961889
1
This methods gets a name of a file and a maze and save this maze in the file.
@Override public void save(String[] arr) { String name = arr[arr.length - 2]; String fileName = arr[arr.length - 1]; Maze3d m = hMaze.get(name); try { OutputStream out = new MyCompressorOutputStream(new FileOutputStream(fileName)); out.write(m.toByteArray()); out.close(); setChanged(); notifyObservers("Maze " + name + " is saved"); } catch (FileNotFoundException e) { setChanged(); notifyObservers("Error - the file was not found"); } catch (IOException e) { setChanged(); notifyObservers("Error - IOException"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void saveMaze(Maze3d maze, String name, String fileName) {\r\n\t\tMyCompressorOutputStream outFile;\r\n\t\ttry {\r\n\t\t\toutFile = new MyCompressorOutputStream(new FileOutputStream(fileName));\r\n\t\t\toutFile.write(maze.toByteArray());\r\n\t\t\tmazeInFile.put(fileName, maze);\r\n\t\t\tStrin...
[ "0.76257807", "0.7409893", "0.7164189", "0.6629608", "0.6600325", "0.6361089", "0.63485557", "0.61769223", "0.60781586", "0.60144234", "0.59894586", "0.5958374", "0.59464324", "0.59192324", "0.59014356", "0.5876257", "0.58342487", "0.5801258", "0.57898086", "0.5763266", "0.57...
0.6390727
5
This methods gets a name of a file and a maze and load to the new maze the objects from the file.
@Override public void load(String[] arr) { String name = arr[arr.length - 1]; String fileName = arr[arr.length - 2]; try { byte[] temp = new byte[4096]; InputStream in = new MyDecompressorInputStream(new FileInputStream(fileName)); int numOfBytes = in.read(temp); in.close(); byte[] b = new byte[numOfBytes]; for (int i = 0; i < b.length; i++) { b[i] = temp[i]; } Maze3d maze = new Maze3d(b); hMaze.put(name, maze); setChanged(); notifyObservers(("load:" + name).split(":")); } catch (FileNotFoundException e) { setChanged(); notifyObservers("Error - the file was not found"); } catch (IOException e) { setChanged(); notifyObservers("Error - IOException"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void loadMaze(String name , String fileName) {\r\n\t\tMyDecompressorInputStream inFile;\r\n\t\ttry {\r\n\t\t\tinFile = new MyDecompressorInputStream(new FileInputStream(fileName));\r\n\t\t\tbyte[] b = new byte[4096];\r\n\t\t\tif(mazeInFile.containsKey(fileName)==true)\r\n\t\t\t{\r\n\t\t\t\tif...
[ "0.7469527", "0.73391485", "0.7253838", "0.7230083", "0.7022356", "0.6684308", "0.633532", "0.6295777", "0.61611754", "0.60997236", "0.6093892", "0.6068803", "0.5994388", "0.5858991", "0.58289665", "0.5824283", "0.5798893", "0.5797548", "0.57842237", "0.5736994", "0.572178", ...
0.61912
8
This method gets a name of a maze and solving algorithm and solves it in a Thread. All the solutions saved in an HashMap.
@Override public void solve(String[] arr) { String nameAlg = arr[arr.length - 1]; sb = new StringBuilder(); for (int i = 1; i < arr.length - 1; i++) { sb.append(arr[i]); } String name = sb.toString(); Maze3d tempMaze = hMaze.get(name); if ((hSol.get(tempMaze)) != null) { setChanged(); notifyObservers(("solution:" + name).split(":")); } Future<Solution<Position>> fCallSolution = threadpool.submit(new Callable<Solution<Position>>() { @Override public Solution<Position> call() throws Exception { Maze3d m = hMaze.get(name); SearchableMaze sMaze = new SearchableMaze(m); CommonSearcher<Position> cs; Solution<Position> s = new Solution<Position>(); switch (nameAlg) { case "Astar": cs = new AStar<Position>(new MazeManhattenDistance()); s = cs.search(sMaze); break; case "A*": cs = new AStar<Position>(new MazeManhattenDistance()); s = cs.search(sMaze); break; case "BFS": cs = new BFS<Position>(); s = cs.search(sMaze); break; } return s; } }); try { hSol.put(tempMaze, fCallSolution.get()); } catch (InterruptedException | ExecutionException e) { // TODO Auto-generated catch block e.printStackTrace(); } setChanged(); notifyObservers(("solution:" + name).split(":")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tif(!(mazeCollection.containsKey(paramArray[0])))\n\t\t\t\t{\n\t\t\t\t\tc.passError(\"Maze doesn't exist\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t//if solution for this maze exists\n\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArra...
[ "0.7005381", "0.6989475", "0.6826441", "0.6557097", "0.6064132", "0.58705145", "0.585764", "0.5841978", "0.5733121", "0.56926584", "0.5682686", "0.56279653", "0.5598147", "0.5597694", "0.55857074", "0.5549398", "0.54936665", "0.54843086", "0.5474631", "0.54576707", "0.5453037...
0.7346703
0
This method gets a name of a maze and sends the Controller its solution
@Override public String bringSolution(String arr) { Maze3d maze = hMaze.get(arr); // Solution<Position> s = hSol.get(maze); if (maze != null) { Stack<Position> sol = hSol.get(maze).getSolution(); sb = new StringBuilder(); while (!sol.isEmpty()) { sb.append(sol.pop()); } return sb.toString(); } return "Solution do not exist for " + arr + " maze."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showSolveMaze(String message);", "public void showSaveMaze(String message);", "@Override\r\n public void solveMaze() {\r\n threadPool.execute(() -> {\r\n maze.setStartPotision(new Position(PlayerPositionRow,PlayerPositionCol));\r\n try {\r\n Client cli...
[ "0.6689384", "0.62678945", "0.60871994", "0.6031413", "0.5997019", "0.59813994", "0.5791546", "0.578889", "0.5706313", "0.57023597", "0.564149", "0.56356263", "0.55635816", "0.55309325", "0.5519669", "0.55181587", "0.5505201", "0.5488569", "0.5476537", "0.53858805", "0.537064...
0.48703843
78
This method gets a name of a maze and sends the Controller its size.
@Override public void gameSize(String[] arr) { Maze3d temp = hMaze.get(arr[arr.length - 1]); try { int size = (temp.toByteArray()).length; setChanged(); notifyObservers("Maze " + arr[arr.length - 1] + " size is:" + size); } catch (IOException e) { setChanged(); notifyObservers("Error, please try again"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void mazeSize(Maze3d maze, String name) {\r\n\t\tString s = \"maze size \" + name + \" is \" +(maze.getXSize()*maze.getYSize()*maze.getZSize()*Integer.SIZE)/8+ \" bytes\";\r\n\t\tcontroller.printStr(s);\r\n\t}", "public void showMazeSize(int size);", "public int getMazeSize() \r\n\t{\r\n\...
[ "0.7394036", "0.69591177", "0.6621398", "0.6155274", "0.5680252", "0.53618133", "0.5314807", "0.53121585", "0.5309358", "0.5307754", "0.5233285", "0.5220144", "0.52169144", "0.5204305", "0.5173019", "0.5151789", "0.51318336", "0.5109474", "0.51001847", "0.5093619", "0.5086027...
0.60320705
4
This method gets a name of a file and sends the Controller its size.
@Override public void fileSize(String[] arr) { File f = new File(arr[arr.length - 1]); if (f.exists()) { long size = f.length(); setChanged(); notifyObservers("File " + arr[arr.length - 1] + " size is:" + size); } else { setChanged(); notifyObservers("Error, please try again"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public void sendFile(Type type, String file_name) {\n try {\n // Use this for reading the data.\n byte[] buffer = new byte[1000];\n\n FileInputStream inputStream = new FileInputStream(file_name);\n\n ...
[ "0.650571", "0.63269675", "0.6233396", "0.6185871", "0.6162264", "0.6107462", "0.60640025", "0.60616976", "0.60066074", "0.60066074", "0.595929", "0.59545636", "0.5949567", "0.59438217", "0.59293866", "0.5910297", "0.58839643", "0.58839643", "0.588236", "0.58569866", "0.58462...
0.5839288
21
This method closes all the open threads.
@Override public void close() { saveZip(); setChanged(); notifyObservers("shutting down"); threadpool.shutdown(); // wait 10 seconds over and over again until all running jobs have // finished try { boolean allTasksCompleted = false; while (!(allTasksCompleted = threadpool.awaitTermination(10, TimeUnit.SECONDS))) ; setChanged(); notifyObservers("Server is safely closed"); } catch (InterruptedException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void close() {\n \t\trecallThreads();\n \n \t\tsetSize(0, 0);\n \t\t/* Notify everyone waiting for a thread */\n \t\tnotifyAll();\n \n \t\t// destroy the threadgroup, will never go away otherwise\n \t\ttry {\n \t\t\t// Need to set it to a daemon first otherwise it will not be destroyed\n \t\t\t...
[ "0.7680657", "0.73358303", "0.73032665", "0.72602147", "0.71618384", "0.7155211", "0.71489567", "0.71380055", "0.71094674", "0.70138264", "0.6960197", "0.690669", "0.68966985", "0.6877409", "0.68235904", "0.67984456", "0.6763743", "0.674351", "0.6739612", "0.6739612", "0.6728...
0.62685287
63
TODO Autogenerated method stub
@Override public void dirToPath(String[] arr) { }
{ "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
this method is used to parse response from api response to weather wrapper object
public static WeatherWrapper parseJsonToWeatherWrapper(HashMap<String, Object> json) { WeatherWrapper weatherWrapper = new WeatherWrapper(); HashMap<String, Object> main = (HashMap<String, Object>) json.get("main"); HashMap<String, Object> wind = (HashMap<String, Object>) json.get("wind"); List<Object> info = (List<Object>) json.get("weather"); HashMap<String, Object> todayInfo = (HashMap<String, Object>) info.get(0); weatherWrapper.setDate(json.get("dt_txt").toString().split(" ")[0]); weatherWrapper.setDescription(todayInfo.get("description").toString()); weatherWrapper.setHumidity((Integer) main.get("humidity")); weatherWrapper.setIcon(todayInfo.get("icon").toString()); weatherWrapper.setMaxTemp((Double) main.get("temp_max")); weatherWrapper.setMinTemp(Double.parseDouble( main.get("temp_min").toString())); weatherWrapper.setTemp((Double) main.get("temp")); weatherWrapper.setPressure((Double) main.get("pressure")); weatherWrapper.setWindSpeed((Double) wind.get("speed")); return weatherWrapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WeatherInfo extractWeather(String response) {\n JsonParser parser = new JsonParser();\n JsonElement jsonElement = parser.parse(response);\n JsonObject rootObject = jsonElement.getAsJsonObject();\n JsonObject location = rootObject.getAsJsonObject(\"location\");\n String city = location....
[ "0.79431087", "0.69692284", "0.6846212", "0.6816409", "0.67907345", "0.67644", "0.66846", "0.6651625", "0.65819865", "0.63610995", "0.6222692", "0.6217135", "0.61947423", "0.61532366", "0.61436206", "0.6097976", "0.60472363", "0.60052156", "0.6003758", "0.5997044", "0.5971405...
0.62572265
10
Created by vasilievalexey on 19.01.17.
@Repository @Transactional(propagation = Propagation.REQUIRED) public interface AccountCalendarService extends AbstractEntityService<AccountCalendar> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final voi...
[ "0.58263385", "0.56136465", "0.55574447", "0.55228233", "0.5500957", "0.5454216", "0.545313", "0.54502445", "0.54502445", "0.54291815", "0.5425874", "0.5402507", "0.5373406", "0.5366869", "0.53644896", "0.53493303", "0.53291106", "0.53191394", "0.5291898", "0.52784216", "0.52...
0.0
-1
System.out.println("students in period: " + students); System.out.println("students to remove:" + toRemove);
public void removeStudents(ArrayList<String> toRemove) { for (int i=0; i<toRemove.size(); i++) { if (students.indexOf(toRemove.get(i)) != -1) { System.out.println("Removing " + toRemove.get(i) + " from " + day + " " + time); students.remove(toRemove.get(i)); } } //System.out.println("students left: " + students + "\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String remove(Student s) {\r\n\t\t\r\n\t\tString removeString = new String(\"\");\r\n\t\t\r\n\t\t if (isEmpty()) {\r\n\t\t\t System.out.println(\"\\nList is empty!\");\r\n\t\t\t removeString = removeString + \"\\nList is empty!\";\r\n\t\t\t return removeString;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t ...
[ "0.6965904", "0.67725515", "0.646089", "0.6322932", "0.62941897", "0.62891203", "0.6224841", "0.6200626", "0.6066694", "0.60611993", "0.59571683", "0.5943794", "0.5911383", "0.5891943", "0.58872604", "0.5874692", "0.58525616", "0.5784682", "0.57735205", "0.57464486", "0.57265...
0.75767714
0
Created by dell on 2017/3/23.
public interface User_data extends Logic{ UserPO signUp(UserPO userInfo); UserPO login(UserPO userInfo); UserPO modify(UserPO userInfo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void bi...
[ "0.5978645", "0.5919283", "0.57286847", "0.5728119", "0.56545955", "0.56371313", "0.56329596", "0.56329596", "0.5630401", "0.5592748", "0.55742764", "0.55684245", "0.55582035", "0.55395615", "0.553723", "0.5529104", "0.5524308", "0.5514976", "0.5514976", "0.5514976", "0.55149...
0.0
-1
Returns a new instance of the defined analyzer.
abstract CharArraySet build();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SELF the_analyzer_is_instantiated() {\n analyzer = builder.build();\n return self();\n }", "private Analyzer getAnaLyzer() {\n\n\t\tif (this.analyzer.equals(\"KeywordAnalyzer\")) {\n\n\t\t\treturn new KeywordAnalyzer();\n\t\t}\n\n\t\telse if (this.analyzer.equals(\"SimpleAnalyzer\")) {\n\n\t\t\tret...
[ "0.82189673", "0.7478342", "0.6993349", "0.68814343", "0.6674498", "0.6512994", "0.6399485", "0.6327759", "0.63034207", "0.6258139", "0.62560487", "0.62449944", "0.6223186", "0.6219972", "0.6201863", "0.6163611", "0.6156107", "0.6006615", "0.5996161", "0.59591573", "0.594927"...
0.0
-1
Returns the analyzer stopwords defined by this.
public CharArraySet get() { return build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<String> getStopwords() {\n return stopwords;\n }", "@Override\r\n\t\t\tpublic Set<String> getStopWords() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Term[] getStopWords() {\n List<Term> allStopWords = new ArrayList<Term>();\n for (String fieldName : stopWordsPerField.keySet()) {\n Se...
[ "0.7852065", "0.73653275", "0.6958524", "0.6866883", "0.6567609", "0.6508823", "0.64267087", "0.6304177", "0.6292973", "0.6249168", "0.62200963", "0.60321265", "0.6028901", "0.6008584", "0.59925944", "0.5940253", "0.59315455", "0.58957744", "0.5860364", "0.5829399", "0.577778...
0.0
-1
TODO Autogenerated method stub
@Override public void complete(int num) { try { FileOutputStream fo = new FileOutputStream(fileName); BufferedOutputStream bo = new BufferedOutputStream(fo); ObjectOutputStream out = new ObjectOutputStream(bo); for(Order rs : ord) { if (rs.getNum()==num) { ord.remove(rs); break; } } out.writeObject(ord); out.flush(); out.close(); } catch(IOException e) { } }
{ "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
Creates a new stack aware method visitor.
protected StackAwareMethodVisitor(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) { super(OpenedClassReader.ASM_API, methodVisitor); current = new ArrayList<StackSize>(); sizes = new HashMap<Label, List<StackSize>>(); freeIndex = instrumentedMethod.getStackSize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static MethodVisitor of(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) {\n return UNADJUSTED\n ? methodVisitor\n : new StackAwareMethodVisitor(methodVisitor, instrumentedMethod);\n }", "public static MethodCallExpression accept(ExpressionVisitor ...
[ "0.66285604", "0.5707205", "0.564046", "0.5518422", "0.5324973", "0.5317314", "0.52997494", "0.5283804", "0.5217018", "0.5176074", "0.51687723", "0.51687723", "0.50801927", "0.50701225", "0.50412995", "0.502334", "0.49684158", "0.49285144", "0.49204028", "0.49160677", "0.4879...
0.6223714
1
Wraps the provided method visitor within a stack aware method visitor.
public static MethodVisitor of(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) { return UNADJUSTED ? methodVisitor : new StackAwareMethodVisitor(methodVisitor, instrumentedMethod); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected StackAwareMethodVisitor(MethodVisitor methodVisitor, MethodDescription instrumentedMethod) {\n super(OpenedClassReader.ASM_API, methodVisitor);\n current = new ArrayList<StackSize>();\n sizes = new HashMap<Label, List<StackSize>>();\n freeIndex = instrumentedMethod.getStackSiz...
[ "0.63366073", "0.61696446", "0.59131277", "0.57691675", "0.5649219", "0.5586645", "0.5514056", "0.54479825", "0.532374", "0.52569747", "0.5089418", "0.5033385", "0.49435684", "0.49264464", "0.49157056", "0.49148", "0.4910973", "0.4894807", "0.48838192", "0.48642954", "0.48507...
0.65855265
0
Pops all values currently on the stack.
public void drainStack() { doDrain(current); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public void popAll() {\n\n top = null;\n }", "public void popAll()\r\n {\n this.top = null;\r\n }", "private void pop() {\r\n pop( false );\r\n }", "public void clear() {\n ...
[ "0.81260896", "0.7889721", "0.7882252", "0.7367225", "0.7145996", "0.71268153", "0.6864158", "0.6802623", "0.67696613", "0.67458457", "0.6712928", "0.6701335", "0.66829705", "0.66527385", "0.6645709", "0.66384375", "0.65877944", "0.65630287", "0.6561004", "0.6532572", "0.6528...
0.0
-1
Drains the stack to only contain the top value. For this, the value on top of the stack is temporarily stored in the local variable array until all values on the stack are popped off. Subsequently, the top value is pushed back onto the operand stack.
public int drainStack(int store, int load, StackSize size) { if (current.isEmpty()) { return 0; } int difference = current.get(current.size() - 1).getSize() - size.getSize(); if (current.size() == 1 && difference == 0) { return 0; } else { super.visitVarInsn(store, freeIndex); if (difference == 1) { super.visitInsn(Opcodes.POP); } else if (difference != 0) { throw new IllegalStateException("Unexpected remainder on the operand stack: " + difference); } doDrain(current.subList(0, current.size() - 1)); super.visitVarInsn(load, freeIndex); return freeIndex + size.getSize(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int stackTop() {\r\n\t return array[top];\r\n\t }", "Stack_Using_Arrays(){\n\t\ttop=-1;\n\t}", "public void peekStack() {\n\n\t\tSystem.out.println(\"The Peek value is: \" + arrayValues[topOfStack]);\n\n\t}", "private void topEval(Stack<Operator> pOperatorStack, Stack<Operand> pOperandStack) {\n ...
[ "0.6568665", "0.64020675", "0.62322205", "0.6203728", "0.6068678", "0.6045396", "0.603682", "0.60044247", "0.5901221", "0.5879303", "0.5760112", "0.57406694", "0.5720032", "0.5708569", "0.56988835", "0.56973416", "0.56760174", "0.56618387", "0.56454676", "0.564222", "0.563865...
0.0
-1
Drains all supplied elements of the operand stack.
private void doDrain(List<StackSize> stackSizes) { ListIterator<StackSize> iterator = stackSizes.listIterator(stackSizes.size()); while (iterator.hasPrevious()) { StackSize current = iterator.previous(); switch (current) { case SINGLE: super.visitInsn(Opcodes.POP); break; case DOUBLE: super.visitInsn(Opcodes.POP2); break; default: throw new IllegalStateException("Unexpected stack size: " + current); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings({\"unchecked\"})\n private void expandStack() {\n T[] newStack;\n \n newStack = (T[]) new Object[Array.getLength(this.elements) + 1];\n for( int i = 0; i < Array.getLength(this.elements); i++ )\n newStack[i] = this.elements[i];\n this.elements = newStack;\n }", "public...
[ "0.6522491", "0.62502956", "0.60678434", "0.6066133", "0.59351575", "0.58398205", "0.5820802", "0.5808289", "0.5805567", "0.5805318", "0.580361", "0.5794773", "0.57156354", "0.5699843", "0.5638138", "0.5633219", "0.56029624", "0.5564721", "0.5538286", "0.5488251", "0.54562116...
0.53641075
24
Explicitly registers a label to define a given stack state.
public void register(Label label, List<StackSize> stackSizes) { sizes.put(label, stackSizes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Code addLabel(String label);", "void setLabel(Label label);", "void setLabel(String label);", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t...
[ "0.6559084", "0.6244613", "0.6092356", "0.60115004", "0.5947", "0.5947", "0.59097934", "0.5889872", "0.5886366", "0.58324754", "0.58212185", "0.5796299", "0.57922643", "0.57658803", "0.57580537", "0.57575744", "0.57065153", "0.56991374", "0.56985515", "0.5689579", "0.56892693...
0.6328259
1
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Enter the starting limit:"); Scanner in=new Scanner(System.in); int a=in.nextInt(); System.out.println("Enter the end limit:"); int b=in.nextInt(); for(int i=a;i<=b;i++) { if(i%2!=0) { System.out.println("\n"+i); } } }
{ "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
life cycle of javaFX "initstartstop" but still main method is executed first as soon as the application starts
@Override public void init() throws Exception { //the code present in this method is executed as soon as the application loads that is even before it starts super.init(); //super keyword invokes the init methods as per the definition in the Application class }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start(Stage mainStage) {\r\n\t\t\r\n\t}", "public void start(Stage mainStage) {\n\t\t\n\t}", "@Test\n public void testStart() throws InterruptedException {\n Thread thread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n new JFXPanel...
[ "0.7317487", "0.7315915", "0.69787496", "0.69499844", "0.6862125", "0.68112236", "0.6748352", "0.667512", "0.66695535", "0.66028565", "0.6585291", "0.6550578", "0.6547802", "0.6525426", "0.65205157", "0.65147054", "0.6484991", "0.6474657", "0.64491796", "0.64312017", "0.64199...
0.0
-1
/makes application visible to user ,it is the abstract method of Applications class which in must in order to execute the application In laymen terms Stage is the complete window that pops up in front of the user as soon as the application starts,the window alongwith the minimize maximize and close buttons while scene is the part of stage other than the top bar containing the three buttons. scene is the part which can show some dynamic stuff.
@Override public void start(Stage primaryStage) throws Exception { FXMLLoader loader = new FXMLLoader(getClass().getResource("app_layout.fxml")); VBox rootNode = loader.load(); Scene scene = new Scene(rootNode); Pane menuPane= (Pane) rootNode.getChildren().get(0); menuPane.getChildren().add(createMenubar()); primaryStage.setScene(scene); primaryStage.setTitle("Temperature Convertor"); //primaryStage.setResizable(false); to make sure application is not resizable primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "@Override\n public void start(Stage stage) throws Exception \n {\n ...
[ "0.7200576", "0.70560795", "0.6981224", "0.6911657", "0.6910365", "0.6824429", "0.67995584", "0.67971057", "0.6770627", "0.6746829", "0.67288893", "0.67184764", "0.6697753", "0.66914517", "0.66681194", "0.66656584", "0.663703", "0.6608488", "0.65922517", "0.65841925", "0.6548...
0.0
-1
creating a dilague box through menu
public static void aboutApp(){ Alert alertDialog = new Alert(Alert.AlertType.INFORMATION); alertDialog.setTitle("My first java Desktop App"); alertDialog.setHeaderText("Learning JavaFX"); alertDialog.setContentText("I'm a beginner and soon i'll be a pro"); //to make custom buttons ButtonType yesBtn = new ButtonType("yes"); ButtonType noBtn = new ButtonType("No"); alertDialog.getButtonTypes().setAll(yesBtn,noBtn); //to perform click event on buttons of the dilague box that opens and make buttons Optional<ButtonType> clickBtn=alertDialog.showAndWait(); if(clickBtn.isPresent()&&clickBtn.get()==yesBtn){ // code ....... } if(clickBtn.get()==noBtn){ //code.......... } alertDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menu() {\n\t\tsuper.menu();\n\n\t\tfor(JCheckBox cb : arrayCompo){\n\t\t\tcb.setPreferredSize(new Dimension(largeur-30, hauteur));\n\t\t\tgbc.gridy++;\n\t\t\tpan.add(cb, gbc);\n\t\t}\n\t}", "void createMenus(Container cp) {\r\n createMenu4Shape(cp);\r\n createMenu4Color(cp);\r\n createMenu4F...
[ "0.6614542", "0.6313083", "0.6249762", "0.6225934", "0.62112826", "0.6209257", "0.620634", "0.62042826", "0.6196171", "0.61828715", "0.6168852", "0.6152798", "0.6151218", "0.6145503", "0.6141352", "0.61258656", "0.61242646", "0.60645545", "0.603843", "0.6035456", "0.6033839",...
0.0
-1
called and after some time application shuts down
@Override public void stop() throws Exception { super.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void abnormalShutDown() {\n\t}", "@Override\n protected void shutDown() {\n }", "@Override\n public void onTerminate() {\n Log.i(\"Application\", \"application destory\");\n if (MySocket.getInstance().getConnected()) {\n MySocket.getInstance().stop();\n DataM...
[ "0.7626191", "0.7206557", "0.71702963", "0.71451086", "0.70661217", "0.7057632", "0.7054309", "0.70152855", "0.6938766", "0.69303876", "0.69214284", "0.6897661", "0.6890205", "0.68879086", "0.6882171", "0.68646747", "0.68480116", "0.6833639", "0.68226874", "0.681736", "0.6816...
0.0
-1
Create an input stream of characters for the lexer.
public static void main(String[] args) throws Exception { if (args.length > 0) { // The last command line arg is the source file name String inputFile = args[args.length - 1]; InputStream is = new FileInputStream(inputFile); CharStream input = CharStreams.fromStream(is); // Create the lexer and parser objects and a token stream "pipe" between them BantamJavaLexer lexer = new BantamJavaLexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); BantamJavaParser parser = new BantamJavaParser(tokens); // Launch the parser // https://github.com/antlr/antlr4/blob/master/doc/listeners.md BantamJavaParser.ProgramContext tree = parser.program(); ParserListener listener = new ParserListener(); ParseTreeWalker.DEFAULT.walk(listener, tree); // initiate walk of tree with listener in use of default walker ErrorReporter reporter = new ErrorReporter(); // BantamJavaVisitor semantics = new SemanticAnalyzer(listener.getGlobalScope()); BantamJavaVisitor semantics1 = new SemanticAnalyzer(reporter); semantics1.visit(tree); BantamJavaVisitor semantics2 = new SemanticAnalyzer2(reporter); semantics2.visit(tree); // Print the parse tree System.out.println(tree.toStringTree(parser)); // print tree as text <label id="code.tour.main.7"/> if (reporter.getErrorCount() == 0) { BantamJavaVisitor codeGen = new CodeGenerator(reporter); codeGen.visit(tree); } } else { System.err.println("ERROR: No source file specified."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public AbstractDecaLexer(CharStream input) {\n super(input);\n removeErrorListeners();\n addErrorListener(new DecacErrorListner(input));\n }", "public Lexer(java.io....
[ "0.6199458", "0.6199458", "0.6083099", "0.60710156", "0.5946207", "0.5915793", "0.5894259", "0.58418834", "0.5816819", "0.58149594", "0.5775669", "0.5760909", "0.5755862", "0.56768936", "0.5667438", "0.5636636", "0.5612054", "0.5595644", "0.55944353", "0.55918103", "0.5589559...
0.0
-1
TODO sanitize entries... if "asdsad'; drop table all;" I'm screwed.
static private void registerLogin(String username, String ip, String agent, boolean success) { String query = "INSERT INTO user_login_attempts VALUES "; query += "(NOW(),'" + username + "','" + ip + "'," + success + ",'" + agent + "');"; // TODO add proper error handling Database.execute(query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void adm1() {\n\t\ttry { // Delete all table contents\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeQuery(\"delete from PLANE\");\n\t\t\tstatement.executeQuery(\"delete from FLIGHT\");\n\t\t\tstatement.executeQuery(\"delete from PRICE\");\n\t\t\tstatement.executeQuery(\"delete fro...
[ "0.61814857", "0.5796859", "0.5722591", "0.5672844", "0.56503737", "0.56500316", "0.5631807", "0.5630096", "0.5617719", "0.560019", "0.5591782", "0.5588722", "0.55862504", "0.557986", "0.55737126", "0.5572161", "0.555685", "0.55557203", "0.55507904", "0.55313426", "0.5521455"...
0.0
-1
TODO sanitize entries... if "asdsad'; drop table all;" I'm screwed.
static public Session makeLogin(String username, String password, HttpServletRequest request) { Session session = null; boolean success = false; try { String query = "SELECT username,password FROM user WHERE username='" + username + "';"; ResultSet results = Database.query(query); //FIXME NPE results.next(); //TODO reference to column names into constants String db_pass = results.getString("password"); if (db_pass.compareTo(password) == 0) { session = SessionServer.createSession(results.getString("username")); success = true; } registerLogin(results.getString("username"), request.getRemoteAddr(), request.getHeader("User-Agent"), success); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } // TODO add proper error handling return session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void adm1() {\n\t\ttry { // Delete all table contents\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeQuery(\"delete from PLANE\");\n\t\t\tstatement.executeQuery(\"delete from FLIGHT\");\n\t\t\tstatement.executeQuery(\"delete from PRICE\");\n\t\t\tstatement.executeQuery(\"delete fro...
[ "0.6179571", "0.5794705", "0.5722781", "0.5672859", "0.5650813", "0.56480646", "0.56311035", "0.56307995", "0.5619022", "0.56010056", "0.55918103", "0.55884415", "0.5585532", "0.5580168", "0.55733335", "0.55732214", "0.5556597", "0.55554074", "0.55513173", "0.55319387", "0.55...
0.0
-1
public void sendEvent(RemoteDesktopInt client) throws RemoteException; public Dimension getPanelSize();
public void mouseMoved(MouseEvent e,double w,double h) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Dimension getSize() \n\t{\n\t\treturn panel.getSize();\n\t}", "@Override\n public Dimension getPreferredSize() {\n final Dimension size;\n synchronized (getDelegateLock()) {\n size = getDelegate().getPreferredSize();\n }\n return validateSize(size);\n...
[ "0.68272126", "0.6294779", "0.6199089", "0.6196817", "0.6170644", "0.6087154", "0.6070418", "0.5996411", "0.59944457", "0.59841794", "0.5920296", "0.59162796", "0.59157795", "0.59157795", "0.5893972", "0.58489025", "0.5837088", "0.5814938", "0.5788362", "0.5753406", "0.572064...
0.0
-1
amount ;order_no ; plat_num ; app_id ; sign_type ; pay_type ; status ; back_status ; complete_time
@Override protected String buildPaySign(Map<String, String> api_response_params, String api_key) throws PayException { Map<String,String > params = new LinkedHashMap<>(); params.put(amount ,api_response_params.get(amount)); params.put(order_no ,api_response_params.get(order_no)); params.put(plat_num ,api_response_params.get(plat_num)); params.put(app_id ,api_response_params.get(app_id)); params.put(sign_type ,api_response_params.get(sign_type)); params.put(pay_type ,api_response_params.get(pay_type)); params.put(status ,api_response_params.get(status)); params.put(back_status ,api_response_params.get(back_status)); params.put(complete_time ,api_response_params.get(complete_time)); String signMd5 = JSON.toJSONString(params); log.debug("[酷狗支付]-[响应支付]-2.生成加密URL签名完成:{}", JSON.toJSONString(signMd5) ); return signMd5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(...
[ "0.5668856", "0.55727804", "0.5556569", "0.55469185", "0.553968", "0.551482", "0.5337159", "0.533124", "0.53063244", "0.52827096", "0.5258654", "0.5250302", "0.52320683", "0.5211949", "0.51855", "0.514817", "0.5144526", "0.5142225", "0.5131404", "0.5130475", "0.5127321", "0...
0.0
-1
:( Parsing error. Please contact me.
static Bitmap decodeStream(InputStream p1, Request p2) throws IOException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BNGLError parseError(String s)\n\t{\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\t// get the line number\n\t\tint line = Integer.parseInt(s.substring(0, s.indexOf(\":\")));\n\t\t\n\t\t// chomp \"12:2 \"\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\treturn new BNGLError(m_file, line ...
[ "0.6418416", "0.60860413", "0.59714735", "0.5935439", "0.5889681", "0.5820116", "0.5734217", "0.5711125", "0.56676733", "0.56676733", "0.5648604", "0.5629797", "0.55470836", "0.5507803", "0.5497096", "0.5490831", "0.5481413", "0.5449079", "0.5440948", "0.5416957", "0.5410751"...
0.0
-1
:( Parsing error. Please contact me.
public void run() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BNGLError parseError(String s)\n\t{\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\t// get the line number\n\t\tint line = Integer.parseInt(s.substring(0, s.indexOf(\":\")));\n\t\t\n\t\t// chomp \"12:2 \"\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\treturn new BNGLError(m_file, line ...
[ "0.64187706", "0.60862154", "0.597159", "0.5935453", "0.58900476", "0.5820418", "0.57346755", "0.57116437", "0.56673217", "0.56673217", "0.5648901", "0.5629923", "0.5547114", "0.5507725", "0.54975104", "0.54904187", "0.54813343", "0.5449003", "0.54415005", "0.5417867", "0.541...
0.0
-1
:( Parsing error. Please contact me.
void attach(Action p1) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BNGLError parseError(String s)\n\t{\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\t// get the line number\n\t\tint line = Integer.parseInt(s.substring(0, s.indexOf(\":\")));\n\t\t\n\t\t// chomp \"12:2 \"\n\t\ts = s.substring(s.indexOf(\" \")).trim();\n\t\t\n\t\treturn new BNGLError(m_file, line ...
[ "0.6418416", "0.60860413", "0.59714735", "0.5935439", "0.5889681", "0.5820116", "0.5734217", "0.5711125", "0.56676733", "0.56676733", "0.5648604", "0.5629797", "0.55470836", "0.5507803", "0.5497096", "0.5490831", "0.5481413", "0.5449079", "0.5440948", "0.5416957", "0.5410751"...
0.0
-1
/ Tests corner cases of index in edit item
@Test public void TestEditOne(){ ArrayList<Task> listToEdit = new ArrayList<Task>(); ArrayList<Integer> indexList = new ArrayList<Integer>(); String message; indexList.add(3); listToEdit.add(new Task("New item 99")); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Error: There is no item at this index.", message); assertEquals("Item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("Item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("Item 3", logicObject.listOfTasks.get(2).getName()); indexList.clear(); indexList.add(2); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Item(s) successfully edited.", message); assertEquals("Item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("Item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("New item 99", logicObject.listOfTasks.get(2).getName()); indexList.clear(); indexList.add(-1); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Error: There is no item at this index.", message); assertEquals("Item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("Item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("New item 99", logicObject.listOfTasks.get(2).getName()); indexList.clear(); indexList.add(-2); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Error: There is no item at this index.", message); assertEquals("Item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("Item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("New item 99", logicObject.listOfTasks.get(2).getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void editItem();", "@Test\n public void execute_invalidContactIndexFilteredList_editFailure() {\n // update Contact filtered list to contain only a single Contact\n showContactAtIndex(model, INDEX_FIRST_CONTACT);\n\n Index outOfBoundIndex = INDEX_SECOND_CONTACT;\n\n ...
[ "0.7021501", "0.69695526", "0.6488812", "0.6463161", "0.63517874", "0.6334218", "0.62853587", "0.6201261", "0.6190229", "0.6163185", "0.61368084", "0.61120236", "0.61031675", "0.6080877", "0.60144335", "0.5998351", "0.59876376", "0.5919396", "0.59170204", "0.5915859", "0.5911...
0.67234373
2
/ Tests editing normal values multiple times
@Test public void TestEditTwo(){ ArrayList<Task> listToEdit = new ArrayList<Task>(); ArrayList<Integer> indexList = new ArrayList<Integer>(); String message; indexList.add(0); listToEdit.add(new Task("New item 1")); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Item(s) successfully edited.", message); assertEquals("New item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("Item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("Item 3", logicObject.listOfTasks.get(2).getName()); indexList.clear(); listToEdit.clear(); indexList.add(1); listToEdit.add(new Task("New item 2")); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Item(s) successfully edited.", message); assertEquals("New item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("New item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("Item 3", logicObject.listOfTasks.get(2).getName()); indexList.clear(); listToEdit.clear(); indexList.add(2); listToEdit.add(new Task("New item 3")); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Item(s) successfully edited.", message); assertEquals("New item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("New item 2", logicObject.listOfTasks.get(1).getName()); assertEquals("New item 3", logicObject.listOfTasks.get(2).getName()); indexList.clear(); logicObject.showUpdatedItems(); listToEdit.clear(); indexList.add(1); listToEdit.add(new Task("item 2 changed again!")); message = logicObject.editItem(listToEdit, indexList, true, true); assertEquals("Item(s) successfully edited.", message); assertEquals("New item 1", logicObject.listOfTasks.get(0).getName()); assertEquals("item 2 changed again!", logicObject.listOfTasks.get(1).getName()); assertEquals("New item 3", logicObject.listOfTasks.get(2).getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_...
[ "0.61002594", "0.6044706", "0.6044321", "0.6034754", "0.5988404", "0.59842443", "0.59832716", "0.59665483", "0.58701736", "0.57747513", "0.5748071", "0.5708065", "0.5675738", "0.56732804", "0.5629244", "0.56268996", "0.5611668", "0.5610197", "0.5597103", "0.5589802", "0.55785...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseReleased(MouseEvent e) { }
{ "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
TODO Autogenerated method stub
@Override public void mouseExited(MouseEvent e) { }
{ "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
TODO Autogenerated method stub
@Override public void mouseEntered(MouseEvent e) { }
{ "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
FIND REVIEWER BY ID
@Query(value = "SELECT * FROM reviewer WHERE reviewer_id =?", nativeQuery = true) public Reviewer getReviewerById(@Param("reviewerId") Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Researcher getResearcherByID(int id);", "public Ramen getRamen(String id){\n return ramenRepository.findOne(id);\r\n }", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "Movie findOne(@Param(\"id\") Long id);", "@Override\n public Movie getFromId (Integer id) {re...
[ "0.64406884", "0.62218887", "0.6219472", "0.61428034", "0.61360687", "0.6072639", "0.5983868", "0.59333104", "0.59299344", "0.59224355", "0.59017766", "0.5899474", "0.58853954", "0.5851043", "0.58411545", "0.58224463", "0.5793541", "0.5783471", "0.57724005", "0.5763336", "0.5...
0.584822
14
/ Assume this is the verification normal alphabets look for comment
public boolean isAlienSorted(String[] words, String order) { int t[] = new int[26]; for (int i = 0; i < order.length(); i++) { t[order.charAt(i) - 'a'] = i; } for (int i = 0; i < words.length - 1; i++) { if (!isSorted(words[i], words[i + 1], t)) return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract char getCommentChar();", "@Test\n public void wrongCommentMatch() {\n comment.match(\"jhadj //kasf \");\n assertEquals(null, comment.getToken());\n }", "private void scanComment(LocatedChar ch) {\n\t\tch = input.next();\n\t\twhile(!ch.matchChar('%') && !ch.matchChar('\\n')) ...
[ "0.65974873", "0.656374", "0.64756954", "0.64000344", "0.6236546", "0.6200082", "0.61248934", "0.60577464", "0.60191137", "0.59790355", "0.5960439", "0.59338737", "0.589303", "0.58716", "0.5845794", "0.584169", "0.584034", "0.582334", "0.5756476", "0.5748097", "0.5744854", ...
0.0
-1
Constructor for objects of class LabyrinthComputerPlayer1
public LabyrinthComputerPlayer2(String name) { // invoke superclass constructor super(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }", "public computerPlayer(Player player) {\n\t\tsuper(player);\n\t\t\n\t}", "protected Computer(String playerName) {\n super(playerName);\n }", "public Com...
[ "0.8207807", "0.74502045", "0.7377051", "0.73284173", "0.72735906", "0.7233775", "0.7147076", "0.7141896", "0.7126375", "0.70622516", "0.7031026", "0.7021761", "0.7021761", "0.7021668", "0.70173246", "0.7016663", "0.70148575", "0.70025766", "0.698726", "0.6963341", "0.6963341...
0.82408047
0
callback methodgame's state has changed
@Override protected void receiveInfo(GameInfo info) { // ignore the message if it's not a LabyrinthState message if (info instanceof LabyrinthGameState) { this.state = (LabyrinthGameState) info; } if (state.getPlayerTurn().ordinal() == playerNum) { if (this.queue.size() > 0) { try { Thread.sleep(250); } catch (Exception e) { } this.game.sendAction(this.pull()); } else if (info instanceof LabyrinthGameState) { this.state = (LabyrinthGameState) info; this.calculateActions(); this.game.sendAction(this.pull()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void stateChanged( final GameState oldState, final GameState newState );", "@Override\r\n\tpublic void updateGameFinished() {\n\t\t\r\n\t}", "public abstract void stateChanged(STATE state);", "public void updateState();", "public boolean isGameChanged() {\n return gameChanged;\n }", "public abs...
[ "0.72188216", "0.6874764", "0.6833829", "0.68028444", "0.67752385", "0.6750418", "0.67397326", "0.66792285", "0.66753155", "0.66581345", "0.6644982", "0.66448843", "0.66179234", "0.65836173", "0.6555959", "0.65063554", "0.6496246", "0.64771706", "0.64690804", "0.64469", "0.64...
0.0
-1
Run method for the threads that are spawned to calculate AI possible moves, a new thread is spawned after each current tile rotation
public void run() { //Start the root of the tree that will hold all possible AI moves AINode root = new AINode(this.state); //make all 4 possible rotations of the current tile //and spawn a thread to calculate the rest of the //possible move actions switch (this.possibleRotation) { case 0: this.possibleRotation++; Thread instance2 = new Thread(this); instance2.start(); this.generateMoves(root, 0); try { instance2.join(); } catch (InterruptedException e) { } break; case 1: this.possibleRotation++; Thread instance3 = new Thread(this); instance3.start(); this.generateMoves(root, 1); try { instance3.join(); } catch (InterruptedException e) { } break; case 2: this.possibleRotation++; Thread instance4 = new Thread(this); instance4.start(); this.generateMoves(root, 2); try { instance4.join(); } catch (InterruptedException e) { } break; case 3: this.generateMoves(root, 3); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculateActions() {\n\n //Generate All Possible Moves In Tree\n this.possibleMoves.clear();\n this.possibleRotation = 0;\n Thread instance = new Thread(this);\n instance.start();\n try {\n instance.join();\n } catch (InterruptedException e) ...
[ "0.6861531", "0.66742015", "0.6634285", "0.63683885", "0.6340319", "0.6302337", "0.6271304", "0.62588817", "0.62111855", "0.61666393", "0.6156333", "0.60808104", "0.60777843", "0.6077221", "0.6074019", "0.60583204", "0.6054181", "0.6049789", "0.6047163", "0.604289", "0.601142...
0.85537225
0