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
Gets the union object for the modifiers for this type.
public NodeUnion<? extends T> getUnionForModifiers();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PipeUnion<T> getUnion();", "public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache...
[ "0.65015846", "0.6363283", "0.6195135", "0.6098773", "0.6069299", "0.5994762", "0.5955809", "0.58978397", "0.5867278", "0.58641016", "0.58217674", "0.5806605", "0.57660675", "0.5726035", "0.56714636", "0.55778384", "0.55104196", "0.5471629", "0.544178", "0.5439061", "0.535042...
0.7969371
0
Changes the modifiers for this type.
public void setModifiers(T modifiers);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setModifiers(int modifiers);", "public void setModifiers(int mod) {\n int old = this.mod;\n this.mod = mod;\n firePropertyChange (PROP_MODIFIERS, new Integer (old), new Integer (mod));\n }", "public void setModifiers(Modifiers node) {\n setChild(node, 0);\...
[ "0.8072995", "0.704974", "0.70036924", "0.69554424", "0.66982824", "0.6577747", "0.645778", "0.645778", "0.63742125", "0.62272763", "0.6198427", "0.6198427", "0.6198427", "0.61207753", "0.6115195", "0.6097125", "0.6040902", "0.60321337", "0.60321337", "0.6004615", "0.6004615"...
0.7541492
1
Changes the modifiers for this type.
public void setUnionForModifiers(NodeUnion<? extends T> modifiers) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setModifiers(int modifiers);", "public void setModifiers(T modifiers);", "public void setModifiers(int mod) {\n int old = this.mod;\n this.mod = mod;\n firePropertyChange (PROP_MODIFIERS, new Integer (old), new Integer (mod));\n }", "public void setModifier...
[ "0.80747116", "0.75426865", "0.70505923", "0.7004656", "0.6956494", "0.67003065", "0.6577254", "0.6461333", "0.6461333", "0.63777465", "0.62310994", "0.6201108", "0.6201108", "0.6201108", "0.6122881", "0.6117214", "0.61004853", "0.60425794", "0.6033208", "0.6033208", "0.60073...
0.4967595
97
Gets the extends clause.
public DeclaredTypeNode getExtendsClause()throws ClassCastException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getExtends();", "public void setExtendsClause(DeclaredTypeNode extendsClause);", "public ClassDescriptor getExtends() {\n return _extends;\n }", "public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();", "public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {...
[ "0.709837", "0.6902909", "0.66411585", "0.62675494", "0.6251041", "0.6251041", "0.6251041", "0.57796484", "0.55923617", "0.55694354", "0.5463338", "0.5254258", "0.50036395", "0.50000906", "0.49877328", "0.49413085", "0.4932008", "0.49164534", "0.4891264", "0.48783797", "0.486...
0.7583639
0
Gets the union object for the extends clause.
public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;", "public DeclaredTypeNode getExtendsClause()throws ClassCastException;", "public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();", "public PipeUnion<T> getUnion();"...
[ "0.6943468", "0.6450773", "0.6355112", "0.62538475", "0.60250396", "0.5913894", "0.58715045", "0.581256", "0.5756305", "0.5745982", "0.5624865", "0.55759215", "0.5499168", "0.5445393", "0.5409359", "0.54042995", "0.5338307", "0.52523303", "0.5181088", "0.5181088", "0.5181088"...
0.81268996
0
Changes the extends clause.
public void setExtendsClause(DeclaredTypeNode extendsClause);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DeclaredTypeNode getExtendsClause()throws ClassCastException;", "public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;", "void extend();", "@Override\r\n\tpublic void shiftExtends() throws ParserException\r\n\t{\r\n\t\tchangeToState(new ...
[ "0.6621436", "0.62962013", "0.6232582", "0.61661804", "0.6043416", "0.5933054", "0.5821906", "0.579257", "0.5718948", "0.5702107", "0.55411154", "0.5430927", "0.5426688", "0.53554183", "0.53540546", "0.53005254", "0.5296033", "0.52916294", "0.52765733", "0.52657515", "0.52639...
0.7538853
0
Changes the extends clause.
public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExtendsClause(DeclaredTypeNode extendsClause);", "public DeclaredTypeNode getExtendsClause()throws ClassCastException;", "void extend();", "@Override\r\n\tpublic void shiftExtends() throws ParserException\r\n\t{\r\n\t\tchangeToState(new MDJ_19());\r\n\t}", "protected abstract void _extends( ...
[ "0.7538853", "0.6621436", "0.6232582", "0.61661804", "0.6043416", "0.5933054", "0.5821906", "0.579257", "0.5718948", "0.5702107", "0.55411154", "0.5430927", "0.5426688", "0.53554183", "0.53540546", "0.53005254", "0.5296033", "0.52916294", "0.52765733", "0.52657515", "0.526394...
0.62962013
2
Gets the implements clause.
public DeclaredTypeListNode getImplementsClause()throws ClassCastException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }", "public void setImplementsClause(DeclaredTypeListNode implementsClause);", "public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n ...
[ "0.6700378", "0.64344096", "0.6139996", "0.6099222", "0.592432", "0.59190416", "0.5894551", "0.58760643", "0.5842374", "0.5730293", "0.57082206", "0.5702091", "0.5697647", "0.56964713", "0.56938607", "0.5665493", "0.566386", "0.5661304", "0.56187046", "0.5589023", "0.55540246...
0.71090406
0
Gets the union object for the implements clause.
public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;", "public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();", "public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronize...
[ "0.6883017", "0.6363261", "0.63318825", "0.62947035", "0.6150482", "0.57895774", "0.5693686", "0.56599486", "0.5589029", "0.55446595", "0.5383242", "0.53793913", "0.5349474", "0.53396803", "0.5327891", "0.5318201", "0.53168285", "0.5307277", "0.52991146", "0.5266483", "0.5266...
0.77485347
0
Changes the implements clause.
public void setImplementsClause(DeclaredTypeListNode implementsClause);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface));\n setModified(true);\n }", "public DeclaredTypeListNode ge...
[ "0.6863674", "0.6339385", "0.63383836", "0.63131005", "0.62537843", "0.6148563", "0.60698205", "0.60432", "0.6022255", "0.6004779", "0.5913834", "0.5903366", "0.5873373", "0.5796808", "0.57661635", "0.5750375", "0.57477856", "0.5734019", "0.57205945", "0.57136273", "0.5708080...
0.6927022
0
Changes the implements clause.
public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setImplementsClause(DeclaredTypeListNode implementsClause);", "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface)...
[ "0.6927022", "0.6863674", "0.6339385", "0.63383836", "0.62537843", "0.6148563", "0.60698205", "0.60432", "0.6022255", "0.6004779", "0.5913834", "0.5903366", "0.5873373", "0.5796808", "0.57661635", "0.5750375", "0.57477856", "0.5734019", "0.57205945", "0.57136273", "0.57080805...
0.63131005
4
Gets the body of this class.
public ClassBodyNode getBody()throws ClassCastException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getBody() {\n return body;\n }", "public java.lang.String getBody() {\n return instance.getBody();\n }", "public String getBody() {\r\n return body;\r\n }", "public String getBody () {\n\t\treturn body;\n\t}", "public java.lang.String getBody() {\n retur...
[ "0.8429861", "0.8422382", "0.8262523", "0.82542634", "0.8239205", "0.82274055", "0.82274055", "0.82274055", "0.81607795", "0.812982", "0.8126941", "0.80816656", "0.80190635", "0.79600215", "0.78965485", "0.781934", "0.78034705", "0.78001726", "0.77888006", "0.7727171", "0.772...
0.7477811
26
Gets the union object for the body of this class.
public NodeUnion<? extends ClassBodyNode> getUnionForBody();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocu...
[ "0.6859513", "0.6813279", "0.63182735", "0.6162809", "0.61158127", "0.605581", "0.6002257", "0.598952", "0.5894003", "0.58877057", "0.5873633", "0.5858645", "0.58540165", "0.5846467", "0.5799855", "0.5694656", "0.5689931", "0.5676103", "0.5656088", "0.56486505", "0.5621931", ...
0.849173
0
Changes the body of this class.
public void setBody(ClassBodyNode body);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBody(Body body) {\n this.body = body;\n }", "@Override\n\tpublic void setBody(Object body) {\n\t\tsuper.setBody(body);\n\t}", "void setBody (DBody body);", "void setBody(final Body body);", "public void setBody(Object body) {\n this.body = body;\n }", "public vo...
[ "0.7512141", "0.74868697", "0.7455756", "0.7447679", "0.73844117", "0.7069157", "0.7042965", "0.6835848", "0.68303937", "0.68025404", "0.67857534", "0.6759738", "0.67561245", "0.6702872", "0.6699186", "0.6678647", "0.6668984", "0.6656418", "0.66277593", "0.66198146", "0.66168...
0.7414048
4
Changes the body of this class.
public void setUnionForBody(NodeUnion<? extends ClassBodyNode> body) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBody(Body body) {\n this.body = body;\n }", "@Override\n\tpublic void setBody(Object body) {\n\t\tsuper.setBody(body);\n\t}", "void setBody (DBody body);", "void setBody(final Body body);", "public void setBody(ClassBodyNode body);", "public void setBody(Object body) {\n ...
[ "0.7512141", "0.74868697", "0.7455756", "0.7447679", "0.7414048", "0.73844117", "0.7069157", "0.7042965", "0.6835848", "0.68303937", "0.68025404", "0.67857534", "0.6759738", "0.67561245", "0.6702872", "0.6699186", "0.6678647", "0.6668984", "0.6656418", "0.66277593", "0.661981...
0.0
-1
Gets this class's type parameters.
public TypeParameterListNode getTypeParameters()throws ClassCastException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Type> getTypeParameters();", "TypeInfo[] typeParams();", "Collection<Parameter> getTypedParameters();", "List<List<Class<?>>> getConstructorParametersTypes();", "public ITypeInfo[] getParameters();", "public TPS_ParameterClass getParameters() {\n return this.parameterClass;\n }", "public...
[ "0.7775068", "0.715397", "0.70718414", "0.7015391", "0.6942997", "0.6938012", "0.6934464", "0.6927388", "0.6895329", "0.6854209", "0.6785952", "0.6762554", "0.67463267", "0.6696103", "0.668071", "0.66714275", "0.663375", "0.6493631", "0.6361976", "0.6335149", "0.6334949", "...
0.6587699
17
Gets the union object for this class's type parameters.
public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NodeUnion<? extends ClassBodyNode> getUnionForBody();", "public PipeUnion<T> getUnion();", "UnionTypeDefinition createUnionTypeDefinition();", "public NodeUnion<? extends T> getUnionForModifiers();", "@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}", "public NodeUnion<? extends Dec...
[ "0.61948764", "0.6187589", "0.6098394", "0.60693264", "0.5974973", "0.5866046", "0.5850556", "0.5591595", "0.5572413", "0.55451167", "0.55092263", "0.5505484", "0.54791385", "0.5455317", "0.5436051", "0.5380676", "0.5147693", "0.51275194", "0.51130027", "0.50987226", "0.50701...
0.7212188
0
Changes this class's type parameters.
public void setTypeParameters(TypeParameterListNode typeParameters);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setClassType(String classType);", "public void setType(Class type) {\n\t this.type = type;\n\t }", "public void changeToType(TYPE type){\n this.type=type;\n return;\n }", "void setType(Type type)\n {\n this.type = type;\n }", "public void setType(Type t) {...
[ "0.66773605", "0.6354247", "0.63449836", "0.6229896", "0.6229871", "0.6228351", "0.6197426", "0.61876345", "0.617718", "0.61344427", "0.6109205", "0.60922647", "0.6074023", "0.60698086", "0.604767", "0.6046362", "0.6017274", "0.5960914", "0.5946201", "0.59413666", "0.5933928"...
0.6967888
0
Changes this class's type parameters.
public void setUnionForTypeParameters(NodeUnion<? extends TypeParameterListNode> typeParameters) throws NullPointerException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTypeParameters(TypeParameterListNode typeParameters);", "void setClassType(String classType);", "public void setType(Class type) {\n\t this.type = type;\n\t }", "public void changeToType(TYPE type){\n this.type=type;\n return;\n }", "void setType(Type type)\n...
[ "0.6964121", "0.66765946", "0.635102", "0.6342793", "0.6226015", "0.62259525", "0.6225524", "0.6195467", "0.61846226", "0.617339", "0.61308664", "0.6111279", "0.60891175", "0.60734767", "0.6071469", "0.6044533", "0.60443467", "0.6012822", "0.59603155", "0.5941789", "0.5938901...
0.0
-1
Generates a deep copy of this node.
@Override public AbstractlyUnmodifiedClassDeclarationNode<T> deepCopy(BsjNodeFactory factory);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Node copy();", "public T cloneDeep();", "public abstract TreeNode copy();", "public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public abstract Type ...
[ "0.77869254", "0.7235399", "0.71756494", "0.7156478", "0.70259875", "0.69406664", "0.6911544", "0.69019204", "0.6896577", "0.6879466", "0.68611926", "0.6819145", "0.6810453", "0.675539", "0.66925204", "0.66673297", "0.66506404", "0.6644279", "0.6630261", "0.66157734", "0.6614...
0.0
-1
private final static IntWritable one = new IntWritable(1);
public void map(Object key, Text value, Context context ) throws IOException, InterruptedException { String curr_string=value.toString(); /// splitting based on "*" as a delimiter... String [] parts=curr_string.split("\\*"); String curr_key=parts[0]; // Removing spaces from both left and right part of the string.. String curr_value=parts[1].trim(); String [] small_parts=curr_value.split(","); // Taking the count of unique files which are present in the input given to tfidf int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]); /// The formula to compute idf is log((1+no_of_files)/no_of_unique_files)).... Configuration conf=context.getConfiguration(); String value_count=conf.get("test"); if(!value_count.isEmpty()) { int total_no_files=Integer.parseInt(value_count); double x=(total_no_files/no_of_unique_files); // Formula fo rcomputing the idf value.... double idf_value=Math.log10(1+x); for(int i=0;i<small_parts.length-1;i++) { String [] waste=small_parts[i].split("="); String file_name=waste[0]; // Computing the tfidf on the fly... double tf_idf=idf_value*Double.parseDouble(waste[1]); Text word3 = new Text(); Text word4 = new Text(); word3.set(curr_key+"#####"+file_name+","); word4.set(tf_idf+""); context.write(word3,word4); } //word1.set(curr_key); //word2.set(idf_value+""); //context.write(word1,word2); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isWritable();", "@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}", "public WeekSAWritable() {\n this.count = new IntWritable(0);\n this.week = new IntWritable(0);\n this.hashTagList = new ArrayList<>();\n }", "public void testGet...
[ "0.5982721", "0.58499026", "0.5399833", "0.53660995", "0.53540194", "0.53425", "0.53229463", "0.5183901", "0.5183316", "0.517767", "0.5176647", "0.51616216", "0.51383567", "0.5125327", "0.5118711", "0.50397104", "0.50341344", "0.5002094", "0.50007856", "0.4970477", "0.4967653...
0.0
-1
TODO Autogenerated method stub
@Override public int run(String[] arg0) throws Exception { return 0; }
{ "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: Implement test cases to validate the logic of spock works... :)
public void testSpock(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDes...
[ "0.5795958", "0.57711476", "0.5763365", "0.5729042", "0.57190436", "0.57055", "0.5704202", "0.5623766", "0.5607949", "0.5549689", "0.5472308", "0.54493695", "0.5425648", "0.5411241", "0.5404886", "0.5394221", "0.53896976", "0.5383601", "0.53832155", "0.5378559", "0.53440654",...
0.6648351
0
TODO: Implement test cases to validate the logic of lizard works
public void testLizard(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Yard createYard();", "ICard deal();", "public LaundryCard() {\n\t}", "@Test\n public void testArmiesInAirliftCommand() {\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).setD_noOfArmies(5);\n d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0).setD_noOfArmies(3...
[ "0.64873713", "0.57480526", "0.5599382", "0.54575276", "0.53104556", "0.52182597", "0.520332", "0.51902956", "0.5180657", "0.51733714", "0.51603746", "0.5123719", "0.5120082", "0.5112192", "0.50877607", "0.50801224", "0.5077275", "0.50715613", "0.505798", "0.5052106", "0.5046...
0.0
-1
Calculates the resolution (world units / pixel) for the given scale denominator (1 / map scale) and coordinate reference system (determines the world units).
public static double calcResolution( double scaleDenominator, ICRS crs ) { IUnit units = crs.getAxis()[0].getUnits(); return calcResolution( scaleDenominator, units ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double calcResolution( double scaleDenominator, IUnit units ) {\n if ( units.equals( METRE ) ) {\n return calcMetricResFromScale( scaleDenominator );\n } else if ( units.equals( DEGREE ) ) {\n return calcDegreeResFromScale( scaleDenominator );\n }\n S...
[ "0.70388955", "0.589891", "0.5882139", "0.58459103", "0.5829314", "0.5705644", "0.56869435", "0.5682296", "0.56021976", "0.5517623", "0.54503083", "0.542935", "0.5403588", "0.5387282", "0.53716147", "0.53716147", "0.5371301", "0.5363828", "0.53540534", "0.53513867", "0.533206...
0.71662784
0
Calculates the resolution (world units / pixel) for the given scale denominator (1 / map scale) and unit system.
public static double calcResolution( double scaleDenominator, IUnit units ) { if ( units.equals( METRE ) ) { return calcMetricResFromScale( scaleDenominator ); } else if ( units.equals( DEGREE ) ) { return calcDegreeResFromScale( scaleDenominator ); } String msg = "Unhandled unit type: " + units + ". Conversion from scale denominator to resolution not implemented"; throw new IllegalArgumentException( msg ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double calcResolution( double scaleDenominator, ICRS crs ) {\n IUnit units = crs.getAxis()[0].getUnits();\n return calcResolution( scaleDenominator, units );\n }", "private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}", "public fl...
[ "0.74288976", "0.6231796", "0.6200341", "0.6111364", "0.6059767", "0.59216195", "0.5895858", "0.5768643", "0.57558626", "0.57542354", "0.5696888", "0.5696888", "0.5680074", "0.5670274", "0.5625611", "0.5621779", "0.56181836", "0.5604833", "0.5597159", "0.5594446", "0.5592226"...
0.77727014
0
glisse le message dans la photo
public static ImagePNG encodage(ImagePNG imagePNG, ArrayList<Integer> messageBinaire) { if (messageBinaire.size() >= imagePNG.getWidth() * imagePNG.getHeight()) { JOptionPane.showMessageDialog(null, "Le message est trop long"); return imagePNG.copy(); } ImagePNG copy = imagePNG.copy(); int cle = 1; int compteur = 0; for (int i = 0; i < messageBinaire.size(); i++) { int message = messageBinaire.get(i); int valeurEntierePixelModifiee = ((copy.getImage()[compteur / imagePNG.getHeight()][compteur % imagePNG.getHeight()].getValeurEntierePixel() >> 1) << 1); copy.getImage()[compteur / imagePNG.getHeight()][compteur % imagePNG.getHeight()] .setValeurEntierePixel(valeurEntierePixelModifiee | message); compteur++; } return copy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void photoMessage(Message m);", "public abstract void newChatPhotoMessage(Message m);", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what){\n\t\t\tcase 0:\n \tBitmap bmp = null;\n \tbmp = Bitmap.createBitmap( mface.cols(), mface.rows(), Bitma...
[ "0.73329455", "0.69256896", "0.65507853", "0.6202077", "0.6168196", "0.61207014", "0.60960853", "0.60588264", "0.6056171", "0.60552865", "0.59987766", "0.5989685", "0.5982037", "0.59736645", "0.59396714", "0.59294695", "0.5903766", "0.5835344", "0.58012575", "0.5795889", "0.5...
0.55642426
42
should modify find by lesson > admin or student view
@Override public List<GameResponseDTO> findAllByLessonId(long lessonId) { List<GameResponseDTO> gameResponseDTOList = new ArrayList<>(); try { List<Game> gameList = iGameRepository.findByLessonIdAndStatusNot(lessonId, DELETED_STATUS); if (!gameList.isEmpty()) { for (Game game : gameList) { GameResponseDTO gameResponseDTO = modelMapper.map(game, GameResponseDTO.class); gameResponseDTOList.add(gameResponseDTO); } } } catch (Exception e) { logger.error("Find all games by lessonId = " + lessonId + "! " + e.getMessage()); return null; } return gameResponseDTOList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Lesson saveInternal(final Lesson lesson) {\n\t\tAssert.notNull(lesson);\n\n\t\t//Assertion that the user modifying this lesson has the correct privilege.\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tAssert.isTrue(authentication.getAuthorities().toAr...
[ "0.54632586", "0.5449013", "0.5385144", "0.5360059", "0.53407335", "0.5244606", "0.5217035", "0.5163222", "0.51377195", "0.5100997", "0.510063", "0.5095397", "0.5084886", "0.5084342", "0.5081917", "0.50665855", "0.50617725", "0.5051416", "0.5023278", "0.5012062", "0.50066304"...
0.0
-1
POST /fornecedors > Create a new fornecedor.
@RequestMapping(value = "/fornecedors", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<FornecedorDTO> createFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException { log.debug("REST request to save Fornecedor : {}", fornecedorDTO); if (fornecedorDTO.getId() != null) { return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("fornecedor", "idexists", "A new fornecedor cannot already have an ID")).body(null); } FornecedorDTO result = fornecedorService.save(fornecedorDTO); return ResponseEntity.created(new URI("/api/fornecedors/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert("fornecedor", result.getId().toString())) .body(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFornecedor(String fornecedor) { this.fornecedor = fornecedor; }", "@PostMapping(\"/addFormation/{eid}\")\n\t\tpublic Formation createFormation(@PathVariable(value = \"eid\") Long Id, @Valid @RequestBody Formation formationDetails) {\n\n\t\t \n\t\t Formation me=new Formation();\n\t\t\t D...
[ "0.5926764", "0.57991433", "0.5743517", "0.57102627", "0.567294", "0.55573153", "0.5519587", "0.5512492", "0.54837275", "0.547903", "0.5418258", "0.5402489", "0.5398873", "0.53610355", "0.53303164", "0.53170943", "0.53124624", "0.5311206", "0.53055805", "0.5300204", "0.527626...
0.7365952
0
PUT /fornecedors > Updates an existing fornecedor.
@RequestMapping(value = "/fornecedors", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<FornecedorDTO> updateFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException { log.debug("REST request to update Fornecedor : {}", fornecedorDTO); if (fornecedorDTO.getId() == null) { return createFornecedor(fornecedorDTO); } FornecedorDTO result = fornecedorService.save(fornecedorDTO); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert("fornecedor", fornecedorDTO.getId().toString())) .body(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Atualizar(Fornecedor fornecedor) throws SQLException {\r\n\t\ttry {\r\n\t\t\tString update = \"update fornecedor set nm_fornecedor=?, vl_fornecedor=?, nm_local=?, qt_peso=?, ds_descricao=?\"\r\n\t\t\t\t\t+ \"where cd_fornecedor=?\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepare...
[ "0.6050349", "0.6031484", "0.60150325", "0.5806061", "0.54002005", "0.5367613", "0.52971345", "0.52707183", "0.51945066", "0.5186286", "0.5169892", "0.5163821", "0.5163821", "0.5152441", "0.5141539", "0.5124138", "0.51102114", "0.5105273", "0.5092861", "0.5041931", "0.5026314...
0.72876877
0
GET /fornecedors > get all the fornecedors.
@RequestMapping(value = "/fornecedors", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed @Transactional(readOnly = true) public ResponseEntity<List<FornecedorDTO>> getAllFornecedors(Pageable pageable) throws URISyntaxException { log.debug("REST request to get a page of Fornecedors"); Page<Fornecedor> page = fornecedorService.findAll(pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/fornecedors"); return new ResponseEntity<>(page.getContent().stream() .map(fornecedorMapper::fornecedorToFornecedorDTO) .collect(Collectors.toCollection(LinkedList::new)), headers, HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<FornecedorResource> getListaFornecedores()\r\n {\r\n return fornecedorBusiness.listarFornecedores();\r\n }", "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n ...
[ "0.66537774", "0.63162965", "0.61871225", "0.5938919", "0.5778768", "0.56755304", "0.5663495", "0.565482", "0.565309", "0.56482637", "0.56096107", "0.55987877", "0.55886024", "0.55825835", "0.5578412", "0.5576339", "0.556765", "0.55662763", "0.55649734", "0.55571747", "0.5552...
0.70509
0
GET /fornecedors/:id > get the "id" fornecedor.
@RequestMapping(value = "/fornecedors/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<FornecedorDTO> getFornecedor(@PathVariable Long id) { log.debug("REST request to get Fornecedor : {}", id); FornecedorDTO fornecedorDTO = fornecedorService.findOne(id); return Optional.ofNullable(fornecedorDTO) .map(result -> new ResponseEntity<>( result, HttpStatus.OK)) .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/detalle-ordens/{id}\")\n @Timed\n public ResponseEntity<DetalleOrdenDTO> getDetalleOrden(@PathVariable Long id) {\n log.debug(\"REST request to get DetalleOrden : {}\", id);\n Optional<DetalleOrdenDTO> detalleOrdenDTO = detalleOrdenService.findOne(id);\n return ResponseUti...
[ "0.66931564", "0.65358746", "0.6428077", "0.6376604", "0.6360843", "0.6336517", "0.6328668", "0.63062763", "0.62500465", "0.6249868", "0.62421745", "0.62177444", "0.621662", "0.62115836", "0.613597", "0.61184907", "0.6112353", "0.6103128", "0.6102288", "0.61006683", "0.602379...
0.7935132
0
DELETE /fornecedors/:id > delete the "id" fornecedor.
@RequestMapping(value = "/fornecedors/{id}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<Void> deleteFornecedor(@PathVariable Long id) { log.debug("REST request to delete Fornecedor : {}", id); fornecedorService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert("fornecedor", id.toString())).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }", "@DeleteMapping(\"/detalle-ordens/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDetalleOrden(@PathVariable Long id) {\n log.debug(\"REST request to delete Det...
[ "0.7331649", "0.72771645", "0.72077405", "0.7171924", "0.71227896", "0.71227896", "0.71227896", "0.71227896", "0.71227896", "0.70900697", "0.70630676", "0.7061972", "0.70611715", "0.70452076", "0.70424503", "0.70424503", "0.70424503", "0.70424503", "0.70424503", "0.70424503", ...
0.84996855
0
Turns an integer into an array of bytes in LITTLE_ENDIAN format.
public static byte[] convertIntToByteArray(int toConvert, Boolean... bigEndian) { // Get the byte array of the int and return it, little endian style if (bigEndian.length > 0 && bigEndian[0]) { return ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(toConvert).array(); } else { return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(toConvert).array(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] toLEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}", "public static byte[] intToBytes(int i) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT);\n byteBuffer.putInt(i);\n return byteBuffer.array()...
[ "0.74134433", "0.70827323", "0.7058657", "0.7022418", "0.697243", "0.6957495", "0.69516873", "0.6949263", "0.6941992", "0.69374686", "0.69321156", "0.6908633", "0.6882311", "0.67781645", "0.67640543", "0.67404515", "0.67347103", "0.67293906", "0.6541449", "0.65296197", "0.647...
0.6831636
13
Turns a float into an array of bytes in LITTLE_ENDIAN format.
public static byte[] convertFloatToByteArray(float toConvert) { return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putFloat(toConvert).array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] longToBytes(float x) {\n int bits = Float.floatToIntBits(x);\n byte[] buffer = new byte[4];\n buffer[0] = (byte)(bits & 0xff);\n buffer[1] = (byte)((bits >> 8) & 0xff);\n buffer[2] = (byte)((bits >> 16) & 0xff);\n buffer[3] = (byte)((bits >> 24) & 0xff...
[ "0.68649083", "0.6786925", "0.63418853", "0.6304618", "0.6295404", "0.6280094", "0.6264541", "0.6133633", "0.6102669", "0.6100418", "0.60545194", "0.60473084", "0.59713537", "0.59019023", "0.5803622", "0.5784952", "0.5755267", "0.5747431", "0.57113206", "0.56643736", "0.56551...
0.73658127
0
Turns a double into an array of bytes in LITTLE_ENDIAN format.
public static byte[] convertDoubleToByteArray(double toConvert) { return ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putDouble(toConvert).array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte [] toBytes(final double d) {\n // Encode it as a long\n return Bytes.toBytes(Double.doubleToRawLongBits(d));\n }", "public static double bitsToBytes(double num) { return (num/8); }", "public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order...
[ "0.7169175", "0.70644337", "0.6378125", "0.6295616", "0.62434584", "0.61834276", "0.6117286", "0.61016524", "0.6090251", "0.59997785", "0.59898853", "0.59429985", "0.58907473", "0.5831612", "0.5803376", "0.57988346", "0.57938206", "0.5772432", "0.5748507", "0.57353276", "0.57...
0.74145424
0
Adds the given bytes to the passed ArrayList.
public static void addBytesToArray(byte[] bytes, ArrayList<Byte> array) { // Add each byte to the array // Array is an object, so passed by reference for (Byte b: bytes) { array.add(b); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addData(ByteArrayList bytes) {\n data.add(bytes);\n if (data.size() == 1) {\n listeners.forEach(DataReceiveListener::hasData);\n }\n listeners.forEach(DataReceiveListener::received);\n }", "void add(byte[] element);", "public void add(byte[] bytes) {\r\n\t\tint[] hashes = createHa...
[ "0.77582264", "0.69620895", "0.682179", "0.67500293", "0.65584075", "0.65515685", "0.6531563", "0.64893836", "0.6484329", "0.6448288", "0.6338742", "0.60432696", "0.5931608", "0.58385336", "0.5686515", "0.5673118", "0.56147254", "0.55760974", "0.55683744", "0.55221015", "0.55...
0.78435075
0
Converts the given ArrayList of Bytes into a primitive byte array.
public static byte[] convertArrayListToArray(ArrayList<Byte> bytes) { // Define an array of size of bytes in array list byte[] resultBytes = new byte[bytes.size()]; // Loop through the array list and add each byte to our primitive array for (int i = 0; i < bytes.size(); i++) { resultBytes[i] = bytes.get(i); } // Return the primitive array return resultBytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<byte[]> asByteArrayList();", "public static byte[] toArray(List<Byte> list) {\n byte[] bytes = new byte[list.size()];\n for (int i = 0; i < list.size(); i++)\n bytes[i] = list.get(i);\n return bytes;\n }", "private static byte[] toByteArray(Collection<Byte> bytes) {\n\t\...
[ "0.79652303", "0.7758023", "0.73863035", "0.71525687", "0.66786873", "0.6543757", "0.6219014", "0.62024623", "0.62024623", "0.6186709", "0.61816835", "0.6172206", "0.61600906", "0.59644985", "0.592836", "0.59054744", "0.59054744", "0.58770686", "0.58741134", "0.5846367", "0.5...
0.8215567
0
Pads the given array list with the given number of 0s
public static void padWithBytes(ArrayList<Byte> array, int padCount) { for (int i = 0; i < padCount; i++) { array.add((byte)0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pad( int count )\r\n\t{\r\n\t\tfinal int capacity = entities.length;\r\n\t\t\r\n\t\tif ( size + count >= capacity )\r\n\t\t{\r\n\t\t\tint nextSize = capacity + (capacity >> 1);\r\n\t\t\tint minimumSize = size + count;\r\n\t\t\t\r\n\t\t\tentities = Arrays.copyOf( entities, Math.max( nextSize, minimumSiz...
[ "0.61240906", "0.5935992", "0.584706", "0.575458", "0.57203114", "0.5547595", "0.5526835", "0.5519933", "0.5492224", "0.54822165", "0.54306513", "0.54029566", "0.54026586", "0.5402277", "0.5350072", "0.53335255", "0.5328227", "0.5324296", "0.52968407", "0.52724695", "0.524800...
0.64910555
0
demarrer l'etape de jeu
@Override public synchronized void demarrer(){ if(modele.getQuiterJeu()){return;} modele.getMoteurJeu().setEtapeJeu(this); // apercu dans le termial pour debuger System.out.println("-----------------nom joueur: "+modele.getJoueurCourant().getNom()); System.out.print(" humain: "+modele.getJoueurCourant().estHumain()); System.out.print(" stand: "+modele.getJoueurCourant().getMainCourant().getStand()); System.out.print(" perdu: "+modele.getJoueurCourant().getMainCourant().estPerdu()); System.out.print(" blackjack: "+modele.getJoueurCourant().getMainCourant().estBlackJack()); System.out.println(" jeu: "+modele.getJoueurCourant().getMainCourant().getJeu().toString()); //------------------------------------------------- // On ne fait pas une boucle ici pour que l'observer // puisse acceder a son observé et se mettre a jour //------------------------------------------------- new Thread(){ @Override public void run() { try { // si plus de carte if(modele.getPioche().getCartes().size() < 1){ for(Carte carte:modele.getDefausse().getCartes()){ carte.setFaceCarte(Face.VERSO); modele.getPioche().ajouterDessous(carte); } modele.getDefausse().vider(); modele.getPioche().melanger(); } // si il peut plus jouer if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21() || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){ // si le joueur a une autre main if(modele.getJoueurCourant().mainSuivant()){ Thread.sleep(2000); demarrer(); } // sinon si il y a un joueur suivant on fait joueur suivant else if(modele.joueurSuivant()){ Thread.sleep(2000); demarrer(); }else{ modele.getMoteurJeu().setEtapeJeu(etapeSuivant); Thread.sleep(2000); modele.setMessage(modele.getCroupier().getNom()+" plays"); // on affiche les carte du croupier for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){ carte.setFaceCarte(Face.RECTO); } System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++"); Thread.sleep(3000); demarrerEtapeSuivant(); } } // sinon else{ modele.setMessage(modele.getJoueurCourant().getNom()+" plays"); if(!modele.getJoueurCourant().estHumain()){ modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse()); Thread.sleep(3000); demarrer(); } } } catch (InterruptedException e) { e.printStackTrace(); } } }.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEnJeu(){\n\t\treturn MusiqueFiducial.enJeu;\n\t}", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "p...
[ "0.66130817", "0.65901345", "0.6481653", "0.6434715", "0.6386727", "0.63612115", "0.6350422", "0.63212097", "0.6319634", "0.6254032", "0.62450564", "0.6204608", "0.617293", "0.61436456", "0.6131047", "0.61185557", "0.61108273", "0.61104363", "0.6098737", "0.60894996", "0.6085...
0.5948196
34
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Destino)) { return false; } Destino other = (Destino) object; if ((this.idDestino == null && other.idDestino != null) || (this.idDestino != null && !this.idDestino.equals(other.idDestino))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6897049", "0.6839498", "0.67057544", "0.66417086", "0.66417086", "0.6592169", "0.6579292", "0.6579292", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.6575263", "0.656245", "0.656245", "0.65447694", "0.65251684", "0.6516205", "0.6487982", "0.6477638", ...
0.0
-1
method for adding a new movie
public void save(View view){ try{ if(!(Text1.getText().toString().isEmpty()||Text2.getText().toString().isEmpty()||Text3.getText().toString().isEmpty()||Text4.getText().toString().isEmpty()||Text5.getText().toString().isEmpty()||Text6.getText().toString().isEmpty())){ int rates=Integer.parseInt(String.valueOf(Text5.getText())); int yr=Integer.parseInt(String.valueOf(Text2.getText())); if(rates<=10 && yr>1895) { boolean insert = db.insert_movies(Text1.getText().toString(), Text2.getText().toString(), Text3.getText().toString(), Text4.getText().toString(), Integer.parseInt(String.valueOf(Text5.getText())), Text6.getText().toString()); Cursor movies = db.get_movies(); if (insert) { Log.d("xyz", String.valueOf(movies.getCount())); Log.d("xyz", "Added a new Movie"); Toast.makeText(RegisterMovie.this, "A movie is added to watched movies list", Toast.LENGTH_SHORT).show(); Text1.setText(""); Text2.setText(""); Text3.setText(""); Text4.setText(""); Text5.setText(""); Text6.setText(""); } }else{ Toast.makeText(this,"Give Valid year and rate",Toast.LENGTH_SHORT).show(); } }else{ Toast.makeText(this, "Fill all the textFields", Toast.LENGTH_SHORT).show(); } }catch (Exception ex){ Toast.makeText(this,"Give valid Values",Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Movie addMovie(final Movie movie);", "public void addMovie(ArrayList<Movie> movies)\n {\n String title = \"\";\n String director = \"\";\n String actor1 = \"\";\n String actor2 = \"\";\n String actor3 = \"\";\n int rating = 0;\n \n title = insertTitle();\n...
[ "0.8422799", "0.7370322", "0.7236145", "0.7025053", "0.6973965", "0.68958825", "0.6824261", "0.680916", "0.6748331", "0.6745591", "0.67392486", "0.6705119", "0.6685841", "0.6682666", "0.6669444", "0.66597515", "0.66457206", "0.66248184", "0.6611117", "0.6597722", "0.6597093",...
0.0
-1
/ renamed from: a
public static zzaax m19492a(Context context, zzaat zzaat, String str) { String optString; String str2; zzaat zzaat2 = zzaat; try { int b; int i; String str3; zzaax zzaax; long j; JSONArray optJSONArray; List list; List list2; List list3; List a; long j2; String optString2; boolean optBoolean; JSONObject jSONObject = new JSONObject(str); optString = jSONObject.optString("ad_base_url", null); Object optString3 = jSONObject.optString("ad_url", null); String optString4 = jSONObject.optString("ad_size", null); String optString5 = jSONObject.optString("ad_slot_size", optString4); boolean z = (zzaat2 == null || zzaat2.zzcnj == 0) ? false : true; CharSequence optString6 = jSONObject.optString("ad_json", null); if (optString6 == null) { optString6 = jSONObject.optString("ad_html", null); } if (optString6 == null) { optString6 = jSONObject.optString("body", null); } if (optString6 == null && jSONObject.has("ads")) { optString6 = jSONObject.toString(); } String optString7 = jSONObject.optString("debug_dialog", null); String optString8 = jSONObject.optString("debug_signals", null); long j3 = jSONObject.has("interstitial_timeout") ? (long) (jSONObject.getDouble("interstitial_timeout") * 1000.0d) : -1; String optString9 = jSONObject.optString("orientation", null); if ("portrait".equals(optString9)) { b = ar.g().mo4621b(); } else if ("landscape".equals(optString9)) { b = ar.g().mo4619a(); } else { i = -1; if (TextUtils.isEmpty(optString6) || TextUtils.isEmpty(optString3)) { optString9 = optString; str3 = optString6; zzaax = null; j = -1; } else { zzaax = aq.m31496a(zzaat2, context, zzaat2.zzaty.zzcv, optString3, null, null, null, null); str2 = zzaax.zzcja; optString9 = zzaax.body; j = zzaax.zzcpa; str3 = optString9; optString9 = str2; } if (str3 == null) { return new zzaax(0); } optJSONArray = jSONObject.optJSONArray("click_urls"); list = zzaax != null ? null : zzaax.zzcdk; if (optJSONArray != null) { list = m19494a(optJSONArray, list); } optJSONArray = jSONObject.optJSONArray("impression_urls"); list2 = zzaax != null ? null : zzaax.zzcdl; if (optJSONArray != null) { list2 = m19494a(optJSONArray, list2); } optJSONArray = jSONObject.optJSONArray("manual_impression_urls"); list3 = zzaax != null ? null : zzaax.zzcoy; a = optJSONArray == null ? m19494a(optJSONArray, list3) : list3; if (zzaax != null) { if (zzaax.orientation != -1) { i = zzaax.orientation; } if (zzaax.zzcov > 0) { j2 = zzaax.zzcov; optString2 = jSONObject.optString("active_view"); optBoolean = jSONObject.optBoolean("ad_is_javascript", false); return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0); } } j2 = j3; optString2 = jSONObject.optString("active_view"); optBoolean = jSONObject.optBoolean("ad_is_javascript", false); if (optBoolean) { } return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0); } i = b; if (TextUtils.isEmpty(optString6)) { } optString9 = optString; str3 = optString6; zzaax = null; j = -1; if (str3 == null) { return new zzaax(0); } optJSONArray = jSONObject.optJSONArray("click_urls"); if (zzaax != null) { } if (optJSONArray != null) { list = m19494a(optJSONArray, list); } optJSONArray = jSONObject.optJSONArray("impression_urls"); if (zzaax != null) { } if (optJSONArray != null) { list2 = m19494a(optJSONArray, list2); } optJSONArray = jSONObject.optJSONArray("manual_impression_urls"); if (zzaax != null) { } if (optJSONArray == null) { } if (zzaax != null) { if (zzaax.orientation != -1) { i = zzaax.orientation; } if (zzaax.zzcov > 0) { j2 = zzaax.zzcov; optString2 = jSONObject.optString("active_view"); optBoolean = jSONObject.optBoolean("ad_is_javascript", false); if (optBoolean) { } return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0); } } j2 = j3; optString2 = jSONObject.optString("active_view"); optBoolean = jSONObject.optBoolean("ad_is_javascript", false); if (optBoolean) { } return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0); } catch (JSONException e) { str2 = "Could not parse the inline ad response: "; optString = String.valueOf(e.getMessage()); hx.m19916e(optString.length() != 0 ? str2.concat(optString) : new String(str2)); return new zzaax(0); } }
{ "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 Integer m19493a(boolean z) { return Integer.valueOf(z); }
{ "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
TODO: wrap allAvailableRoles into detacheable model
public UserEditPanel(String id, IModel<User> userModel, List<Role> allAvailableRoles) { super(id, userModel); this.allAvailableRoles = allAvailableRoles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Role> getAllRoles();", "List<RoleEntity> getSystemRoles();", "public abstract Collection getRoles();", "List<Role> getRoles();", "public List<SecRole> getAllRoles();", "@ModelAttribute(\"allRoles\")\r\n\tpublic List<Role> getAllRoles(){\t\r\n\t\treturn roleService.findAdminRoles();\r\n\t\t\r...
[ "0.7174864", "0.70287573", "0.7023968", "0.701893", "0.7001687", "0.69897926", "0.691136", "0.6878794", "0.6783108", "0.675508", "0.6740591", "0.6735245", "0.6722528", "0.66676337", "0.6664176", "0.66564745", "0.6641775", "0.6641775", "0.66257036", "0.65969545", "0.655679", ...
0.0
-1
Nothing to do in Task
public void setJobObserver(JobObserver jO) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void doTask() {\n\t}", "public abstract void task();", "@Override\n public void run() {\n task.run();\n }", "@Override\r\n\tvoid execute(Runnable task);", "@Override\n public void execute(final Task<T> task) {...
[ "0.72151303", "0.6991896", "0.6873153", "0.68051535", "0.67577934", "0.67433226", "0.6592373", "0.65616333", "0.65461725", "0.654261", "0.65371156", "0.64695567", "0.64695567", "0.6466253", "0.64623433", "0.64554065", "0.6442994", "0.6370639", "0.63545436", "0.63484496", "0.6...
0.0
-1
Process is the method called to process an item. An item can have multiple Content objects, so here we extract all the Text content and then process each in turn.
@Override public ProcessorResponse process(Item item) { item.getContents(Text.class).forEach(this::processText); //Once we're done, we return ok (if there were errors, we could return a different response optionally with exceptions). return ProcessorResponse.ok(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void process(Page page) {\n\t\t\t\tgetContent(page);\n\t\t\t}", "@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out...
[ "0.5935998", "0.5926645", "0.56598365", "0.56261593", "0.5564698", "0.5553848", "0.5505178", "0.5487276", "0.5469301", "0.53785145", "0.52584314", "0.5225426", "0.5182371", "0.5131254", "0.5107831", "0.51011616", "0.5093527", "0.50852287", "0.50628334", "0.5046779", "0.502648...
0.72641766
0
Create a Regex matcher for the current content
public void processText(Text content){ Matcher m = numberPattern.matcher(content.getData()); //Find all of the matches, and for each one create a new annotation while(m.find()){ content.getAnnotations().create() .withBounds(new SpanBounds(m.start(), m.end())) //Set the bounds .withType(AnnotationTypes.ANNOTATION_TYPE_NUMBER) //Set the type .withProperty(PropertyKeys.PROPERTY_KEY_VALUE, Integer.parseInt(m.group())) //Set a property on the annotation, using the appropriate convention .save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }", "protected abstract Regex pattern();", "java.lang.String getRegex();", "java.lang.String getRegex();", "abstract UrlPatternMatcher create( String pattern );", "publ...
[ "0.67343444", "0.64976025", "0.60908103", "0.60908103", "0.6069965", "0.5983775", "0.5932478", "0.5862806", "0.58572567", "0.58271515", "0.5757458", "0.5735645", "0.5730192", "0.57150245", "0.5639482", "0.55966234", "0.55836535", "0.5569118", "0.5510388", "0.5503617", "0.5498...
0.0
-1
Copy files or directories from 'from' to 'to'. Recursively descends if 'from' is a directory. Creates 'from' tail directory in 'to', e.g.: from = c:/foo/bar to = c:/temp > c:/temp/bar
public static void copyTree(File from, File to, FileFilter filter) throws IOException { File[] children; if (!from.exists()) { throw new IOException ("Source of copy \'" + from.getName() + "\' doesn't exist"); } if (to.getCanonicalPath().equals(from.getCanonicalPath())) { throw new IOException ("\'" + from.getName() + "\' cannot copy to itself"); } if (from.isDirectory()) { children = from.listFiles(filter); // just like cp command, if target exist, make a new folder into // the target, copy content into the target folder if (to.exists()) { if (to.isFile()) { throw new IOException("Cannot overwrite non-directory \'" + to.getName() + "\' with directory " + from.getName()); } // copy into new directory name grafted after the existing one to = new File(to, from.getName()); copyTree(from, to, filter); return; } else { // copy into new directory name to.mkdir(); for (int i = 0; i < children.length; i++) { File curto = new File(to, children[i].getName()); copyTree(children[i], curto, filter); } return; } } else { if (to.isDirectory()) { to = new File (to, from.getName()); } copyFile(from, to); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length...
[ "0.70327765", "0.690213", "0.68688947", "0.6804266", "0.65068424", "0.6405091", "0.63975483", "0.6121372", "0.60873413", "0.6084764", "0.59327704", "0.5835516", "0.5670306", "0.56466717", "0.5629168", "0.5463019", "0.5370012", "0.5361035", "0.5349899", "0.53447807", "0.534130...
0.6980775
1
Copy files or directories from 'from' to 'to'. Recursively descends if 'from' is a directory. Does not create 'from' tail directory in 'to', e.g.: from = c:/foo/bar contains a,b,c to = c:/temp > c:/temp/a c:/temp/b c:/temp/c
public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException { File[] files; Check.checkArg(from.isDirectory()); files = from.listFiles(filter); to.mkdirs(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { //File curto = new File(to, files[i].getName()); //curto.mkdirs(); copyTree(files[i], to, filter); } else { File curto = new File(to, files[i].getName()); copyFile(files[i], curto); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length...
[ "0.70557237", "0.69955915", "0.69946826", "0.6980535", "0.6632526", "0.6353734", "0.62642336", "0.5932849", "0.5877656", "0.5850667", "0.5818426", "0.5667379", "0.5628145", "0.56225836", "0.5515801", "0.5321025", "0.5315379", "0.5296059", "0.5287542", "0.52483726", "0.5244856...
0.6721886
4
Copy from an input stream to a file
public static void copyFile(InputStream in, File to) throws IOException { FileOutputStream out = new FileOutputStream(to); int len; byte[] buffer = new byte[4096]; while ((len = in.read(buffer)) != -1) { out.write(buffer, 0, len); } out.close(); in.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }", "protected void writeFromStreamToStream(InputStrea...
[ "0.7210888", "0.6881252", "0.6868957", "0.66319484", "0.65760803", "0.6443956", "0.6413198", "0.6407801", "0.6403256", "0.6372442", "0.6357866", "0.6332997", "0.6329483", "0.6326049", "0.6317874", "0.630162", "0.62209857", "0.6154725", "0.6148575", "0.61187315", "0.6083587", ...
0.7277662
0
Copy a single file from 'from' to 'to'
public static void copyFile(File from, File to) throws IOException { FileInputStream in = new FileInputStream(from); copyFile(in, to); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.len...
[ "0.8139802", "0.8072635", "0.7942877", "0.7809353", "0.7557397", "0.7521237", "0.7401647", "0.7215221", "0.7190383", "0.7158165", "0.71334696", "0.70690435", "0.69850063", "0.69680035", "0.6961818", "0.68012", "0.6795916", "0.6686615", "0.66825503", "0.6673353", "0.66638124",...
0.75484526
5
Delete a directory tree recursively. Does not delete file.
public static void delTree(File file) { File[] files = file.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { delTree(files[i]); } } } files = file.listFiles(); if (files != null) { for (int i = 0; i < files.length; i++) { files[i].delete(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteDirectory(String path, boolean recursive) throws IOException;", "public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisit...
[ "0.78064746", "0.6895766", "0.6865894", "0.6768083", "0.66636527", "0.6661025", "0.6583264", "0.6574442", "0.6568091", "0.6539849", "0.6521884", "0.65184486", "0.6436489", "0.6415346", "0.63964534", "0.6370144", "0.63657975", "0.6264808", "0.62471056", "0.62468386", "0.624109...
0.69980127
1
Try our best to find the base directory of plugin among an Eclipse project, this enable us to use run JUnit without the slow JUnit Plugin test This would still fail for EMMA as the run in alternative locations that doesn't mirror our plugin.
private static URL findPluginBaseWithoutLoadingPlugin(Plugin plugin) { try { URL url = plugin.getClass().getResource("."); try { // Plugin test with OSGi plugin need to resolve bundle resource url = FileLocator.resolve(url); } catch (NullPointerException e) { // junit non plugin test, OSGi plugin is not loaded } catch (IOException e) { // junit non plugin test } java.io.File currentFile = new java.io.File(url.toURI()); //$NON-NLS-1$ do { currentFile = currentFile.getParentFile(); if (currentFile.getName().equals("bin") || currentFile.getName().equals("src")) { //$NON-NLS-1$ //$NON-NLS-2$ if (new File(currentFile.getParentFile(), "plugin.xml").exists()) { //$NON-NLS-1$ // Eclipse project should have plugin.xml at root try { return currentFile.getParentFile().toURI().toURL(); } catch (MalformedURLException e) { // give up and just bail out to null like before return null; } } } } while (currentFile.getParentFile() != null); } catch (URISyntaxException e) { // give up and just bail out to null like before return null; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String getMspluginsDir();", "private static File getTestDataDir() {\n File ancestor = new File(System.getProperty(\"protobuf.dir\", \".\"));\n String initialPath = ancestor.getAbsolutePath();\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n thr...
[ "0.5615031", "0.54688185", "0.5459635", "0.54061204", "0.5401058", "0.53947884", "0.5366733", "0.53072053", "0.52842927", "0.52392805", "0.522886", "0.51957077", "0.5146819", "0.5121615", "0.5117626", "0.51033026", "0.50871116", "0.5062396", "0.5017759", "0.49842894", "0.4951...
0.69179577
0
Convert the path to a path relative to the base, if possible.
static public IPath removePrefixFromPath(IPath rootPath, IPath cpath) { if (matchingFirstSegments(rootPath, cpath) == rootPath.segmentCount()) { IPath suffix = cpath.removeFirstSegments(rootPath.segmentCount()); return suffix.setDevice(null); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String composePath(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\tFile file = new File(uri);\n\t\t\treturn file.toString();\n\t\t} else if (base != null) {\n\t\t\tFile file = new File(new File(base), uri.toString());\n\t\t\treturn f...
[ "0.67940396", "0.65103817", "0.650093", "0.649826", "0.645293", "0.6440863", "0.6281546", "0.6241292", "0.6238296", "0.61864024", "0.61496425", "0.61485773", "0.611379", "0.6045146", "0.60195506", "0.5998071", "0.5993166", "0.5913612", "0.5909248", "0.5887622", "0.5854934", ...
0.0
-1
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
static public IPath convertToWorkspacePath(IPath cpath) { return convertToWorkspacePath(cpath, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(c...
[ "0.6220461", "0.57223266", "0.5653778", "0.56442434", "0.56331414", "0.5626344", "0.5454092", "0.5426457", "0.5375721", "0.5263233", "0.52535", "0.5249022", "0.5242803", "0.5237084", "0.523676", "0.5230905", "0.52104133", "0.5205881", "0.5185584", "0.5146203", "0.51415145", ...
0.58434176
1
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) { return convertToWorkspacePath(cpath, makeCanonical, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(c...
[ "0.62219846", "0.58443296", "0.5723528", "0.56537104", "0.56447566", "0.563427", "0.56252414", "0.54558986", "0.54276377", "0.5377956", "0.52653456", "0.5253758", "0.5250187", "0.52449673", "0.5238877", "0.52382815", "0.5231728", "0.52105784", "0.520833", "0.5187905", "0.5147...
0.5110133
22
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
@SuppressWarnings("deprecation") static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) { if (!Platform.isRunning() || cpath == null) return null; if (makeCanonical) { try { // Since we have a filesystem path, try using the filesystem // and Java's smarter APIs to fix the caps early. // Watch out for the device being set incorrectly, though. String device = cpath.getDevice(); cpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device); } catch (IOException e) { // Something's wrong with the path; just use it as-is } } IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IFile file = root.getFileForLocation(cpath); if (file != null) { return file.getFullPath().setDevice(null); } if (resolveLinks) { // try to see if a linked resource points to this IFile[] files = root.findFilesForLocation(cpath); IPath newPath = null; if (files.length > 0) newPath = files[0].getFullPath().setDevice(null); else { IContainer[] folders = root.findContainersForLocation(cpath); if (folders.length > 0) newPath = folders[0].getFullPath().setDevice(null); } return newPath; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(c...
[ "0.6219269", "0.5841756", "0.5722039", "0.5653024", "0.5644985", "0.5633211", "0.54541904", "0.54266846", "0.5375393", "0.5262776", "0.5252619", "0.5248993", "0.52416754", "0.52373827", "0.5236632", "0.52303654", "0.52115566", "0.5206632", "0.5186087", "0.51457465", "0.514145...
0.5625862
6
Convert the full path to a full path inside the workspace, if possible. (E.g. change a linked resource to the real full path.) Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
static public IPath convertToWorkspaceLocation(IPath cpath) { if (!Platform.isRunning()) return null; IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IPath rootPath = root.getLocation(); IPath newPath = convertToWorkspacePath(cpath); if (newPath == null) return null; // convert to full path return rootPath.append(newPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String resolvePath();", "String getRealPath(String path);", "String fullpath(String path) {\n return fullpath(path, null);\n }", "@SuppressWarnings(\"deprecation\")\r\n\tstatic public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {\r\n if (!Pla...
[ "0.6104972", "0.60416", "0.5838979", "0.5778081", "0.5775615", "0.57148266", "0.5701763", "0.5688448", "0.5614072", "0.55846727", "0.5580416", "0.5571331", "0.5567523", "0.5556715", "0.5556705", "0.5511602", "0.5490028", "0.5473625", "0.5467969", "0.54641557", "0.54237294", ...
0.6276491
0
Variant of routine that works with caseinsensitive matching.
public static int matchingFirstSegments(IPath my, IPath anotherPath) { if (my == null || anotherPath == null) return 0; int anotherPathLen = anotherPath.segmentCount(); int max = Math.min(my.segmentCount(), anotherPathLen); int count = 0; for (int i = 0; i < max; i++) { if (!my.segment(i).equalsIgnoreCase(anotherPath.segment(i))) { return count; } count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCaseSensitive();", "boolean isCaseInsensitive();", "int getCaseSensitive();", "private static boolean equalsIgnoreCase(String inputOfCustomer) {\n\t\treturn false;\n\t}", "private boolean startsWithIgnoreCase(String str1, String str2) {\n return str1 != null && str2 != null && str1.toUpper...
[ "0.7101637", "0.6891024", "0.6717425", "0.66803277", "0.6597042", "0.6577928", "0.65709966", "0.6564515", "0.64880514", "0.6336553", "0.6317159", "0.62787175", "0.6273134", "0.62571573", "0.62471944", "0.623885", "0.62178206", "0.61729664", "0.61173326", "0.60240245", "0.5973...
0.0
-1
Map the given file to a path in the current workspace.
public static IFile convertFileToIFile(IContainer container, File file) { IPath path = new Path(file.getAbsolutePath()); IPath rootPath = container.getLocation(); int match = matchingFirstSegments(path, rootPath); Check.checkState(match >= rootPath.segmentCount()); path = path.removeFirstSegments(match); IFile wsFile = container.getFile(path); return wsFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMappingFilePath();", "public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "publi...
[ "0.641765", "0.57344604", "0.56916606", "0.56642205", "0.554232", "0.5431219", "0.54152286", "0.5375993", "0.5341977", "0.52837276", "0.5234846", "0.5224733", "0.52064663", "0.51494205", "0.5085321", "0.5084075", "0.50812", "0.5057424", "0.50478244", "0.5041755", "0.50408673"...
0.4819725
45
Map the given file to a path in the current workspace.
public static IFile convertFileToIFile(File file) { IPath path = new Path(file.getAbsolutePath()); IPath wsPath = convertToWorkspacePath(path, true); if (wsPath != null) return ResourcesPlugin.getWorkspace().getRoot().getFile(wsPath); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMappingFilePath();", "public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "publi...
[ "0.64195627", "0.57360375", "0.56633717", "0.55430746", "0.5432205", "0.5418685", "0.537601", "0.53421533", "0.52852887", "0.52373844", "0.52271634", "0.5208407", "0.5149971", "0.50878185", "0.5085971", "0.5082255", "0.5058626", "0.50452125", "0.50432605", "0.50412244", "0.50...
0.56908756
2
Map the given file to a resource in the current workspace. This only handles files that map to known workspace resources.
public static IResource convertFileToExistingResource(File file) { IPath path = new Path(file.getAbsolutePath()); IPath wsPath = convertToWorkspacePath(path, true); if (wsPath != null) return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setResourcefile (File file)\n {\n _resourcefile = file;\n }", "public Resource load(IFile f);", "public static IFile convertFileToIFile(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n ...
[ "0.6162885", "0.59324896", "0.58113", "0.57037973", "0.5551599", "0.5532826", "0.55217457", "0.53606516", "0.5342557", "0.5335956", "0.52953583", "0.52750933", "0.52716327", "0.5231782", "0.52225745", "0.5209178", "0.5204876", "0.5152059", "0.5128028", "0.5104074", "0.5067124...
0.7099855
0
Return the project for the given workspacerelative path.
public static IProject projectForPath(IPath path) { IProject result = null; if (path != null) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); result = root.getProject(path.segment(0)); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n...
[ "0.6788107", "0.6656197", "0.6547835", "0.64875823", "0.6476967", "0.6422693", "0.64150554", "0.64092505", "0.6398714", "0.6324174", "0.62939656", "0.6283334", "0.6186936", "0.6131988", "0.6120147", "0.6120147", "0.6072629", "0.6064474", "0.6051419", "0.59773827", "0.59670615...
0.7797397
0
Read contents of a file into an array
public static char[] readFileContents(File file, String encoding) throws CoreException { Check.checkArg(file); FileInputStream fis; try { fis = new FileInputStream(file); return readInputStreamContents(fis, encoding); } catch (IOException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.has...
[ "0.74047863", "0.7369295", "0.72883135", "0.70018905", "0.69533265", "0.69512033", "0.69347936", "0.68420434", "0.6802301", "0.6759347", "0.6720819", "0.6711178", "0.67026526", "0.66596144", "0.66292953", "0.65451634", "0.6534951", "0.65045553", "0.6494749", "0.6493054", "0.6...
0.62783945
39
Read contents of a file into an array
public static char[] readInputStreamContents(InputStream is, String encoding) throws CoreException { Check.checkArg(is); Reader reader; try { if (encoding != null) reader = new InputStreamReader(is, encoding); else reader = new InputStreamReader(is); return readReaderContents(reader); } catch (UnsupportedEncodingException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.has...
[ "0.74047863", "0.7369295", "0.72883135", "0.70018905", "0.69533265", "0.69512033", "0.69347936", "0.68420434", "0.6802301", "0.6759347", "0.6720819", "0.6711178", "0.67026526", "0.66596144", "0.66292953", "0.65451634", "0.6534951", "0.65045553", "0.6494749", "0.6493054", "0.6...
0.0
-1
Read contents of a file into an array
public static char[] readReaderContents(Reader reader) throws CoreException { Check.checkArg(reader); try { char[] buf = new char[1024]; StringBuffer sb = new StringBuffer(); int len; while ((len = reader.read(buf)) > 0) { sb.append(buf, 0, len); } reader.close(); return sb.toString().toCharArray(); } catch (UnsupportedEncodingException e) { throw new CoreException(createErrorStatus(e)); } catch (IOException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.has...
[ "0.74047863", "0.7369295", "0.72883135", "0.70018905", "0.69533265", "0.69512033", "0.69347936", "0.68420434", "0.6802301", "0.6759347", "0.6720819", "0.6711178", "0.67026526", "0.66596144", "0.66292953", "0.65451634", "0.6534951", "0.65045553", "0.6494749", "0.6493054", "0.6...
0.0
-1
Write contents of a file from an array
public static void writeFileContents(File file, char[] text, String encoding) throws CoreException { Check.checkArg(file); FileOutputStream fos; try { fos = new FileOutputStream(file); writeOutputStreamContents(fos, text, encoding); } catch (IOException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for ea...
[ "0.7134464", "0.6765383", "0.65795124", "0.6436172", "0.6401242", "0.6193176", "0.6120976", "0.60972995", "0.59564817", "0.5922213", "0.58919716", "0.5890758", "0.5863325", "0.58593845", "0.5800555", "0.5800125", "0.5779513", "0.57745725", "0.5752953", "0.57342917", "0.572493...
0.51993424
85
Write contents on array to an output stream
public static void writeOutputStreamContents(OutputStream os, char[] text, String encoding) throws CoreException { Check.checkArg(os); Writer writer; try { if (encoding != null) writer = new OutputStreamWriter(os, encoding); else writer = new OutputStreamWriter(os); writeWriterContents(writer, text); } catch (UnsupportedEncodingException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeArray(Object o) throws IOException;", "public void write(ArrayDataOutput out) throws FitsException, IOException;", "private void writeArrayToFile(Warship[] wsArr, FileOutputStream fos) throws Exception {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(fos);\n\t\t\tfor (Warsh...
[ "0.7113603", "0.69969493", "0.6509373", "0.6499473", "0.63814414", "0.6357646", "0.6251949", "0.6250746", "0.6198964", "0.61801815", "0.611326", "0.6113229", "0.61059076", "0.6104022", "0.60724795", "0.6066039", "0.60616744", "0.6051643", "0.60404485", "0.59957516", "0.599447...
0.0
-1
Write contents of an array to a file
public static void writeWriterContents(Writer writer, char[] text) throws CoreException { Check.checkArg(writer); try { try { writer.write(text, 0, text.length); } finally { writer.close(); } } catch (UnsupportedEncodingException e) { throw new CoreException(createErrorStatus(e)); } catch (IOException e) { throw new CoreException(createErrorStatus(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for ea...
[ "0.7471926", "0.7349244", "0.70549875", "0.67528754", "0.6707671", "0.6600337", "0.6558204", "0.6396269", "0.6388504", "0.63779885", "0.6340385", "0.63259584", "0.63103044", "0.62685335", "0.6143031", "0.61080974", "0.6071973", "0.60668916", "0.60445035", "0.6037573", "0.6037...
0.0
-1
Returns whether pathSegment is a valid part of a path in a Carbide project. This checks for file name validity and name only contains alphanumeric or hyphen or underscrore or dot characters
public static boolean isValidCarbideProjectPathSegment(String pathSegment) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); int typeMask = IResource.FILE | IResource.FOLDER; boolean valid = pathSegment.length() == 0 || workspace.validateName(pathSegment, typeMask).isOK(); if (valid) { for (int i = 0; i < pathSegment.length(); i++) { char c = pathSegment.charAt(i); valid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '.'); if (!valid) break; } } return valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isSafe(String pathComponent) {\n if (pathComponent == null) {\n return false;\n }\n if (!pathComponent.trim().equals(pathComponent)) {\n return false;\n }\n return pathComponent.matches(\"\\\\w([- .]|\\\\w)*\");\n }", "public stati...
[ "0.65919125", "0.63719517", "0.6337752", "0.62276155", "0.61314666", "0.60715556", "0.6053824", "0.59879315", "0.5979437", "0.59663725", "0.5869685", "0.58664787", "0.5813612", "0.58058465", "0.57907426", "0.5757196", "0.57341146", "0.5686322", "0.563852", "0.56330395", "0.56...
0.8673819
0
Resolve a workspacerelative path to correct any problems in capitalization.
public static IPath getCanonicalWorkspacePath(IPath wsPath) { IPath resolvedPath = new Path(""); //$NON-NLS-1$ IContainer container = ResourcesPlugin.getWorkspace().getRoot(); // flag to consume the rest of the path without lookup boolean failed = false; for (String segment : wsPath.segments()) { if (failed || container == null) { resolvedPath = resolvedPath.append(segment); continue; } IResource child = container.findMember(segment); if (child != null) { // found, so correct caps resolvedPath = resolvedPath.append(segment); if (child instanceof IContainer) { container = (IContainer) child; } else { container = null; } } else { // not found: manually search boolean found = false; try { for (IResource member : container.members()) { if (member.getName().equalsIgnoreCase(segment)) { resolvedPath = resolvedPath.append(member.getName()); found = true; if (member instanceof IContainer) { container = (IContainer) member; } else { container = null; } break; } } } catch (CoreException e) { // just fail } if (!found) { failed = true; resolvedPath = resolvedPath.append(segment); } } } return resolvedPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }", "private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\...
[ "0.5563999", "0.5361611", "0.53389657", "0.5315151", "0.52392286", "0.5182649", "0.5141884", "0.5129766", "0.5039421", "0.50347334", "0.50136757", "0.5009644", "0.50079894", "0.49862367", "0.49757147", "0.49520633", "0.4935482", "0.4930875", "0.49209857", "0.48852056", "0.486...
0.5344576
2
This is an analogue to new Path(String) but avoids some problems in the implementation when pathString is a relative path.
public static IPath createPossiblyRelativePath(String pathString) { // canonicalize slashes char[] pathChars = pathString.toCharArray(); int offset = 0; for (int i = 0; i < pathChars.length; i++) { if (pathChars[i] == '\\') pathChars[i] = '/'; } // The problem is, if "./" appears, then "../"'s after it are dropped, // so get rid of "./" early. The result will still be relative. while (offset + 2 <= pathChars.length) { if (pathChars[offset] == '.' && pathChars[offset+1] == '/') { offset += 2; } else { break; } } return PathUtils.createPath(new String(pathChars, offset, pathChars.length - offset)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Path(String path) {\n this(null, path);\n }", "Path createPath();", "public ElementDefinitionDt setPath( String theString) {\n\t\tmyPath = new StringDt(theString); \n\t\treturn this; \n\t}", "void path(String path);", "void path(String path);", "@Nonnull\n Path getPath();", "Path ...
[ "0.64360666", "0.62951124", "0.6180512", "0.6078494", "0.6078494", "0.6072257", "0.6070854", "0.6061382", "0.6025599", "0.5936771", "0.5900771", "0.5900771", "0.5900771", "0.5900771", "0.5900771", "0.5900281", "0.5842119", "0.5842119", "0.58265996", "0.57964855", "0.57878846"...
0.66776127
0
Tell if the given path refers to a parent directory (e.g. contains ".." entries)
public static boolean isPathInParent(IPath path) { // first see if any segments are ".." at all for (int i = 0; i < path.segmentCount(); i++) { if (path.segment(i).equals("..")) { //$NON-NLS-1$ // comprehensive check, canonicalizing path = new Path(path.toString()); if (path.segmentCount() > 0 && path.segment(0).equals("..")) { //$NON-NLS-1$ return true; } else { return false; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isParent() { return _file.isDir(); }", "public boolean isDirectory(String path);", "private String getParentPath(String path) {\n int slash = path.lastIndexOf('/');\n if (slash == -1) {\n return null;\n } else {\n if (slash == 0) {\n ...
[ "0.7153355", "0.65457284", "0.65002143", "0.6205144", "0.6085031", "0.6074283", "0.6071177", "0.60349476", "0.5987626", "0.59284294", "0.5806437", "0.5792399", "0.57737035", "0.57628417", "0.5757098", "0.56842476", "0.56261456", "0.5613641", "0.55761373", "0.5572259", "0.5526...
0.786468
0
Recurse the directory, returning files that match the given filter. The directories "." and ".." are filtered out before the filter sees them. The filter is passed files and directories, and a directory must pass the filter to be recursed.
public static File[] listFilesInTree(File dir, FileFilter filter, boolean recordDirectories) { List<File> files = new ArrayList<File>(); listFilesInTreeHelper(files, dir, filter, recordDirectories); return (File[]) files.toArray(new File[files.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<File> listFilesRecurse(File dir, FileFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}", "public static List<File> listFilesRecurse(File dir, FilenameFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}", "private static ...
[ "0.70562994", "0.70519274", "0.70512265", "0.64236116", "0.6421589", "0.61343354", "0.59475964", "0.5869907", "0.57541126", "0.57379794", "0.5554192", "0.55473477", "0.5535322", "0.55268544", "0.54901564", "0.54749256", "0.5454544", "0.5445843", "0.53704035", "0.53661054", "0...
0.6731632
3
Get the directory used for temporary files.
public static File getTemporaryDirectory() { File dir = new File(System.getProperty("java.io.tmpdir", //$NON-NLS-1$ System.getProperty("user.dir", "."))); //$NON-NLS-1$ //$NON-NLS-2$ try { return dir.getCanonicalFile(); } catch (IOException e) { return dir; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File getTempDirectory() {\r\n\t\tFile tempdir = new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t\treturn tempdir;\r\n\t}", "public static File getTempDirectory() {\r\n\t\treturn new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t}", "public static String getTempDirectoryPath()\n {\n...
[ "0.84345824", "0.8434069", "0.8188324", "0.8024957", "0.7467586", "0.72452253", "0.717578", "0.7105387", "0.6927717", "0.69228673", "0.6859015", "0.6764331", "0.6695612", "0.66916263", "0.6652084", "0.6587926", "0.6528948", "0.6497207", "0.64501315", "0.6420641", "0.6386753",...
0.8608079
0
Get the path in a form amenable to comparing with another path. On Win32 hosts, this lowercases the path. On other hosts, the path is unmodified.
public static IPath getComparablePath(IPath path) { if (path == null) return null; if (HostOS.IS_WIN32) { return new Path(path.toOSString().toLowerCase()); } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert ...
[ "0.6170662", "0.61029136", "0.6098539", "0.5993218", "0.5901969", "0.58841103", "0.5865367", "0.586382", "0.58561134", "0.58192563", "0.5732853", "0.56733763", "0.55830747", "0.5513746", "0.5463356", "0.5427311", "0.5402575", "0.53821677", "0.53604007", "0.53507674", "0.53390...
0.5693769
11
Get the file extension from path, guaranteed not to return null
public static String getSafeFileExtension(IPath path) { String fileExtension = ""; //$NON-NLS-1$ if (path != null) { String temp = path.getFileExtension(); if (temp != null) fileExtension = temp; } return fileExtension; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\tr...
[ "0.8066635", "0.767941", "0.76730096", "0.75590384", "0.75174665", "0.7485219", "0.7445778", "0.7395073", "0.73883045", "0.73861474", "0.7243157", "0.71392214", "0.7103148", "0.70987713", "0.70608246", "0.7056778", "0.7013907", "0.7011163", "0.6993983", "0.6992084", "0.698665...
0.8035113
1
Get the minimum timestamp resolution for a file in ms (based on heuristics for the OS).
public static long getMinimumFileTimestampResolution(IPath path) { // VFAT on Win32 uses 2 second increments. Linux ext2/3 uses 1 second resolution, // until ext4, where it becomes nanoseconds. // Assume the worst format in all cases. long res = HostOS.IS_WIN32 ? 2000 : 1000; if (path != null) { // todo } return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getMinFrequency() {\n\t\t\tif (mMinFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MIN_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (Nu...
[ "0.61873823", "0.61684096", "0.5691037", "0.56167823", "0.5488854", "0.54542726", "0.5442456", "0.5440883", "0.53946835", "0.5382877", "0.53509426", "0.5339244", "0.53052783", "0.5303177", "0.5289876", "0.5223305", "0.5182121", "0.5162177", "0.5132054", "0.51093465", "0.50883...
0.80004466
0
If the filesystem is case sensitive, locate the file on the filesystem on the given path, by ignoring case sensitivity differences. This is needed on casepreserving but not caseinsensitive filesystems.
public static IPath findExistingPathIfCaseSensitive(IPath path) { // PathUtils (shared with EDC) has the stock implementation return PathUtils.findExistingPathIfCaseSensitive(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public FileInfo findFile(String pkgPath) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n return fileLookup.get(pkgPath);\n }", "String getCaseSensitive();", "private void findMatches(String key, String path, boolean caseSensitive, boolean fileName) ...
[ "0.5647945", "0.5598765", "0.5537506", "0.5339665", "0.5290448", "0.528189", "0.5242377", "0.5166599", "0.51586324", "0.5108696", "0.50976676", "0.50869393", "0.5075394", "0.5013348", "0.4982418", "0.4981381", "0.49718192", "0.49564645", "0.49371985", "0.4930995", "0.49003035...
0.7434402
0
Search for a order by its id
public Order findOne(Integer id) { log.info("Request to finde Order : " + id); return orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ru.terralink.mvideo.sap.Orders find(long id)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.find()\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceI...
[ "0.73455447", "0.7299136", "0.7034596", "0.70038044", "0.6955689", "0.694168", "0.6921057", "0.6901805", "0.68942654", "0.6856572", "0.6841341", "0.68236643", "0.6820565", "0.6811569", "0.6753958", "0.66630214", "0.66281366", "0.6621683", "0.65212303", "0.6505786", "0.6491090...
0.72647554
2
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { /* TODO output your page here. You may use following sample code. */ String nic = (String) request.getParameter("nic"); db conexion = null; Informacion info = new Informacion(); try { conexion = new db(); String sql = "SELECT NIS_RAD, COD_TAR,MUNICIPIO,LOCALIDAD," + "DEPARTAMENTO,DIRECCION,APE1_CLI,APE2_CLI,NOM_CLI,REF_DIR,ACC_FINCA " + " FROM qo_datosum " + " WHERE NIC=? LIMIT 1 "; java.sql.PreparedStatement pst = conexion.getConnection().prepareStatement(sql); pst.setString(1, nic); java.sql.ResultSet rs = conexion.Query(pst); if (rs.next()) { info.setCliente(rs.getString("NOM_CLI") + " " + rs.getString("APE1_CLI") + " " + rs.getString("APE2_CLI")); info.setDepartamento(rs.getString("DEPARTAMENTO")); info.setLocalidad(rs.getString("LOCALIDAD")); info.setMunicipio(rs.getString("MUNICIPIO")); info.setNis(rs.getString("NIS_RAD")); info.setDireccion(rs.getString("DIRECCION")); } Gson gson = new Gson(); out.print(gson.toJson(info)); } catch (SQLException e) { out.print("Error: " + e.getMessage()); } catch (Exception e) { out.print("Error: " + e.getMessage()); } finally { if (conexion != null) { try { conexion.Close(); } catch (SQLException e) { out.print("Error: " + e.getMessage()); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.70042455", "0.6658758", "0.660358", "0.6509522", "0.6446582", "0.64430493", "0.643988", "0.64312905", "0.64286155", "0.6425095", "0.6425095", "0.64205915", "0.64205915", "0.64205915", "0.64176667", "0.6413566", "0.6413566", "0.6399695", "0.6394763", "0.6394763", "0.6393365...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
The main entry point.
public static void main(String[] args) throws IOException { Source source; final Map<String, String> options = new HashMap<>(); String nablaFile = null; String nablagenFile = null; String optionsFile = null; for (String arg : args) { if (parseOption(options, arg)) { continue; } else { if (nablaFile == null) { nablaFile = arg; } else if (nablagenFile == null) { nablagenFile = arg; } else if (optionsFile == null) { optionsFile = arg; } } } if (nablaFile == null) { throw new IllegalArgumentException("Missing .n file"); } if (nablagenFile == null) { throw new IllegalArgumentException("Missing .ngen file"); } if (optionsFile == null) { throw new IllegalArgumentException("Missing .json options file"); } source = Source.newBuilder(NABLA, new File(nablaFile)).build(); System.exit(executeSource(source, nablagenFile, optionsFile, System.in, System.out, options)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public static void main(){\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "public static void main(String []args){\n\n }", "public static void main (String []args){\n }", "public static void main()\n\t{\n\t}", "public static void m...
[ "0.7694411", "0.7286958", "0.7284583", "0.7280362", "0.72678703", "0.7261045", "0.7251257", "0.7230187", "0.7230187", "0.71732044", "0.71651006", "0.71431834", "0.7124002", "0.7106453", "0.7106453", "0.7106453", "0.7106453", "0.7106453", "0.7106453", "0.7104156", "0.70837134"...
0.0
-1
Get the configured parser
public static PackerFileParser get() { if(parser==null) { Iterator<PackerFileParser> packerFileParseIterator = ServiceLoader.load(PackerFileParser.class).iterator(); if(packerFileParseIterator.hasNext()) { parser = packerFileParseIterator.next(); } else { parser = new PackerFileParserImpl(); } } return parser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OptionParser getParser() {\n\t\treturn parser;\n\t}", "protected Parser getParser() {\n\t\treturn myParser;\n\t}", "public static DirectoryParser getParser() {\n return DirectoryParser.INSTANCE;\n }", "protected Parser getParser() throws TemplateException {\n try {\n return (P...
[ "0.77881366", "0.7661719", "0.7044575", "0.7005261", "0.6937173", "0.68976057", "0.6894687", "0.6843272", "0.6737571", "0.672156", "0.6645332", "0.6596504", "0.6516058", "0.639045", "0.6377312", "0.63733596", "0.63686925", "0.6318214", "0.63067305", "0.6303178", "0.6117097", ...
0.6778226
8
Convenience method for setting the current parser Setting the parser to null will force a new parser to be loaded by the service loader
public static void setParser(PackerFileParser newParser) { parser = newParser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setParser(CParser parser);", "private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }", "public void setEditorParser( GosuParser parser )\n {\n _parser = parser;\n }", "@NotNull\n\tpublic ParseResult setParserName(@NotNull...
[ "0.7158758", "0.6568426", "0.6351051", "0.6244449", "0.61003226", "0.60631454", "0.59922624", "0.59672725", "0.5873301", "0.5807757", "0.5772558", "0.57481843", "0.57463163", "0.5659732", "0.56417465", "0.5585626", "0.5581508", "0.55474484", "0.54951864", "0.5492005", "0.5456...
0.65160525
2
Metodo do link que grava o cliente antes de salvar a solicitacao
public void gravarCliente() { Cliente cliente = new DAO<Cliente>(Cliente.class) .buscaPorId(this.clienteId); this.solicitacao.adicionaCliente(cliente); System.out.println("Cliente a gravar é " + cliente.getNome()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/actualizarCliente\";\r\n\t}", "void realizarSolicitud(Cliente cliente);", "public void onClick$editClientButton() {\n\n\t\tClient client = buildClient();\n\t\tclient.setId(clientToEdit.getId());\n\n\t\tClientService clientService = ServiceLocato...
[ "0.6077099", "0.58045584", "0.5796004", "0.57907075", "0.5746823", "0.57393855", "0.5726444", "0.5693838", "0.5673267", "0.5643441", "0.560449", "0.5596487", "0.5569663", "0.55663806", "0.5547804", "0.5544705", "0.54867554", "0.5477882", "0.54439056", "0.54319775", "0.5427128...
0.53305256
27
grava uma nova solicitacao e edita caso ID seja diferente de null
public String gravar() { System.out.println("Gravando Solicitação "); if (solicitacao.equals("null")) { throw new RuntimeException("Usuario deve ter pelomenos nome"); } if (this.solicitacao.getId() == null) { new DAO<Solicitacao>(Solicitacao.class).adiciona(this.solicitacao); } else { new DAO<Solicitacao>(Solicitacao.class).atualiza(this.solicitacao); } this.solicitacao = new Solicitacao(); return "solicitacoes?faces-redirect=true"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\...
[ "0.6524091", "0.64075035", "0.63616985", "0.63464385", "0.6333753", "0.6298146", "0.6277807", "0.6277178", "0.62692606", "0.6170112", "0.61385894", "0.6135195", "0.6053645", "0.6039578", "0.60359323", "0.60299075", "0.602018", "0.60029143", "0.5989719", "0.597118", "0.5970616...
0.0
-1
remove uma solicitacao do banco
public void remover(Solicitacao solicitacao) { System.out.println("Removendo livro"); DAO<Solicitacao> dao = new DAO<Solicitacao>(Solicitacao.class); dao.remove(solicitacao); //recarrega a pagina devido ao cache this.solicitacoes = dao.listaTodos(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\...
[ "0.66938037", "0.63228065", "0.62048864", "0.6196028", "0.6088392", "0.60822463", "0.6024216", "0.59948164", "0.59919107", "0.59873056", "0.5968846", "0.5938657", "0.59291035", "0.5926651", "0.58964777", "0.5887032", "0.5878132", "0.5849617", "0.5834961", "0.58241636", "0.582...
0.62209207
2
loads tiles from a folder
public static ArrayList<BufferedImage> loadTileImages(String folder, int tileWidth, int tileHeight){ ArrayList<String> fileNames = new ArrayList<String>(); File newFolder = new File(folder); String child [] = newFolder.list(); if (child == null){ System.out.println("Folder does not exist!"); System.exit(1); } else { for(int l=0; l<child.length; l++){ fileNames.add(child[l]); } } ArrayList<BufferedImage> tileImages = new ArrayList<BufferedImage>(); for(int x=0; x<fileNames.size(); x++) { BufferedImage tileScale; tileScale = readImage(folder + "/" +fileNames.get(x)); tileScale = ScaleImage.scaleImage(tileScale, tileWidth, tileHeight); tileImages.add(tileScale); } return tileImages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new...
[ "0.76147836", "0.69624907", "0.6912812", "0.6859027", "0.64754987", "0.61630523", "0.6140703", "0.61363935", "0.6124889", "0.60620284", "0.60383165", "0.6006737", "0.59324414", "0.58254695", "0.5768944", "0.57644254", "0.573606", "0.57342356", "0.5709669", "0.5632913", "0.554...
0.6435767
5
Created by ZhenwenHe on 2016/12/7.
public interface Entry extends Serializable { Identifier getIdentifier(); void setIdentifier(Identifier id); Shape getShape(); void setShape(Shape s); void setIdentifier(long id); byte[] getData(); void setData(byte[] data); long getDataLength(); static Entry create(Identifier identifier, Shape shape, byte[] data) { return new EntryImpl(identifier, shape, data); } }
{ "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}", "@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\r...
[ "0.6233288", "0.6090113", "0.59912986", "0.5968621", "0.5920845", "0.5920845", "0.588963", "0.5845809", "0.5821821", "0.58026034", "0.57880616", "0.5781131", "0.5767946", "0.5734099", "0.57313097", "0.5708762", "0.5703672", "0.5701569", "0.5698989", "0.5698989", "0.5698989", ...
0.0
-1
This filter only applies if the header is present
@Override public void doFilter(ServletRequest req, ServletResponse res, final FilterChain chain) throws IOException, ServletException { if (StringUtils.isEmpty(((HttpServletRequest) req).getHeader(AUTH_HEADER))) { chain.doFilter(req, res); return; } //On success keep going on the chain this.setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() { @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { chain.doFilter(request, response); } }); super.doFilter(req, res, chain); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean containsHeader(String arg0) {\n return false;\n }", "default boolean hasHeader() {\n return true;\n }", "boolean hasHeader();", "boolean isSetHeader();", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean containsHeader(String ...
[ "0.712938", "0.6939474", "0.6841952", "0.67847407", "0.6606595", "0.65420926", "0.65146965", "0.63771164", "0.6356325", "0.63313025", "0.6149961", "0.60423166", "0.6038385", "0.6032921", "0.5995744", "0.5990034", "0.5918734", "0.5838035", "0.58361113", "0.57949924", "0.578577...
0.5251931
95
required .cn.mxz.protocols.user.PropsPro received = 1198031;
boolean hasReceived();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "frame.game.proto.User.UserInfo getUser();", "frame.game.proto.User.UserInfo getUser();", "void mo23214a(Message message);", "@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = ...
[ "0.5734592", "0.5734592", "0.5527332", "0.5499998", "0.5499435", "0.5489247", "0.5457216", "0.5440898", "0.54014724", "0.53804964", "0.5372968", "0.5368562", "0.53470653", "0.53434664", "0.5343221", "0.53396446", "0.53262293", "0.5309164", "0.530515", "0.5296908", "0.52796954...
0.0
-1
required .cn.mxz.protocols.user.PropsPro unReceived = 1112331;
boolean hasUnReceived();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPrese...
[ "0.5640321", "0.5579906", "0.54895335", "0.5385228", "0.53235495", "0.5315279", "0.52736425", "0.5272008", "0.5238896", "0.52352536", "0.52020085", "0.5186016", "0.51728636", "0.5166739", "0.5166739", "0.5163739", "0.51420754", "0.5137748", "0.51234066", "0.5097493", "0.50937...
0.0
-1
required int32 continuousDay = 102348;
boolean hasContinuousDay();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Day(int value) {\r\n\t\tthis.value = value;\r\n\t}", "Integer getStartDay();", "Integer getDay();", "public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}", "private int[] nextDay(int[] cells){\n int[] tmp = new int[cells.length];\n \n for(int i=1;i<cells.length-1;i++){\n ...
[ "0.5971594", "0.5946355", "0.59069395", "0.57692987", "0.57106113", "0.5584926", "0.5569391", "0.55565864", "0.55110174", "0.5498609", "0.54796475", "0.54732305", "0.5466464", "0.54603213", "0.54603213", "0.54603213", "0.545222", "0.5400696", "0.5379039", "0.536813", "0.53665...
0.56348616
5
Use LoginRewardPro.newBuilder() to construct.
private LoginRewardPro(Builder builder) { super(builder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LoginReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private LoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private LoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n ...
[ "0.53948236", "0.5376396", "0.5376396", "0.5376396", "0.5353266", "0.5173236", "0.5133137", "0.5095223", "0.50533026", "0.50288963", "0.502872", "0.49837953", "0.4928375", "0.49230057", "0.4909565", "0.4890803", "0.48694482", "0.48694482", "0.48060456", "0.47890633", "0.47654...
0.7551583
0
required bool reqardTypeThree = 10;
boolean hasReqardTypeThree();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRequired(boolean required);", "void setRequired(boolean required);", "boolean getRequired();", "boolean getRequired();", "boolean getRequired();", "public void setRequired(boolean value) {\r\n this.required = value;\r\n }", "public void setRequired(boolean required) {\n ...
[ "0.68586755", "0.6804346", "0.6744422", "0.6744422", "0.6744422", "0.6602447", "0.6554643", "0.6463983", "0.6336504", "0.6238919", "0.62379736", "0.6208776", "0.62055314", "0.62055314", "0.62055314", "0.6189056", "0.6174309", "0.6082791", "0.6050784", "0.6029993", "0.60282475...
0.7122344
0
required bool reqardTypeTen = 20;
boolean hasReqardTypeTen();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRequired(boolean required);", "void setRequired(boolean required);", "boolean getRequired();", "boolean getRequired();", "boolean getRequired();", "public void setRequired(boolean value) {\r\n this.required = value;\r\n }", "boolean hasReqardTypeThirty();", "boolean hasReqard...
[ "0.67200583", "0.66476333", "0.6592519", "0.6592519", "0.6592519", "0.65788895", "0.65435946", "0.6497027", "0.6431273", "0.6262832", "0.62313163", "0.6173842", "0.6052768", "0.59979576", "0.59979576", "0.59979576", "0.5997329", "0.59552276", "0.59496236", "0.58657855", "0.58...
0.69451153
0