query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Program to reverse a number ip>5678 o/p>8765
public static void main(String[] args) { int number =5678; int rem; int output=0; while(number>0){ rem=number%10; output=output*10+rem; number=number/10; } System.out.println("The reverse of a number is " +output); }
[ "public void reverseNumber() {\n\t\tint number = 123456789;\n\t\tint rev = 0;\n\t\twhile (number != 0) {\n\t\t\trev = rev * 10 + number % 10;\n\t\t\tnumber = number / 10;\n\t\t}\n\t\tSystem.out.println(rev);\n\t}", "int reverseNumberUsingInternet(){\n\t\t\treverse = 0;\n\t\t\tint copyNumber = number;\n\t\t\twhile...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SystemInstantiation__SystemAssignment_1" $ANTLR start "rule__SystemInstantiation__NameAssignment_3" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9110:1: rule__SystemInstantiation__NameAssignment_3 : ( RULE_ID ) ;
public final void rule__SystemInstantiation__NameAssignment_3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9114:1: ( ( R...
[ "public final void rule__SystemInstantiation__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:279...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Downloads syllabuses for subjects in the list
private void downloadSyllabus(String dir, String webPage, ArrayList<Subject> timetable) throws IOException { for (Subject s : timetable) { String syllabusPostfix = "predmety/getPredmetInfo?katedra=" + s.getDepartment() + "&zkratka=" + s.getShortcut(); dowloadFile(dir, "syllabus_" + s.getDepartment() + "...
[ "com.cfwf.cb.business_proto.ClientConnSchool.SubjectInfo getList(int index);", "java.util.List<com.cfwf.cb.business_proto.ClientConnSchool.SubjectInfo> \n getListList();", "Iterator listSubjects(RDFProperty property);", "private void initializeSubjects(){\n mListSubjects = new ArrayList<String>(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for assigning the receiver
public void setReceiver(Receiver receiver) { this.receiver = receiver; }
[ "public void setReceiver (Receiver receiver) {\n\t\t_receiver = receiver;\n\t}", "public void setReceiver(Receiver receiver)\n {\n removeAllReceivers();\n receivers.add(receiver);\n }", "public void setReceiver(AnswerEventReceiver receiver) {\n this.receiver = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
FIXME: Hack for MSVC 2013 which sems like it can't synthesize this even with default keyword: LoopAccessInfo(LoopAccessInfo &&LAI) = default;
@Converted(kind = Converted.Kind.AUTO_NO_BODY, source = "${LLVM_SRC}/llvm/include/llvm/Analysis/LoopAccessAnalysis.h", line = 521, FQN="llvm::LoopAccessInfo::LoopAccessInfo", NM="_ZN4llvm14LoopAccessInfoC1EOS0_", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm...
[ "@Converted(kind = Converted.Kind.AUTO_NO_BODY,\n source = \"${LLVM_SRC}/llvm/include/llvm/Analysis/LoopAccessAnalysis.h\", line = 531,\n FQN=\"llvm::LoopAccessInfo::operator=\", NM=\"_ZN4llvm14LoopAccessInfoaSEOS0_\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modifica la lista de concursos para el organizador
public void setConcursos(List<ConcursoDTO> concursos) { this.concursos = concursos; }
[ "public List<Concurso> listarConcursosConInscripcionAbierta() {\r\n\t\tConexionDB conexion_db = new ConexionDB();\r\n\t\tList<Concurso> lista = new ArrayList<Concurso>();\r\n\t\ttry (Connection connect = conexion_db.obtenerConexionBD();\r\n\t\t\t\tPreparedStatement statement = connect.prepareStatement(this.listaCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SQL function call string for the given function name and the function arguments
public interface SqlFunctionCallGenerator { Base64.Encoder BASE64_ENCODER = Base64.getEncoder(); /** * Returns SQL function call string of the format {@code functionName(argument1, argument2, argument3, ...)} */ default String getSqlFunctionCallString(FunctionCall functionCall) { return functionCall.ge...
[ "public abstract String toSql(String functionName, EvalContext evalContext, List<Object> arguments)\n\t\tthrows EvalException, EvalFallbackException;", "String getCallSql(String name);", "public String getSqlQueryByFunctionName(String sqlFunName,\n Vector<String> repPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that the dimensions order provided is compatible with the output array given. If it is not, the method throws an exception, if it is, nothing happens
private static void checkTensorDimOrder(long[] dataShape, int[] tensorDimOrder) throws IllegalArgumentException { if (tensorDimOrder.length != dataShape.length) { throw new IllegalArgumentException( "Tensor dim order array length is different than nu...
[ "public void checkShape(AbstractMatrix3D B, AbstractMatrix3D C) {\n\tif (slices != B.slices || rows != B.rows || columns != B.columns || slices != C.slices || rows != C.rows || columns != C.columns) throw new IllegalArgumentException(\"Incompatible dimensions: \"+toStringShort()+\", \"+B.toStringShort()+\", \"+C.to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
read persistence file ~/vnmrsys/persistence/MessageBox
private void readPersistence() { BufferedReader in; String line; String symbol; String value; StringTokenizer tok; String filepath = FileUtil.openPath("USER/PERSISTENCE/"+persistence_file); if(filepath==null) return; try { in = new ...
[ "private ArrayList<String> readMessages() \n throws Exception {\n\n File file = new File(envHome, TestDumper.SAVE_INFO_FILE);\n assertTrue(file.exists());\n\n ArrayList<String> messages = new ArrayList<String>();\n BufferedReader reader = new BufferedReader(new FileReader(file));\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether the given Point is illuminated by this light.
public abstract boolean illuminates(Point3 point);
[ "public abstract boolean illuminates(Point3 point, World world);", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "public abstract boolean entityUnderPoint(Point ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the stopTimestamp property.
public long getStopTimestamp() { return stopTimestamp; }
[ "public int getStopTime() {\n\t\treturn stopTime;\n\t}", "public java.lang.String getStopTime() {\r\n return stopTime;\r\n }", "public void setStopTimestamp(long value) {\n this.stopTimestamp = value;\n }", "public java.lang.String getLastStopTimestamp() {\n java.lang.Object ref = las...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an instance of LibrarySearch.
public LibrarySearch() { items = new ArrayList<Reference>(); }
[ "Search createSearch();", "public static GwebSearch create(){ \n\t\treturn impl.create();\n\t}", "TSearchResults createSearchResults(TSearchQuery searchQuery);", "public SearchClient createSearchClient() {\n return SearchClient.create(this);\n }", "public Search()\n\t{\n\t\tsetType(\"search\");\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column t_d0_stuff.edu
public void setEdu(String edu) { this.edu = edu == null ? null : edu.trim(); }
[ "public String getEdu() {\n return edu;\n }", "public void setLuogonascita_intestatario(String luogonascita_intestatario);", "public void setEduId(Integer eduId) {\n this.eduId = eduId;\n }", "public void setNameOfTheUniversity(String nameOfTheUniversity) {\n this.nameOfTheUniversit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int64 dailyRefreshTime = 2;
public long getDailyRefreshTime() { return dailyRefreshTime_; }
[ "long getDailyRefreshTime();", "public long getDailyRefreshTime() {\n return dailyRefreshTime_;\n }", "Date getLastRefreshTime();", "public abstract int getRefreshRate();", "int getReloadTime();", "@VTID(32)\r\n java.util.Date getRefreshDate();", "public Long refreshTime() {\n return thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update thumbnailView, when the bitmap finished update, is will be recycled immediately, do not use the bitmap again!
public void updateThumbnail(final Bitmap bitmap) { if (mThumbnailViewManager != null) { mApp.getActivity().runOnUiThread(new Runnable() { @Override public void run() { mThumbnailViewManager.updateThumbnail(bitmap); if (bitmap !=...
[ "private void updateImageViewer()\n {\n if (bitmapLoaded) {\n\n if (showTransformedBitmap && transformedBitmapIsValid) {\n ((ImageView) findViewById(R.id.imageView)).setImageBitmap(bitmapScaledTransform);\n } else {\n ((ImageView) findViewById(R.id.image...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check to export an interface for two types.
@Test(description = "export interface with two types") public void exportWithTwoTypes() throws Exception { final DataCollection data = new DataCollection(this); final TypeData type1 = data.getType("TestType1"); final TypeData type2 = data.getType("TestType2"); final Inter...
[ "boolean isInterface();", "public abstract boolean isInterface();", "public boolean isInterface();", "@Test(description = \"export interface with all types\")\n public void exportWithAllTypes()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final In...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the last pressed event.
public void setLastPressedEvent(MultiTouchCursorEvent lastPressedEvent) { this.lastPressedEvent = lastPressedEvent; }
[ "public MultiTouchCursorEvent getLastPressedEvent() {\r\n\t\treturn lastPressedEvent;\r\n\t}", "public void setLastClickedEvent(MultiTouchCursorEvent lastClickedEvent) {\r\n\t\tthis.lastClickedEvent = lastClickedEvent;\r\n\t}", "public void setLastKeyPressed(long time) {\n lastKeyPress = time;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Se NovoBrilho for positivo, entao atribuimos NovoBrilho a brilho Se NovoBrilho eh negativo, entao atribuimos brilhoNovoBrilho a brilho
public void alteraBrilhoDeExibicao(float NovoBrilho){ if (ligado) if(NovoBrilho >= 0 && NovoBrilho <= 10){ brilho = NovoBrilho; System.out.println("Brilho:" + NovoBrilho+ "\n"); } else if(NovoBrilho <= 0 && NovoBrilho >= -brilho){ ...
[ "public boolean esPositivo() {\n\t\treturn !esNegativo();\n\t}", "private void balancear(NoAN bisavo, NoAN avo, NoAN pai, NoAN i){\n if(pai.cor == true){\n \n //4 tipos de reequilibrios e acoplamento\n if(pai.elemento.getNome().compareTo(avo.elemento.getNome()) > 0){ // rotacao a esque...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstVariableDeclaration__Group_3__1" $ANTLR start "rule__AstVariableDeclaration__Group_3__1__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21730:1: rule__AstVariableDeclaration__Group_3__1__Impl : ( ( rule__AstVariableDeclaration__Dimensi...
public final void rule__AstVariableDeclaration__Group_3__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21734:1: ( ( ( rule__AstVariabl...
[ "public final void rule__AstVariableDeclaration__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21655:1: ( rule__AstVariabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates and returns new CubeState after random shuffle
public static CubeState getRandom(){ CubeState cs = new CubeState(); Random rand = new Random(); for (int i = 0; i < 20; i++) { cs = cs.times(Solver.generators.get(rand.nextInt(18))); } return cs; }
[ "public final static Cube randomize() {\n Cube cubeNew = Cube.generate();\n List<Position> set = Arrays.asList(Position.values());\n for (Position pos : set) {\n for (int i = 0; i < 1 + (int) (Math.random() * 3); i++) {\n cubeNew.turnLeft(pos, 1 + (int) (Math.random() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the vpnGatewayScaleUnit property: The scale unit for this vpn gateway.
public Integer vpnGatewayScaleUnit() { return this.innerProperties() == null ? null : this.innerProperties().vpnGatewayScaleUnit(); }
[ "public BigDecimal getSanwuScale() {\r\n\t\treturn sanwuScale;\r\n\t}", "public VpnGatewayInner withVpnGatewayScaleUnit(Integer vpnGatewayScaleUnit) {\n if (this.innerProperties() == null) {\n this.innerProperties = new VpnGatewayProperties();\n }\n this.innerProperties().withVpnGa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a dispense item identifier. Mandatory Field May be chained with other calls.
public DispenseItemBuilder dispenseItem(UniqueIdentifier id) { item.dispenseItem = id; return this; }
[ "public void addItem(final String modId, final Item item);", "void addId(II identifier);", "public void addItemToInventory() {\n\n try {\n String itemName = \"\";\n while(itemName.equals(\"\")) {\n controllerPresenter.get(\"addNewItem\");\n itemName = t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the target namespace in which the WSDL elements are defined.
public String getTargetNamespace();
[ "public String getTargetNamespace() {\n return _targetNamespace;\n }", "String getTargetNamespace();", "public String getXMLSchemaTargetNamespace() {\n String targetNamespace = getPreferenceStore().getString(CONST_DEFAULT_TARGET_NAMESPACE);\n if (!targetNamespace.endsWith(\"/\")) {\n tar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .hrpc.AuthResponse authresponse = 4;
com.openmdmremote.harbor.HRPCProto.AuthResponseOrBuilder getAuthresponseOrBuilder();
[ "com.openmdmremote.harbor.HRPCProto.AuthResponse getAuthresponse();", "com.openmdmremote.harbor.HRPCProto.RemoteAuth.AuthResponse getAuthresponse();", "com.openmdmremote.harbor.HRPCProto.AuthRequest getAuthrequest();", "com.openmdmremote.harbor.HRPCProto.RemoteAuth.AuthResponseOrBuilder getAuthresponseOrBuild...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The response body length, or 1 if none.
long getResponseLength();
[ "public Long getResponseLength() {\n return responseLength;\n }", "long getResponseLength() {\n if (mConnection != null) {\n return mConnection.getContentLength();\n }\n return -1;\n }", "public Integer getResponseLen() {\r\n return responseLen;\r\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds the optional operator in the SQL buffer text.
private int findOperator(String sql, int end) { String opChars = "=!?"; int pos = end - 1; char c; while (pos >= 0) { c = sql.charAt(pos); if (!Character.isWhitespace(c) && opChars.indexOf(c) < 0) { pos+...
[ "private static char getOperator() throws ParseError {\n TextIO.skipBlanks(); // Skip past any blanks in the input.\n\n char op = TextIO.peek();\n\n if ( op == '+' || op == '-' || op == '*' || op == '/' )\n TextIO.getAnyChar(); // Read the operator.\n else\n throw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "enhancedForControl" $ANTLR start "forUpdate" Java.g:686:1: forUpdate : expressionList ;
public final void forUpdate() throws RecognitionException { int forUpdate_StartIndex = input.index(); try { dbg.enterRule(getGrammarFileName(), "forUpdate"); if ( getRuleLevel()==0 ) {dbg.commence();} incRuleLevel(); dbg.location(686, 1); try { if ( state.bac...
[ "UpdateExpression createUpdateExpression();", "public final void for_loop_expression() throws Exception {\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Michael\\\\Documents\\\\Senior Design\\\\pseudoLanguage\\\\Language.g:126:2: ( FOR LPAREN ID ASSIGN VALUE SEMICOLON ID comparator VALUE SEMICOLON ID increment RPAREN compo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the target position by following the vector from the origin.
public Position resolveTarget() { return _vector.resolveTarget(_origin); }
[ "int getTargetPos();", "private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Direction...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
private final static String SELECTBYSID="select stitle,optiona,optionb,optionc,optiond,pic,answer,stid from subject where sid=?";
@Override public Subject selectSubjectBysid(int sid) { Connection con=null; PreparedStatement state=null; ResultSet res=null; Subject subject=null; try { con=DBUtil.getConnection(); state=con.prepareStatement(SELECTBYSID); state.setInt(1, sid); res=state.executeQuery(); ...
[ "private String selectByIdStatement(){\n if ( selectByIdStatement == null ){\n StringBuilder sb = new StringBuilder();\n sb.append(\"SELECT * FROM \\\"\").append(tableName).append(\"\\\" where id=?\");\n selectByIdStatement = sb.toString();\n }\n return selectBy...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Maps a Secret DTO to Entity.
public SecretEntity fromDto( CreateSecretDto secretDto) { if (secretDto == null) return null; SecretEntity secretEntity = new SecretEntity(); secretEntity.setName(secretDto.getName()); secretEntity.setValue(secretDto.getValue()); return secr...
[ "public SecretDto toDto(\r\n SecretEntity secretEntity) {\r\n\r\n if (secretEntity == null)\r\n return null;\r\n\r\n SecretDto secretDto = new SecretDto();\r\n\r\n secretDto.setSecretId(secretEntity.getSecretId());\r\n secretDto.setName(secretEntity.getName());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the answer text2.
public void setAnswerText2(String answerText2) { this.answerText2 = answerText2; }
[ "public void setAnswerText2(String answerText2) {\n\t\tthis.answerText2 = answerText2;\n\t}", "public void setAnswerText1(String answerText1) {\r\n\t\tthis.answerText1 = answerText1;\r\n\t}", "public void setAnswerText1(String answerText1) {\n\t\tthis.answerText1 = answerText1;\n\t}", "public String getAnswer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new another email sender.
public AnotherEmailSender() { }
[ "public EmailSender() {\r\n }", "public Email(){}", "public EmailHandler() {\r\n Properties prop = new Properties();\r\n\r\n String propFileName = \"config.properties\";\r\n\r\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for clients used to control competition obstacles.
@ThreadSafe @ParametersAreNonnullByDefault @ReturnValuesAreNonNullByDefault public interface ObstacleClient { Future<ReportStatus> activate(ExecutorService e, CourseLayout layout, RunSetup setup); Future<ReportStatus> turnOff(ExecutorService e, CourseLayout layout, RunSetup setup); }
[ "public void setupObstacles()\n {\n }", "public void setConstructingObstacle(Obstacle obstacle);", "public interface RobotController {\r\n \r\n // *********************************\r\n // ****** QUERY METHODS ********\r\n // *********************************\r\n /**\r\n * Gets the current...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generated method Getter of the AmazonConfig.authorizationMode attribute.
public EnumerationValue getAuthorizationMode() { return getAuthorizationMode( getSession().getSessionContext() ); }
[ "public EndpointAuthMode authMode() {\n return this.authMode;\n }", "public EnumerationValue getAuthorizationMode(final SessionContext ctx)\n\t{\n\t\treturn (EnumerationValue)getProperty( ctx, AUTHORIZATIONMODE);\n\t}", "public String getAuthorizationMode(FBContext fbContext) {\n return authori...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field704' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField704(java.lang.CharSequence value) { validate(fields()[704], value); this.field704 = value; fieldSetFlags()[704] = true; return this; }
[ "public void setField704(java.lang.CharSequence value) {\n this.field704 = value;\n }", "public void setField702(java.lang.CharSequence value) {\n this.field702 = value;\n }", "public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField703(java.lang.CharSequence value) {\n validate(fields()[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructors Construct a new CodecOptions.
public CodecOptions() {}
[ "public CodecOptions(CodecOptions options) {\n if (options != null) {\n this.width = options.width;\n this.height = options.height;\n this.channels = options.channels;\n this.bitsPerSample = options.bitsPerSample;\n this.littleEndian = options.littleEndian;\n this.interleaved = opti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
make sure we can successfully SchubsL and Deschubs one random file
@Test public void testOneSchubsL() throws IOException { String randomFile = "src" + File.separator + "resources" + File.separator + "random.txt"; String randomRenamed = "src" + File.separator + "resources" + File.separator + "randomRenamed.txt"; File one = new File(randomFile); F...
[ "@Test\n public void testOneSchubsH() throws IOException\n {\n String randomFile = \"src\" + File.separator + \"resources\" + File.separator + \"random.txt\";\n String randomRenamed = \"src\" + File.separator + \"resources\" + File.separator + \"randomRenamed.txt\";\n File one = new File(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets rejected document requests.
Page<HrDocumentRequest> getRejectedDocumentRequests(Pageable pageable);
[ "public List getRejectedDocs() {\n\t\treturn this.rejectedDocs;\n\t}", "public List<RequestInfo> getInErrorRequests();", "public List<RequestInfo> getCancelledRequests();", "public List<Request> getExpiredRequests();", "protected Set<String> getFailedDocuments() {\n Set<String> failedDocuments = new Tree...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gibt alle Benutzer in der Datenhaltung aus
public void printUsers (){ //gibt alle, in der Bdatenstrucktur geseicherten Benutzer aus int anzahl = getAnzahlUser(); System.out.println(anzahl); for (int i = 0; i < anzahl; i++) { System.out.print(i+1+ " "); System.out.println(users.get(i).toS...
[ "public void nutzerAktualisieren(Nutzer nutzer) {\n\t\tnutzerMapper.aktualisieren(nutzer);\n\t}", "private void recuperarUsuarios() {\r\n\t\tusuarios = Factories.persistence.createUsuarioDao()\r\n\t\t\t\t.getUsuariosInactiveFirst();\r\n\t\tLog.debug(\"Obtenida lista de usuarios conteniendo [%d] usuarios\", \r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attempt to change the state to UPDATE_IN_PROGRESS. Calls to this method must be synchronized on the EntryUpdateState instance.
public void startUpdate() { if ((state != NOT_YET_UPDATING) && (state != UPDATE_CANCELLED)) { throw new IllegalStateException("Cannot begin cache update - " + "current state (" + state + ") is not NOT_YET_UPDATI...
[ "protected final boolean updateInProgress() {\r\n return updatingThread == Thread.currentThread();\r\n }", "public void setInProgress(Boolean inProgress) {\n this.inProgress = inProgress;\n }", "private void updateStateChanged() {\n if (!entity.state().equals(initialState)) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
log.debug("in createEntrezFiles"); log.debug("instantiating IDecoderClient");
public void dbcreateEntrezFiles(String thisChip) throws IOException, SQLException { IDecoderClient myIDecoderClient = new IDecoderClient(); Identifier myIdentifier = new Identifier(); String query = "insert into gene_lists "+ "(gene_list_id, gene_list_name, created_by_user_id, organism, create_date,...
[ "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public EncodedFile() {\n\n\t}", "private XquestDefsFileReader() {\n\t}", "private GetFileIDsClient createGetFileIDsClient() {\n MessageBus messageBus = new ActiveMQMessageBus(settings.getMessageBusConfiguration());\n ConversationMediato...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the bound instances of the given extension point that match the given build system.
static <T extends BuildSystemExtensionPoint> ImmutableList<T> getInstances( ExtensionPointName<T> extensionPointName, BuildSystemName buildSystemName) { return Arrays.stream(extensionPointName.getExtensions()) .filter(f -> f.getSupportedBuildSystems().contains(buildSystemName)) .collect(toImmu...
[ "public interface BuildSystemExtensionPoint {\n\n ImmutableSet<BuildSystemName> getSupportedBuildSystems();\n\n /**\n * Get the bound instance of the given extension point that matches the given build system. Any\n * extension point that calls this is expected to provide one extension for each compatible buil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the Define Setup page Title text
public String get_defineSetupPage_Titletext() { return FetchText(DefineSetupPageTitle); }
[ "public String get_defineSetupPage_Nametext() {\r\n\t\treturn FetchText(DefineSetupPageName);\r\n\t}", "String getPageTitle();", "public String get_defineSetupPage_setupName() {\r\n\t\treturn FetchText(DefineSetup_SetupName_txtBx);\r\n\t}", "private String getToolTitle()\r\n {\r\n if (myDescription ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Main The Interface PathfindController. Defines what a Pathfind Controller does.
public abstract interface PathfindController extends Controller { // Public Abstract Methods /** * Block next coordinate in path. */ public abstract void blockNext(); /** * Calculate pathfinding and the states for visited and blocked of the * back, front, left, right respec...
[ "public interface Controller {\n\t\n\t/**\n\t * Lists all termini in this MTR network.\n\t * @return the name of all MTR stations that are the end point of the lines in the MTR network. \n\t * @throws IOException \n\t */\n\tString listAllTermini() throws IOException; \n\t\n\t/**\n\t * Lists the stations in their re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes instruction in frame
public void execute(StackFrame frame);
[ "boolean execute(Frame inFrame, ArrayList executionPredecessors, InstConstraintVisitor icv, ExecutionVisitor ev);", "protected void invoke() {\n // Read the instruction\n String instruction = registerStore.readFrom(Register.IR);\n \n try { \n // Split instruction and ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Name of the network driver plugin to use.
@ApiModelProperty(value = "Name of the network driver plugin to use.") public String getDriver() { return driver; }
[ "public String getPluginName();", "public abstract String getPluginName();", "public String getPluginName(){\n\t\treturn this.getPlugin().getDisplayName();\n\t}", "@Override public String getPluginName()\r\n\t{\r\n\t\treturn this.getClass().getName();\r\n\t}", "public String getDriverName() {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Option__Group_7__0" $ANTLR start "rule__Option__Group_7__0__Impl" InternalMyDsl.g:4121:1: rule__Option__Group_7__0__Impl : ( 'title' ) ;
public final void rule__Option__Group_7__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalMyDsl.g:4125:1: ( ( 'title' ) ) // InternalMyDsl.g:4126:1: ( 'title' ) { // InternalMyDsl.g:4126:1: ( 'title' ) ...
[ "public final void rule__Option__Group_7__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:4179:1: ( ( ( rule__Option__TitleAssignment_7_2 ) ) )\n // InternalMyDsl.g:4180:1: ( ( rule__Option__TitleAssignment...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all instances that match with the user nickname.
List<Task> findByUser_Nickname(String user);
[ "private void searchUsers() throws IOException, ClassNotFoundException {\n\tString searchFor = (String) clientIn.readObject();\n\tSet<String> userNames = Server.allUsers.keySet();\n\tIterator<String> itr = userNames.iterator();\n\tList<String> foundUsers = new ArrayList<String>();\n\tString temp;\n\twhile (itr.hasN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the itEndingInfo property.
public int getItEndingInfo() { return itEndingInfo; }
[ "public void setItEndingInfo(int value) {\n this.itEndingInfo = value;\n }", "public long getItEndingTime() {\n return itEndingTime;\n }", "public java.lang.String getEndNo() {\n return endNo;\n }", "public String getEndMarker() {\n return endMarker;\n }", "public Str...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if the file is readable for the specified section of the file and process id
public final boolean canReadFile(long offset, long len, int pid) { // Check if the lock list is valid if ( m_lockList == null) return true; // Check if the file section is readable by the specified process boolean readOK = false; synchronized ( m_lockList) { // Check if the file section...
[ "public static boolean isReadableFile( File path )\n {\n return path.isFile() && path.canRead();\n }", "public static boolean isReadable(final File file) {\n if (file == null)\n return false;\n if (!file.exists()) return false;\n\n boolean result;\n try {\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uses an XSL transformation to copy the specified XML Document, DocumentFragment or Element to the specified Node (which should be an XML Document, DocumentFragment or Element), and returning the generated XML as a Node. Can safely be called to copy a Document onto itself as: xmlXML1 = copy(xmlXML1, null); Can also safe...
public static Node copy(Node xmlXML, Node xmlResult) throws SAXException, IOException, TransformerConfigurationException, TransformerException { DOMResult...
[ "public static Node copy(Node xmlXML, DOMResult xmlResult)\r\n throws SAXException,\r\n IOException,\r\n TransformerConfigurationException,\r\n TransformerException \r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "articleId" element
org.apache.xmlbeans.XmlInt xgetArticleId();
[ "int getArticleId();", "public Integer getArticleId() {\n return articleId;\n }", "int getXmlId();", "public int getArticleId() {\n return articleId;\n }", "public Long getArticleId() {\n return articleId;\n }", "public Integer getArticleid() {\n return articleid;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs int[x]; contains an efficiency shortcut that simplifies int[Int[x]] to x.
private IntExpression sum(Expression x) { if (x instanceof IntToExprCast) return ((IntToExprCast)x).intExpr(); else return x.sum(); }
[ "private IntExpression toInt(Expr x, Object y) throws Err, ErrorFatal {\n if (y instanceof ExprToIntCast) {\n ExprToIntCast y2 = (ExprToIntCast) y;\n if (y2.expression() instanceof IntToExprCast)\n return ((IntToExprCast)y2.expression()).intExpr();\n }\n // ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find type of LHLD
static int type_of_lhld(String passed){ return 1; }
[ "int getLinetype();", "public String get_type(){\n\t\treturn \"L\";\n\t}", "static int type_of_sphl(String passed){\n\t\treturn 1;\n\t}", "public String getLBR_TypeIE();", "long getType();", "public int getLinetype() {\n return linetype_;\n }", "static int type_of_shld(String passed){\n\t\tretur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the element created from the given token. If token doesn't match any of the defined elements exception is thrown
private Element getElement(Token token) { if (token.getType() == TokenType.WORD) return new ElementVariable((String)token.getValue()); if (token.getType() == TokenType.STRING) return new ElementString((String)token.getValue()); if (token.getType() == TokenType.DOUBLE) return new ElementConstantDouble((...
[ "private Element getNumberOrVariableOrStringElement(Token token) {\n switch (token.getType()) {\n case INT:\n return new ElementConstantInteger((int) token.getValue());\n case DOUBLE:\n return new ElementConstantDouble((double) token.getValue());\n case VARIABLE:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ se crea la url raiz de nuestra pagina web y creamos un metodo index que le pasamos un objeto de la clase Model para agregar atributos a nuestra vista y enviar los datos que tiene nuestro modelo usuario
@GetMapping("/") public String Index(Model modelo) { modelo.addAttribute("usuarios",repositorio.findAll()); return "index"; }
[ "@GetMapping(\"/crear\")\n public String crearEstudiante(Model model) {\n model.addAttribute(\"estudiante\", new Estudiante());\n model.addAttribute(\"accion\", \"Crear\");\n model.addAttribute(\"direccionPost\", \"/estudiantes/crear\");\n return \"crearEstudiante\";\n }", "@GetM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Open CreateAccountActivity when user taps on "Sign up" TextView
private void onSignUpPressed(View view) { Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class); startActivity(intent); }
[ "public void onSignUpTextViewClick(View view) {\n // Launch SignUp Activity\n startActivity(new Intent(this, SignUpActivity.class));\n }", "public void onSignUpClicked() {\n loginView.startSignUpActivity();\n loginView.finishActivity();\n }", "@Override\n public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets opponent's loss speech
public String getLoss() { return lossSpeech; }
[ "@Override\n public void lossSpeech() {\n System.out.println(lossSpeech);\n }", "public String enemyLoss() {\n return enemyTalk('L') ;\n }", "public String playerLoss(){\n String quote = WordsHelper.shopkeeperQuote();\n return Colors.BOLD + \"You died! You are getting sent back ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
? super Dog > Dog ya da superi olmasi gerekli!
public static void addElementWildCardSuper( List < ? super Dog> dogs){ dogs.add(new Kangal()); dogs.add(new Dog()); //dogs.add(new Animal()); }
[ "@Override\r\n public int compare(node_info o1, node_info o2) {\n if (o1.getTag() < o2.getTag()) {\r\n return -1;\r\n } else if (o1.getTag() > o2.getTag()) {\r\n return 1;\r\n }\r\n return 0;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This endpoint consumes a request JSON to create a new project with help of an existing project and a new input data model, whose schema is somehow similar to the schema of the existing input data model. The request parameters can be: "input_data_model": the new input data model (incl. an input schema that is somehow si...
@ApiOperation(value = "migrates a project by applying a similar input schema to the mappings", notes = "Returns a new Project object. Persists this project (incl. all its parts, i.e., new sub elements, e.g., mappings will be persisted as well).", response = Project.class) @ApiResponses(value = {@ApiResponse(code = 201...
[ "@ApiOperation(value = \"create a new project by copying parts from existing project and utilising other existing entities\", notes = \"Returns a new Project object. Persists this project (incl. all its parts, i.e., new sub elements, e.g., mappings will be persisted as well).\", response = Project.class)\n\t@ApiRes...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method used to load database into table called by AllContactsForm on Startup
public static void loadTableFromDB() { try (Connection conn = DriverManager.getConnection(DB_CONNECTION_URL, USER, PASSWORD); Statement statement = conn.createStatement()) { String createTableSQL = "CREATE TABLE IF NOT EXISTS allcontacts(ID INT, Name varchar(30), LastName varchar(30),...
[ "public void initializeFromDatabase() {\n // get database\n food_database = new DbAccessFruitTypes(this);\n\n // get data if table already exists\n if (food_database.isTableExisting(food_database.TABLE_NAME_FRUIT_TYPES)) {\n // process data\n fruitTypes = food_datab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column agt_cert_link_log.IS_CERT
public Integer getIsCert() { return isCert; }
[ "public BigDecimal getCERTIFICATE_NO() {\r\n return CERTIFICATE_NO;\r\n }", "public LongAttribute getCertificateCategory() {\n return certificateCategory_;\n }", "public String getLinkCsCsiIdseq()\n {\n return (String)getAttributeInternal(LINKCSCSIIDSEQ);\n }", "public BigDecimal getSALES_C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Goes through all the horizontal squares in a certain direction, according to a pace.
private void learnHorizontalMovesWithDirection(int xPace) { boolean foundPiece = false; for (int xPos = getRefX() + xPace; !(referenceBoard.xPosOutOfBounds(xPos) || foundPiece); xPos += xPace) { if (referenceBoard.hasPieceAt(xPos, getRefY())) { foundPiece = true; ...
[ "private void learnVerticalMovesWithDirection(int yPace) {\n boolean foundPiece = false;\n for (int yPos = getRefY() + yPace; !referenceBoard.yPosOutOfBounds(yPos) && !foundPiece; yPos += yPace) {\n if (referenceBoard.hasPieceAt(getRefX(), yPos)) {\n foundPiece = true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column oim_household_price_rule.expiration_date
public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; }
[ "public void doSetExpirationDate(Date val) {\n this.dtExpiration = val;\n }", "@com.guidewire.pl.persistence.codegen.annotation.OverridesAccessor\n public void setExpirationDate(java.util.Date expDate) {\n ((com.guidewire.pl.domain.persistence.core.effdate.EffDatedPublicMethods)__getDelegateManager().getI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets this vector to be the tangent of itself
public void tangent() { tangent(this); }
[ "public void tangent(Vec2 v) {\n\t\tset(v.y(), -v.x());\n\t}", "public double tangent()\n {\n return Math.tan ( result );\n }", "public void setTangent(Vector3f tangent) {\n this.tangent = tangent;\n }", "public void changeTanOriginal() {\n this.changeTan(aorg, borg, corg, dorg, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a measurer that uses this method for a specified genome. This public method emits useful tracing information.
public Measurer getMeasurer(Genome genome) { long start = System.currentTimeMillis(); log.debug("Processing method {} for genome {}.", this, genome); Measurer retVal = this.setupGenome(genome); if (log.isInfoEnabled()) { var duration = Duration.ofMillis(System.currentTimeMill...
[ "public interface ITracer\n {\n\n /**\n * Determines whether this tracer is enabled. Clients may use this method to\n * avoid expensive calculation for debug output.\n *\n * @return <code>true</code> if the tracer is enabled\n */\n boolean isEnabled();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__CompVarDefination__Group_2__1__Impl" $ANTLR start "rule__CompVarDefination__Group_3__0" InternalDsl.g:19226:1: rule__CompVarDefination__Group_3__0 : rule__CompVarDefination__Group_3__0__Impl rule__CompVarDefination__Group_3__1 ;
public final void rule__CompVarDefination__Group_3__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:19230:1: ( rule__CompVarDefination__Group_3__0__Impl rule__CompVarDefination__Group_3__1 ) // InternalDsl.g:19231:2: rule__Co...
[ "public final void rule__CompVarDefination__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:19134:1: ( ( ( rule__CompVarDefination__Group_3__0 )? ) )\n // InternalDsl.g:19135:1: ( ( rule__CompVarDefina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the rating of this place.
protected Place setRating(double rating) { this.rating = rating; return this; }
[ "void setRating(float rating);", "public void setRating(int rating);", "public void setRating(int rating){\n this.rating = rating;\n }", "public void setRating(int rating)\n {\n this.rating = rating;\n }", "public void setRating(int rating) {\n this.rating = rating;\n if (th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs Drag&Drop operations via AWT Robot
public void performDragAndDrop() { if (from == null || to == null) { log.error("Attribute 'From' or 'To' is null!"); return; } final Point fromCoords = getCoords(getFromTreeItem()); final Point toCoords = getCoords(getToTreeItem()); Display.syncExec(new Runnable() { @Override public...
[ "@Test\n public void dragAndDropTest() {\n actionPage.open();\n actionPage.switchToFrame();\n actionPage.dragAndDrop();\n softAssert.assertTrue(actionPage.isDropped(), \"Drag and drop failed.\");\n softAssert.assertEquals(actionPage.getTargetText(), \"Dropped!\", \"Wrong text i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if field iLBPort is set (has been assigned a value) and false otherwise
public boolean isSetILBPort() { return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ILBPORT_ISSET_ID); }
[ "public boolean isSetIControlPort() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ICONTROLPORT_ISSET_ID);\n }", "public boolean isSetPort() {\n return __isset_bit_vector.get(__PORT_ISSET_ID);\n }", "public boolean hasPort() {\n return fieldSetFlags()[6];\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//////////////////////////////// MOVE CATEGORY/IMAGE Prints the 'Move category/image' menu to the screen. Awaits the users option and processes it. Loops until the user chooses to go back to the 'Browse organized images' menu.
private static void moveMenu(OrganizedCategory oldParent, int index) { // True if the 'Cancel.' option has been selected or the category/image has been moved. boolean exit = false; // A browser for files beginning at the user's home directory. ImageBrowser browser = new ImageBrowser(allOrganized); // A tempora...
[ "private static void browseOrganizedMenu(OrganizedCategory folder)\n {\n\t// True if the 'Back to 'Main' menu...' option has been selected.\n\tboolean backToMain = false;\n\t// A browser for files beginning at the user's home directory.\n\tImageBrowser browser = new ImageBrowser(folder);\n\t// A temporary variab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the highlighted fields have a preceeding sister, move it below the highlighted fields
public void moveFieldsUp() { if (highlightedFields.size() == 0) return; int numFields = highlightedFields.size(); XmlNode firstNode = highlightedFields.get(0); int firstNodeIndex = firstNode.getMyIndexWithinSiblings(); if (firstNodeIndex < 1) return; // can't move fields up. XmlNode parentNode = ...
[ "public void moveFieldsDown() {\n\t\t\n\t\tif (highlightedFields.size() == 0) return;\n\t\t\n\t\tint numFields = highlightedFields.size();\n\n\t\tXmlNode lastNode = highlightedFields.get(numFields-1);\n\t\tXmlNode parentNode = lastNode.getParentNode();\n\t\t\n\t\tint lastNodeIndex = lastNode.getMyIndexWithinSibling...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method that checks if two credit card variables hold identical values
@Test public final void testEqualsCreditCard() { assertTrue ("cc1 equals cc2", cc1.equals(cc2)); }
[ "@Test\n\tpublic void testIsCardEquals() {\n\t\tCard card = new Card(2,0);\n\t\tCard otherCard = new Card(3,1);\n\t\tassertNotSame(card, otherCard);\n\t\tCard card2 = new Card(2,1);\n\t\tassertNotSame(card, card2);\n\t\tCard card3 = new Card(3,0);\n\t\tassertNotSame(card, card3);\n\t\tCard card4 = new Card(2,0);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct the Wrapper generator with the specified deployment descriptor and class loader.
public WrapperGenerator(DeploymentContext context, EjbDescriptor dd, boolean isLocal, Vector existingClassNames) throws GeneratorException { super(); this.dd = dd; this.isLocal = isLocal; ClassLoader cl = context.getClassLoader(); try { //IASRI 4725194 this.bean = cl.loadClass(d...
[ "private WebappClassLoader createClassLoader()\n throws Exception {\n \t\n \tClass clazz = Class.forName(loaderClass);\n \tWebappClassLoader classLoader = null;\n \tClass[] argTypes = { ClassLoader.class };\n \tObject[] args = { parentClassLoader };\n Constructor constr = clazz.getConst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accuracy test for public void setPageSize(int pageSize).
public void testSetPageSizeAccuracy() throws Exception { int pageSize = 123; this.instance.setPageSize(pageSize); assertEquals("Page size should match.", pageSize, this.instance.getPageSize()); }
[ "public void assertPageSize(final long pageSize);", "public void setPageSize(int value) {\n this.pageSize = value;\n }", "public void assertPageSize(final String pageSize);", "public void setPageSize(int pageSize) {\n this.pageSize = pageSize;\n }", "long getPageSize();", "@Test\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Default Time Zone' attribute. The default value is "UTC". Default time zone for the application. For example this is used by perpetual inventory to store dates with a fixed reference timezone. It's a String, not a DateTimeZone object, to make it easier to edit the .AppManifest.xmi file using g...
String getDefaultTimeZone();
[ "public static String GetDefaultTimeZone()\n {\n return Account.GetDefaultTimeZone();\n }", "public static TimeZone getDefault();", "@Nullable\n public TimeZone getDefaultTimeZone() {\n return this.defaultTimeZone;\n }", "public static String defaultTimezoneInfo() {\n return n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method getAllStreets(filter by rateArea and zone)
public List<StreetBean> getAllStreets(RateAreaBean ab, ZoneBean z, Long timestamp) { //RateArea area = mongodb.findById(ab.getId(), RateArea.class); RateArea area = mongodb.findById(ab.getId(), RateArea.class); List<StreetBean> result = new ArrayList<StreetBean>(); if (area.getStreets() != null) { for (St...
[ "public void showStreets() {\n\t\tMonopolyClient.getStreets();\n\t}", "public ArrayList getStreets() {\n\t if(assertZipCodeMap()) {\n\t\t return CSVReader.getStreets(zipCodeMap, zipcode, street);\n\t }\n\t return new ArrayList();\n }", "List<Location> getLocationsByStreet(Address address) throws Servi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property timeline.
public void setTimeline(Timeline timeline) { this.timeline = timeline; }
[ "protected void setTimeline(RMTimeline aTimeline)\n{\n // Stop listening to old timeline property changes\n if(getTimeline()!=null) getTimeline().removePropertyChangeListener(this);\n \n // Set anim\n put(\"Anim\", aTimeline);\n \n // Set owner to this shape and start listening for property cha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column catch_info.catch_method
public void setCatchMethod(String catchMethod) { this.catchMethod = catchMethod == null ? null : catchMethod.trim(); }
[ "public String getCatchMethod() {\n return catchMethod;\n }", "public void setCatch_(Catch catch_) { \n\t\tthis.catch_ = catch_;\n\t}", "public native void setMethod(int method) /*-{\n\t\tthis.@com.pmt.wrap.titanium.android.calendar.Reminder::handler.method = method;\n\t}-*/;", "@Override\n publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This service method rounds a double to 5 decimal digits
public static double roundFiveDecimal(double number) { return (double)Math.round((number) * 100000d) / 100000d; }
[ "protected double roundForCalculations (double value) {\n double roundedValue = roundToDecimalPlaces(value, 6);\n return roundedValue;\n }", "double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\"); \n return Double.valueOf(twoDForm.format(d))...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add another prefSet to this one.
public void addPrefSet(PrefSet prefSet) { constructPreferencesIfNeeded(); for (Pref<?> pref : prefSet.values()) add(pref); }
[ "protected void augmentPrefSet(PrefSet otherPrefs)\n \t{\n \t\tif (prefSet == null)\n \t\t{ // TODO this should be thread safe; it is NOT\n \t\t\tthis.prefSet = new PrefSet();\n \t\t}\n \n \t\tfor (String k : otherPrefs.keySet())\n \t\t{\n \t\t\tthis.prefSet.put(k, otherPrefs.get(k));\n \t\t}\n \t}", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests getSocketConnectionTimeout with 5 set as the connection timeout
@Test public void testGetSocketConnectionTimeout() throws Exception { //sets up a connection timeout of 5 email.setSocketConnectionTimeout(5); int actualResult = email.getSocketConnectionTimeout(); assertEquals(5, actualResult); }
[ "int getConnecttimeout();", "private native int setConnectionTimeoutN(int timeout);", "public interface SocketTimeout {\n\n /**\n * Get the socket read timeout.\n */\n int getSoTimeout() throws SocketException;\n\n /**\n * Get the timeout set by previous setters calls and don't read from socket.\n */...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the SearchListingService to which this instance will delegate calls.
public SearchListingService getDelegate() { return delegate; }
[ "private SearchListingService getNonNullDelegate() {\n SearchListingService d = getDelegate();\n if (d == null) {\n LOG.log(Level.ERROR, \"DelegatingSearchListingService has no delegate\");\n throw new IllegalStateException(\"DelegatingSearchListingService has no delegate\");\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds date as text from previously set parameters (prefix, quantity and timeUnit). Date is formed in format according to format that have been set.
public MS_DateBuilder build() { prefix = prefix.toUpperCase(); if (prefix.equals("BEFORE")) { quantity = quantity * -1; } switch (timeUnit) { case DAY: case DAYS: date = date.plusDays(quantity); break; case ...
[ "public String dateToStringVersion () {\n\t\tString dateInString;\n\t\tString month = \"\";\n\t\tString superscript;\n\t\t// Changes the variable mes depending of the month given\n\t\tmonth = nameMonth();\n\n\t\t//Changes the superscript ordinals depending on the day\n\t\tswitch (this.day) {\n\t\t\tcase 1:\n\t\t\tc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wait for a signal from the master that we can start running. Slave sends SLAVE_READY_TO_GO to the master, and then waits for a semaphore which will be released after receiving SLAVE_GO
public static void waitToGo() { try { sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO); wait_to_run.acquire(); } catch (InterruptedException e) { } }
[ "public final void waitUntilReady() throws InterruptedException {\n\t\tsynchronized (syncObject) {\n\t\t\tif (sessionId == -1) {\n\t\t\t\tsyncObject.wait();\n\t\t\t}\n\t\t}\n\t}", "public void CondWait(){\n try {\r\n trainCond.await();\r\n } catch (InterruptedException ex) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of toString method, of class Habilidade.
@Test public void testToString() { System.out.println("toString"); String expResult = "Nome = Habilidade; Tipo = Fisica; Nivel = 0; Teste = 0; Custo = 0"; String result = instance.toString(); assertEquals(expResult, result); // TODO review the generated test code and re...
[ "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Alumno instance = null;\n String expResult = \"\";\n String result = instance.toString();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is a mutator method which changes charitablity
public void changeCharitability(int num) { charitable = num; }
[ "public void setChar(char c) { this.c = c; }", "public void setLetter(char c){ this.letter = c; }", "void setChar(char val);", "private void setPassageChar(char letter) {\n this.passageChar = letter;\n}", "public void setCharacter(String newCharacter)\n\t\t{\n\t\t\tcharacterName = newCharacter;\n\t\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .protobuf.stock_united_rep reps = 1;
java.util.List<protobuf.Protobuf.stock_united_rep> getRepsList();
[ "protobuf.Protobuf.stock_united_rep getReps(int index);", "protobuf.Protobuf.multiStocks_rep getRep();", "protobuf.Protobuf.multiStocks_repOrBuilder getRepOrBuilder();", "protobuf.Protobuf.stockRank_rep getReps(int index);", "public protobuf.Protobuf.stock_united_repOrBuilder getRepsOrBuilder(\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
count region in user_set but not in test_set user_set and test_set are sorted
public static int count_exclusive_regions(ArrayList<RegionVO> user_set, ArrayList<RegionVO> test_set){ int i = 0, j = 0, count = 0; while(i < user_set.size() && j < test_set.size()){ if (user_set.get(i).compareTo(test_set.get(j)) < 0){ i++; count++; }else if (user_set.get(i).getChr_id() == test...
[ "long countDistinctClusterByUsernameAndIsOrg(String loginUser, boolean isOrg);", "long getSystemRegionEntryCount();", "@Test\n public void testCalculateTotalVirtualUsers_2()\n throws Exception {\n Collection<? extends RegionRequest> jobRegions = new LinkedList();\n\n int result = Job...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Connect to the underlying hardware. These detectors do not connect to the hardware during their configure().
public void connect() throws DeviceException;
[ "private void initHutchConnect() {\n\n // Connect Via Bluetooth\n if (Utility._appSetting.getECUConnectivity() == 1) {\n initializeBluetooth();\n } else if (Utility._appSetting.getECUConnectivity() == 2) // Connect Via USB\n {\n initializeUSB();\n }\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Breadth First Search helper function for processQuery that searches through every child topic of a given topic subtree to find the aggregate count for the number of times a certain question prefix is seen. Does this by adding all of the children's questions from their questionsLiteral stack to a trie and merging any ch...
static int bfsQuestionPrefix( Map<String, TopicTreeNode> topicOntologyTreeMap, String topic, String questionPrefix) { // Get the node from the tree for this topic. TopicTreeNode topicSubTreeRoot = topicOntologyTreeMap.get(topic); // If the trie for this topic is already built, answer the query. if...
[ "int getQuestionPrefixCount(String questionPrefix) {\n\t\t\tQuestionTrieNode currNode = root;\n\t\t\tint currIndex = 0;\n\t\t\twhile (currIndex < questionPrefix.length()) {\n\t\t\t\tchar currChar = questionPrefix.charAt(currIndex);\n\t\t\t\tif (!currNode.children.containsKey(currChar)) {\n\t\t\t\t\treturn 0;\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when a swf has been loaded by the player
void handleSwfLoadedEvent(SwfLoadedEvent e) { // first we dump out a message that displays we have loaded a swf dumpSwfLoadedLine(e); }
[ "protected void onStageLoaded() {\n }", "void onLoadMovie(Movie movie);", "void doViewSwf()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\tString swfName = nextToken();\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"swf\", swfName); //$NON-NLS-1$\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends and returns a new empty "auth" element
public com.bagnet.nettracer.ws.onlineclaims.xsd.NtAuth addNewAuth() { synchronized (monitor()) { check_orphaned(); com.bagnet.nettracer.ws.onlineclaims.xsd.NtAuth target = null; target = (com.bagnet.nettracer.ws.onlineclaims.xsd.NtAuth)get_...
[ "public com.bagnet.nettracer.ws.onlineclaims.xsd.NtAuth addNewAuth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.bagnet.nettracer.ws.onlineclaims.xsd.NtAuth target = null;\n target = (com.bagnet.nettracer.ws.onlineclaims.xsd....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the actual value of the component to the original default.
public void resetToDefault() { if (_option != null) { setValue(_option.getDefault()); notifyChangeListeners(); } }
[ "public void resetValue(){\n\t\tif(!isFixed){\n\t\t\tval = DEFAULTVALUE;\n\t\t}\n\t}", "public void restoreDefaults() {\n\t\tthis.setValue(this.getDefaultValue());\n\t}", "public void reset() {\n\t\t\tsetValue(null,null);\n\t\t}", "protected void restoreDefaultsToComponents() {\r\n periodTimeComponent....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the state mapper to exclude certain suffixes if a condition is met. Return all properties whose suffixes should be ignored.
public AdvancedStateMap.Builder withPropertySuffixExclusions(Function<UnmodifiablePropertiesMap, List<IProperty<?>>> exclusions) { this.suffixExclusions.add(exclusions); return this; }
[ "boolean removeProperties(String pattern, String... excludePatterns);", "java.lang.String getIgnoreWhen();", "public SamFilterParamsBuilder excludeUnmapped(final boolean val) {\n mExcludeUnmapped = val;\n return this;\n }", "String getExcludes();", "public SamFilterParamsBuilder excludeMated(fi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get default user name
protected String getDefaultUserName() { return "admin"; }
[ "public java.lang.String getDefaultUserLoginName() {\r\n return defaultUserLoginName;\r\n }", "public static String getUserDisplayName() {\r\n return getUsername();\r\n }", "private String getLoggedInUserName() {\n try {\n /*\n * Get the user information.\n */\n Stri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
populates UI given an event
private void populateUI(Event event){ mTitle.setText(event.getTitle()); //sets title to event title mDescription.setText(event.getDescription()); }
[ "public abstract void update(UIReader event);", "private void setUIWithData() \n\t{\n\t\t// do nothing if myData is not complete\n\t\tif ( this.myData == null || this.myData.getTopEvent() == null )\n\t\t\treturn; \n\t\tmyTopColorLabel.setBackground( Colors.getEventColor( this.myData.getTopEvent() ) );\n\t\tmyBotC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the organization, department, intitute to which user belongs .
public void setOrganization(String in) { this.organization = in;}
[ "public void setUserDepartment(String userDepartment) {\r\n this.userDepartment = userDepartment;\r\n }", "public void setOrg(Organization org);", "private void setObjUser(People value) {\n if (value == null) {\n throw new NullPointerException();\n }\n objUser_ = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Curry a function of arity4.
public static <A, B, C, D, E> Func<A, Func<B, Func<C, Func<D, E>>>> curry(final Func4<A, B, C, D, E> f) { return new Func<A, Func<B, Func<C, Func<D, E>>>>() { public Func<B, Func<C, Func<D, E>>> f(final A a) { return new Func<B, Func<C, Func<D, E>>>() { public Func<C, Func<D, E>> f(final B b...
[ "public static <A, B, C, D, E> Func<B, Func<C, Func<D, E>>> curry(final Func4<A, B, C, D, E> f, final A a) {\n return curry(f).f(a);\n }", "public static <A, B, C, D, E> Func4<A, B, C, D, E> uncurryF4(final Func<A, Func<B, Func<C, Func<D, E>>>> f) {\n return new Func4<A, B, C, D, E>() {\n public E f(f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the maximum thread pool size
public void setMaximumPoolSize(int size) { logger.debug("Setting maximum thread pool size: {}", size); executorConfig.setMaximumPoolSize(size); }
[ "public void setThreadPoolMaxSize(int threadPoolMaxSize) {\n this.threadPoolMaxSize = threadPoolMaxSize;\n }", "void setThreadPoolSize(Integer threadPoolSize);", "public void setMaxPoolSize(int maxPoolSize);", "void setMaxThreads(int max);", "public abstract void setMaximumThreadCount(int maximumThreadC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }