query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Get mime type of file.
public String getContentType() { return contentType; }
[ "@Override\n public String getMimeType(String filename) {\n return mimeTypeManager.getMimeType(filename);\n }", "public String getMimeType(String file)\r\n {\r\n int dp = file.lastIndexOf('.');\r\n if (dp > 0)\r\n {\r\n return mime.getProperty(file.substring(dp + 1).toUpperCa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to calculate the sigmoid of a function
float calcSig(float x) { float e = (float) Math.exp((double) x); float sig = (1/(1+e)); return sig; }
[ "private double sigmoid(double x) { return 1d / (1 + Math.exp(-x)); }", "float sigmoid(float f)\n\t{\n\t\treturn (float)(1/(1+Math.exp(-f)));\n\t}", "private static double sigmoid(double x) {\n return 1 / (1 + Math.exp(-x));\n }", "private static double sigmoid(double x) {\r\n\t\treturn 1.0/(1.0 + M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Biller Work Request Id
@ApiModelProperty(value = "Biller Work Request Id") public String getWorkRequestId() { return workRequestId; }
[ "java.lang.String getReqid();", "public static long getId() {\n return requestId++;\n }", "public int requestID(){\n\t\treturn lastID++;\n\t}", "com.google.protobuf.ByteString\n getWorkIdBytes();", "public int getRequest_id() {\r\n\t\treturn request_id;\r\n\t}", "private static int generateRequ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Book book = bookRepository.findOne(bookid);
@ApiOperation(value = "get book information", notes = "get book information") @ApiResponses(value = {@ApiResponse(code = 200, message = "show book information")}) @ResponseStatus(HttpStatus.OK) @GetMapping(value = "/v1/book/{bookid}", produces = MediaType.APPLICATION_JSON_VALUE) public BookDto get( ...
[ "Book findById(int book_id);", "BookInstance findById(Long id);", "Optional<Book> findBookById(Long bookId);", "public Book getBookById(long id);", "Book findById(String id) throws SQLException;", "@Override\n public Book getBook(Long id){\n log.info(\"Retrieving book by id \" + id);\n Bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SubProcess__Group__5__Impl" $ANTLR start "rule__SubProcess__Group__6" InternalStubbrLang.g:15815:1: rule__SubProcess__Group__6 : rule__SubProcess__Group__6__Impl ;
public final void rule__SubProcess__Group__6() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalStubbrLang.g:15819:1: ( rule__SubProcess__Group__6__Impl ) // InternalStubbrLang.g:15820:2: rule__SubProcess__Group__6__Impl ...
[ "public final void rule__ValueObject__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAsomemodel.g:1827:1: ( rule__ValueObject__Group__6__Impl )\n // InternalAsomemodel.g:1828:2: rule__ValueObject__Group__6__Impl\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the operation name depending on available informations. The summary is used to name the operation, or else the operation summary is used.
private String operationName(PathOperation operation) { return operation.getTitle(); }
[ "public String getOperationName() {\n\t\tif (service.hasOperation(StringUtils.capitalize(operationName)))\n\t\t\treturn StringUtils.capitalize(operationName);\n\t\telse if (service.hasOperation(StringUtils.uncapitalize(operationName)))\n\t\t\treturn StringUtils.uncapitalize(operationName);\n\t\telse\n\t\t\tthrow ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fin constructor getters setters
public int getOperador1() { return operador1; }
[ "public PropertyManipulator()\n {\n }", "private Casier(){}", "public Personnage() {\n //OJO en vez de poner afuera las variables inicializadas con un valors par defaut las hubiera podido poner aqui, EGAL\n }", "private Propriedades() {\r\n\t}", "private Attributes() {}", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Manager__EndDateAssignment_3" $ANTLR start "rule__Manager__ManagesAssignment_6" InternalWH.g:2269:1: rule__Manager__ManagesAssignment_6 : ( ( RULE_ID ) ) ;
public final void rule__Manager__ManagesAssignment_6() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalWH.g:2273:1: ( ( ( RULE_ID ) ) ) // InternalWH.g:2274:2: ( ( RULE_ID ) ) { // InternalWH.g:2274:2: ( ( RULE_...
[ "public final void rule__DSLRuleAnalyzer__Group_5__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalSasDsl.g:4479:1: ( ( ( rule__DSLRuleAnalyzer__PlannerAssignment_5_2 ) ) )\n // InternalSasDsl.g:4480:1: ( ( rule__D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleDataSourceCall" $ANTLR start "ruleDataSourceCall" ../org.applause.lang.ui/srcgen/org/applause/lang/ui/contentassist/antlr/internal/InternalApplauseDsl.g:1053:1: ruleDataSourceCall : ( ( rule__DataSourceCall__Group__0 ) ) ;
public final void ruleDataSourceCall() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.applause.lang.ui/src-gen/org/applause/lang/ui/contentassist/antlr/internal/InternalApplauseDsl.g:1057:2: ( ( ( rule__DataSourceCall__Group__0 ) ) ) ...
[ "public final void ruleSQLCall() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2SQL.g:316:2: ( ( ( rule__SQLCall__Group__0 ) ) )\n // InternalBSQL2SQL.g:317:2: ( ( rule__SQLCall__Group__0 ) )\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unspecified which exception will be thrown in javadocs
@Test(expected = Exception.class) public void testConstructorInValidValues(){ exampleRange = new Range(0, -1); }
[ "String getInvalidArgumentMsg();", "public abstract Exception mo13719e();", "@Override\n protected boolean exceptionIndicatesDocumentIssue(Exception e) {\n return e instanceof ESBulkFail;\n }", "public DOMTestIncompatibleException(Throwable ex,\n DocumentBuilderSettin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds and returns the closest player (based on manhattan distance) to the rover.
public Player viewTarget(Rover rover, GameState gameState) { // Start with largest possible distance int closestDistance = Integer.MAX_VALUE; Player closestPlayer = null; Square[][] board = gameState.getBoard(); // Check the whole board for (int y = 0; y < board.length; y++) { for (int x = 0; x < boa...
[ "public Player caughtPlayer(Rover rover) {\n\t\tif (rover == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Player player : players) {\n\n\t\t\t//If there is a player without armour, whose location matches the rover\n\t\t\tif (player != null && !player.hasArmour() && player.getLocation().equals(rover.getLocation())) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.game.Protobuf.Fish_Object FishIDs = 6;
private void addAllFishIDs( java.lang.Iterable<? extends com.game.Protobuf.GameServer.Fish_Object> values) { ensureFishIDsIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, fishIDs_); }
[ "frame.game.proto.GameControl.FqzsLotteryOrBuilder getFqzsOrBuilder();", "java.util.List<? extends com.ronrytest.protobuf.lib.Int.IntegerEntityOrBuilder> getGonghaoOrBuilderList();", "java.util.List<protobuf.clazz.coin.CoinProtocol.CoinGameMiniInfoProto.GameMiniEntryProto> \n getEntrysList();", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
float[] N_resm = new float[4]; for(int i = 0; i < 4; i++) N_resm[i] = N[i];
public float trim(PPoint query_point, Set<RTDataNode> pt_set, RTNode N) { if(N.res_mbr == null) { N.res_mbr = new float[Constants.DIMENSION]; for(int i = 0; i < Constants.DIMENSION; i++) N.res_mbr[i] = N.get_mbr()[i]; } //for(int i = 0; i < pt_set.size(); i++) { N.res_mbr = clipping(que...
[ "Float[] toArray();", "@Override\n\tprotected void initMatrixStorage() {\n this.A = new short[(this.n * (this.n + 1) / 2)];\n }", "public float[] toMatrix() {\r\n\t\t\r\n\t\tfloat[] matrix = new float[16];\r\n\t\t\r\n\t\ttoMatrix(matrix);\r\n\t\t \r\n\t\treturn matrix;\r\n\t}", "double[] get4x4(dou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
tests the creation of histograms
@Test public void testGraphing() throws IOException { SentimentScore test = new SentimentScore(getResourceAsString("test3.json")); CategoryChart socialHist = test.plotSocialScores(); CategoryChart newsHist = test.plotNewsScores(); CategoryChart notesHist = test.plotNotesScores(); CategoryChart overallHist = ...
[ "Histogram buildHistogram();", "@Test\n public void testGetNoOfBins() {\n System.out.println(\"getNoOfBins\");\n Histogram instance = new Histogram(TestImage32x32.SUM_ROWS);\n int expResult = TestImage32x32.SUM_ROWS.length;\n int result = instance.getNoOfBins();\n assertEqual...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets URN for the domain.
public String getUrn(String domain, String name) { Map<String, String> withinDomain = getUrnDomainMap().get(domain); if (withinDomain != null) { return Val.chkStr(withinDomain.get(name)); } return ""; }
[ "@java.lang.Override\n public int getUrn() {\n return urn_;\n }", "@java.lang.Override\n public int getUrn() {\n return urn_;\n }", "java.lang.String getUuId();", "String getUomId();", "java.lang.String getUAccountName();", "public String getSndrUin() {\n return isIncomi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether or not this RealType refers to an interval (e.g. length difference, delta temperature).
public final boolean isInterval() { return isSet(getAttributeMask(), INTERVAL); }
[ "private boolean primitiveIntervalHasAttrValAncestor(odinParser.Primitive_interval_valueContext primitiveInterval) {\n odinParser.Primitive_objectContext primitiveObject = getPrimitiveObjectAncestor(primitiveInterval);\n odinParser.Object_value_blockContext objectValue = getObjectValueBlockAncestor(pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel3 = new javax.swing.JPanel(); jLabel17 = new javax.swing.JLabel(); txt_search = new javax.swing.JTextField(); jComboBoxS...
[ "public StForm() {\n initComponents();\n }", "public CineForm() {\n initComponents();\n }", "public javaform() {\n initComponents();\n }", "public EditDemographicForm() {\n initComponents();\n }", "public FightForm() {\n initComponents();\n }", "public For...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Mapper for the entity Ville and its DTO VilleDTO.
@Mapper(componentModel = "spring", uses = {}) public interface VilleMapper extends EntityMapper<VilleDTO, Ville> { @Mapping(target = "depots", ignore = true) Ville toEntity(VilleDTO villeDTO); default Ville fromId(Long id) { if (id == null) { return null; } Ville ville...
[ "@Mapper(componentModel = \"spring\", uses = {VeiculoMapper.class})\npublic interface ReservaMapper extends EntityMapper<ReservaDTO, Reserva> {\n\n @Mapping(source = \"veiculo_id.id\", target = \"veiculo_idId\")\n @Mapping(source = \"veiculo_id.veiculo\", target = \"veiculo_idVeiculo\")\n ReservaDTO toDto(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check that equality with string works
@Test public void testStringEquality() { final String resourceName = "Resource"; Assert.assertTrue(ResourceId.from(resourceName).equals(resourceName)); }
[ "@Test\n public void equalComparing() {\n String string1 = \"using equals method\";\n String string2 = \"using equals method\";\n\n String string3 = \"using EQUALS method\";\n String string4 = new String(\"using equals method\");\n\n assertThat(string1.equals(string2)).isTrue()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs any actions appropriate in response to the user having pressed the Rename button.
void onRenameClicked();
[ "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tString newName = JOptionPane.showInputDialog(null,\n\t\t\t\t\t\t\t\t\t\"Please enter new name\", null,\n\t\t\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\t\t\tmanager.reNameFile(global + newName, global);\n\t\t\t\t\t\t}", "public abstract void re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method calculates the average precision.
private static double getAveragePrecision(int topicId, Result[] results, Map<Integer, Set<String>> topicToRelevantDocs) { if(topicId < 0 || results == null || results.length == 0 || topicToRelevantDocs == null || topicToRelevantDocs.size() == 0) { LOGGER.log(Level.SEVERE, "Invalid input provided to getAveragePreci...
[ "public float averagePrecision(List<Integer> resultIds,\r\n Set<Integer> relevantIds) {\r\n float accPre = 0;// accumulated Precisions\r\n for (int revId : relevantIds) {\r\n if (resultIds.contains(revId)) {\r\n accPre += precisionAtK(resultIds, relevantIds,\r\n resultIds.indexOf(r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: q
public final IObjectWrapper mo2709q() { return ObjectWrapper.m26019a(this.f20331s); }
[ "public Q getQ();", "@Override\n\tpublic String toString() {\n\t\treturn \"Q\";\n\t}", "public String getQ() {\n return q;\n }", "public QValues getQ(){ return Q; }", "public List setQ(String q) {\n this.q = q;\n return this;\n }", "void q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string listen_http_for_gmt = 5;
public java.lang.String getListenHttpForGmt() { java.lang.Object ref = listenHttpForGmt_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); listenHttpForGmt_ = s; return s; } else { ...
[ "@Override\n public void onPageStarted(WebView view, String url, Bitmap favicon) {\n\n running = Math.max(running, 1);\n timeout = true;\n Log.e(TAG, \"load_IP_Domain: RUN\");\n\n }", "@Override\n public void onTrafficStatusUpdate() {\n\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
STEP 6: Define a findSet() method in DisjointSet class This method takes a node as input and finds the root node for the same input node.
public Node<T> findSet(final Node firstNode) { Node<T> parent = firstNode.parent; if (parent == firstNode) { return parent; } firstNode.parent = findSet(firstNode.parent); return firstNode.parent; }
[ "public UnionFindSetElement<T> find(UnionFindSetElement<T> e) {\r\n\t\tUnionFindSetElement<T> root = e;\r\n\t\twhile (!root.equals(e.parent)) {\r\n\t\t\troot = e.parent;\r\n\t\t}\r\n\t\t// path compression\r\n\t\tUnionFindSetElement<T> x = e, y;\r\n\t\twhile (!x.equals(root)) {\r\n\t\t\ty = x.parent;\r\n\t\t\tx.par...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The configuration details of the lifecycle policy.
public CreateLifecyclePolicyRequest withPolicyDetails(PolicyDetails policyDetails) { setPolicyDetails(policyDetails); return this; }
[ "java.lang.String getLifecyclePolicyId();", "public java.lang.String getLifecyclePolicyId() {\n java.lang.Object ref = lifecyclePolicyId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Empty constructor required for firebase deserialization
public OrderItem() {}
[ "public JsonSerializableDatabaseEntry() {}", "private Serializer() {\n }", "public User() {\n // Default constructor required for calls to DataSnapshot.getValue(User.class)\n }", "public SmallConsumerObjectAvro() {}", "public BPlusTree() {\n //Pedro -- I need an empty constructor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public List<BoardMember> joinTest() { return session.selectList("mem.selectjoin"); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the value of a property given its ID
public ISecurityProperty getProperty(String propertyID) { for(ISecurityProperty property : properties){ if (property.getPropertyID().equals(propertyID)) { return property; } } return null; }
[ "public Identifiable getOnebyProperty(String property, Integer id) throws PersistenceException, ObjectNotFoundException;", "public String get(String property);", "<T> T getPropertyValue(String property);", "public MyObject findProperty(int id){\n MyObject<Property> property = head;\n MyObject<Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleCondition" $ANTLR start "ruleCondition" ../at.ac.tuwien.big.views.view.ui/srcgen/at/ac/tuwien/big/views/view/ui/contentassist/antlr/internal/InternalView.g:720:1: ruleCondition : ( ruleVisibilityCondition ) ;
public final void ruleCondition() throws RecognitionException { int stackSize = keepStackSize(); try { // ../at.ac.tuwien.big.views.view.ui/src-gen/at/ac/tuwien/big/views/view/ui/contentassist/antlr/internal/InternalView.g:724:2: ( ( ruleVisibilityCondition ) ) //...
[ "public final void entryRuleVisibility() throws RecognitionException {\r\n try {\r\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/llvm/ireditor/ui/contentassist/antlr/internal/InternalLLVM_IR.g:4258:1: ( ruleVisibility EOF )\r\n // ../com.intel.llvm.ireditor.ui/src-gen/com/intel/l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an array of Color objects for use as a gradient, using an array of Color objects. It uses a linear interpolation between each pair of points. The parameter numSteps defines the total number of colors in the returned array, not the number of colors per segment.
public static int[] createMultiGradient(int[] colors, int numSteps) { //we assume a linear gradient, with equal spacing between colors //The final gradient will be made up of n 'sections', where n = colors.length - 1 int numSections = colors.length - 1; int gradientIndex = 0; //point...
[ "private void initColorMap(int stepSize, Color... colors) {\n colorMap = new int[stepSize * colors.length];\n int index = 0;\n for (int i = 0; i < colors.length - 1; i++) {\n Color c0 = colors[i];\n int r0 = c0.getRed();\n int g0 = c0.getGreen();\n in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Closes the client socket and causes the thread to finish.
public void cancel() { try { mmSocket.close(); } catch (IOException e) { Log.e(TAG, "Could not close the client socket", e); } }
[ "public void close() {\n\t\tthis.clientSocket.close();\n\t}", "public void close() {\r\n socket.close();\r\n }", "public void terminate() {\n try {\n socket.close();\n } catch (IOException ex) {\n // Ignore\n }\n }", "public void closeS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show 3 total pages.
@Override public int getCount() { return 3; }
[ "@Override\r\n\t\t\tpublic int getCount() {\n\t\t\t\treturn PAGES;\r\n\t\t\t}", "@Override\n\tpublic int noOfPages() {\n\t\treturn 5;\n\t}", "private void updateListOfPages() {\r\n if(numberOfResults != UNKNOWN_NUMBER_OF_RESULTS) {\r\n pageListPanel.clear();\r\n pageListPanel.add(new Label(\"Page\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the current camera viewport width
public float getWidth( ) { return normalizeX(Window.getWidth()); }
[ "public float getViewportWidth()\n\t{\n\t\treturn getViewportAABB().width;\n\t}", "public float getViewportWidthStatic()\n\t{\n\t\treturn staticVirtualCameraRect.width;\n\t}", "public static int getCAMERA_WIDTH() {\n\t\treturn CAMERA_WIDTH;\n\t}", "public float getViewportPixelWidthStatic()\n\t{\n\t\treturn v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
doc 0: [('doc', 0.9411707556763615), ('o', 0.04292635035829657), ('targetElement', 0.0427467952795473), ('njo', 0.02849599654597021), ('relatedElement', 0.028494073854482143), ('document', 0.010198314465552749), ('domFactory', 0.007343996479005305), ('obj', 0.007140999135723412), ('imgElement', 0.0071241559883066284), ...
public void removeUIEventListeners(Document doc) { EventTarget evtTarget = (EventTarget) doc.getDocumentElement(); // evtTarget 0 : [('evtTarget', 0.7875457574840501), ('target', 0.5288322684345171), ('newTarget', 0.01635899848269103), ('et', 0.00867014682313464), ('eventTarget', 0.005489454835470078...
[ "@Test\n public void testOrderAndNull(){\n Document d1 = new Document(\"Betty Botter bought some better butter butter\");\n Document d2 = new Document(\"but she said the butter bitter\");\n Document d3 = new Document(\"If I put it in my batter, it will make my batter bitter\");\n Docu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function will search and find register based on the numbers.
public Register findRegisterByNumber(String number) { return registers.get(number); }
[ "public registers getRegister(String find) {\r\n\t\t\r\n\t\tfor(int i=0; i<max; i++) {\r\n\t\t\tif(registerArray[i].getRegister().equals(find)) {return registerArray[i];}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args){\n int searchNum = 57;\n int[] numArr = {60...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 appid = 1;
public Builder clearAppid() { bitField0_ = (bitField0_ & ~0x00000001); appid_ = 0; onChanged(); return this; }
[ "public int getAppid() {\n return appid_;\n }", "public AppID getAppID()\n {\n return id;\n }", "long getIosAppStoreId();", "public String getAppId(){\n\t\t// Usually this can be a field rather than a method variable\n\t Random rand = new Random();\n\t // nextInt is norm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value that indicates whether the topic to be partitioned across multiple message brokers is enabled.
public TopicCreateOrUpdateParameters withEnablePartitioning(Boolean enablePartitioning) { this.enablePartitioning = enablePartitioning; return this; }
[ "public void setPartitioningFunc(String value) {\n setValue(PARTITIONING_FUNC, value);\n }", "boolean hasTopicSettings();", "public void setTopic(boolean isTopic) {\n this.isTopic = isTopic;\n }", "boolean usesPartitions();", "public TopicInfo setEnableBatchedOperations(Boolean value) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates an XmlObjectSigner with the configuration set in this object.
public XmlObjectSigner getXmlObjectSigner() throws IllegalStateException { if (keystoreFile != null && keystorePassword != null && keystoreAlias != null && keystoreAliasPassword != null && credentialType != null) { logger.debug("Initial...
[ "public SignatureRequestBuilder createSignature() {\n SessionStatusPoller sessionStatusPoller = createSessionStatusPoller(getSmartIdConnector());\n SignatureRequestBuilder builder = new SignatureRequestBuilder(getSmartIdConnector(), sessionStatusPoller);\n builder.withRelyingPartyUUID(this.getRelyingPartyU...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this function is used to get today trip count for a particulat type
public int GetTodayTripsCountFromDataBase(String type){ int count=0; try { String TodayDate = GetCurrentDate(); open(false); String selectQuery = ""; if (type.equals("All")) selectQuery = "SELECT * " + " FROM " + Constants.trip_table + " whe...
[ "@Override\n\tpublic long countDaily() {\n\t\treturn 0;\n\t}", "public int count(String type);", "public Integer getIncarCountToday() {\n return incarCountToday;\n }", "int getApprenticeCount();", "int getReservaCount();", "long getTodayTimeValue();", "public Long getCount(Integer type);", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets from a Map in a nullsafe manner.
public static Object getObject(final Map<?, ?> map, final Object key) { if (map != null) { return map.get(key); } return null; }
[ "public V get(Map<?, V> map){\r\n\t\tfor (Object k : keys){\r\n\t\t\tV v = map.get(k);\r\n\t\t\tif (v != null){\r\n\t\t\t\treturn v;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public String getValueFromMap(String key, String mapName) {\n return null;\n }", "@Override\n public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the creates the dt.
public Timestamp getCreateDt() { return this.createDt; }
[ "public long getDt() {\n\treturn (long)(Long.parseLong(_table.getProperty(\"dt\")));\n }", "public Dt dt() {\n if (_dt == null)\n _dt = new Dt(this, Keys.CDT_REF_SPEC_CDT_ID_FK);\n\n return _dt;\n }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _tasks.getCreateDate();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v= inflater.inflate(R.layout.fragment_reports, container, false); auth = FirebaseAuth.getInstance(); return v; }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the session start date
@CheckForNull @Restricted(NoExternalUse.class) //Stapler public Date getStartDate() { return startDate == null ? null : (Date) startDate.clone(); }
[ "public java.util.Date getSessionDateStart() {\n return sessionDateStart;\n }", "public Date getStartDate() {\n \n // Declare.\n Date startDate;\n \n // Initialize.\n startDate = null;\n\n // Check if the user preference exists.\n if (SessionUtilit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void loadItems() { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Two streams that produce overlapping results can be merged into one distinct stream allowing "or" searches.
@Test public void searchesCanBeJoinedDistinctly() throws Exception { final GithubClient githubClient = GithubClient.builder().api(uri).build(); /* * Produce a stream with duplicate entries, but not duplicate instances */ final List<String> actual = Stream.concat( ...
[ "default Stream<M> merge(Stream<L> left, Stream<R> right) {\n final LookAheadIterator<L> lLookAheadIterator = new LookAheadIterator<>(left.sorted(this::leftCompare).iterator());\n final LookAheadIterator<R> rLookAheadIterator = new LookAheadIterator<>(right.sorted(this::rightCompare).iterator());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by wangyao on 2017/6/26.
public interface UserService { User getProfile(int uid); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public int utilite() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.trak.grpc.gateway.v1.PageResponse page_response = 2;
public com.trak.grpc.gateway.v1.PageResponseOrBuilder getPageResponseOrBuilder() { if (pageResponseBuilder_ != null) { return pageResponseBuilder_.getMessageOrBuilder(); } else { return pageResponse_ == null ? com.trak.grpc.gateway.v1.PageResponse.getDefaultInstance() : pageRespo...
[ "grpc.testing.Messages.ResponseParameters getResponseParameters(int index);", "grpc.testing.Messages.EchoStatus getResponseStatus();", "routing.Pipe.ResponseOrBuilder getResponseOrBuilder();", "private void callNextPage (GraphResponse response) {\n graphRequest = response.getRequestForPagedResults(Grap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is copy constructor.
public SearchCondition(SearchCondition source) { searchMode = source.getSearchMode(); searchText = source.getSearchText(); binaryData = new ByteArrayEditableData(); if (source.getBinaryData() != null) { binaryData.insert(0, source.getBinaryData()); } }
[ "public Copy() { }", "CopyConstructor(CopyConstructor constructor) {\n\n\t\tid = constructor.id;\n\t\tname = constructor.name;\n\t}", "public Clone copy() {\n\t\treturn new Clone(this);\n\t}", "public CopyConstructorAndClone clone() {\n\t\t\r\n\t\t\r\n\t\treturn new CopyConstructorAndClone(this); //invokes ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Time O(n^2) Space O(1)
public static boolean isUniqueChars4(String word) { for (int i = 0; i < word.length(); i++) { for (int j = i; j < word.length(); j++) { if (word.charAt(i) == word.charAt(j)) { return false; } } } return true; ...
[ "for (int i = 1; i <= n; i++) {\n for(int j = 1; j <= n; j++) {\n // constant time code here\n }\n }", "public static int[] algorithm1(int N)//f(N) = 3/2*N^3 + 7/2*N^2 + 4*N + 6; O(N) = N^3\r\n\t{\r\n\t\tlong opCount = 0;\r\n\t\tint[] arr = new int[N];\r\n\t\t/*\r\n\t\t * Use the foll...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the set of all valid words in the given Boggle board, as an Iterable.
public Iterable<String> getAllValidWords(BoggleBoard board) { int row = board.rows(); int col = board.cols(); int n = row * col; int [] visit = new int[n]; StringBuilder words = new StringBuilder(2*n); // for Q-> QU case Set<String> answers = new HashSet<>(); lon...
[ "public Iterable<String> getAllValidWords(BoggleBoard board) {\n Set<String> words = new HashSet<>();\n\n for (int row = 0; row < board.rows(); row++) {\n for (int col = 0; col < board.cols(); col++) {\n boolean[][] visited = new boolean[board.rows()][board.cols()];\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Add enough characters to the specified string buffer to compensate for the difference between the specified string and specified length.
private static void fill_(char[] string, int length, char c, StringBuffer sb) { fill_(string.length, length, c, sb); }
[ "public void append(String str) {\n/* 103 */ String s = (str != null) ? str : \"null\";\n/* 104 */ int strlen = s.length();\n/* 105 */ int newlen = this.len + strlen;\n/* 106 */ if (newlen > this.buffer.length) {\n/* 107 */ expand(newlen);\n/* */ }\n/* 109 */ s.getChars(0, strlen, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Se valida y/o bloquea caja pago para el cobro
public static String obtieneEstadoCaja()throws SQLException { parametros = new ArrayList(); parametros.add(FarmaVariables.vCodGrupoCia); parametros.add(FarmaVariables.vCodLocal); parametros.add(new Integer(VariablesCaja.vNumCaja.trim()));//nNumCaj_in log.debug("invoca PTOVENTA...
[ "public int validarPago() {\n persistencia.validarPago();\n List<Postulacion> postulacionesEnTramite = persistencia.obtenerPorEstado(EstadoPostulacion.EN_TRAMITE);\n\n int conteo = 0;\n for (Postulacion postulacion : postulacionesEnTramite) {\n //cambiar estado\n po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create the socket server object
public static void main(String args[]) throws IOException, ClassNotFoundException, NoSuchAlgorithmException { server = new ServerSocket(port); //keep listens indefinitely until receives 'exit' call or program terminates //Parameter passed to the constructor here is the threshold frequencies abo...
[ "public SocketServer(SocketServerConfig config)\n {\n config_ = config;\n listeners_ = new ISocketServerListener[0];\n }", "public void createServerSocket() {\n engine = new ServerEngine();\n gameState = new GameState();\n engine.setPlayTime(Integer.parseInt(ServerMainWindow....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
There is not standardized name for the 'userId' in the 'TokenInfo'Object.
protected String[] getPossibleUserIdKeys() { // we only use 'uid' at the moment for userids return new String[] { UID }; // return new String[] {"uid", "user", "username", "userid", "user_id", // "login", "id", "name"}; }
[ "java.lang.String getSUserId();", "private String extractUserId() {\n return jwtHolder.getJwt().getSubject();\n }", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId()\n {\n return userId;\n }", "@java.lang.Override\n public java.lang.String getUserId...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by phihau on 5/7/2017.
public interface LoginContract { interface LoginView extends BaseView { void loginSuccess(); } interface LoginPresenter { void login(String phone, String pass, String device_id, String device_token); } }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n public int utilite() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public static int Required_ID;
public static void main(String[] args){ System.out.println("Cowin Portal initialized"); System.out.println("---------------------------------------------------------------"); System.out.println("1. Add Vaccine"); System.out.println("2. Register Hospital"); System.out.println...
[ "public int get_ID();", "public int getID(){\n return ID;\n }", "public int getID(){\r\n\t\treturn ID;\r\n\t}", "public static int getAftID(){\n return aftID;\n }", "public void setID(int n){\n ID = n;\n }", "public int getID ()\n {\n return student_id;\n }", "public int getValue(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for lastUpdatedByUsername. The username of the last person to update the deployment
@JsonProperty("lastUpdatedByUsername") public String getLastUpdatedByUsername() { return lastUpdatedByUsername; }
[ "public String getLastUpdatedBy() {\r\n return this.lastUpdatedBy;\r\n }", "@Override\r\n\tpublic String getUsername() {\r\n\t\treturn version.getVersionName();\r\n\t}", "public String getUpdatedByName() {\r\n return updatedByName;\r\n }", "public java.lang.String getAddressValueLastUpdate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__LEDMethods__Group__0" $ANTLR start "rule__LEDMethods__Group__0__Impl" InternalBotDuino.g:7657:1: rule__LEDMethods__Group__0__Impl : ( ( rule__LEDMethods__SuperTypeAssignment_0 ) ) ;
public final void rule__LEDMethods__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBotDuino.g:7661:1: ( ( ( rule__LEDMethods__SuperTypeAssignment_0 ) ) ) // InternalBotDuino.g:7662:1: ( ( rule__LEDMethods__SuperTyp...
[ "public final void rule__Type__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMiniJava.g:1612:1: ( rule__Type__Group_0__2__Impl )\n // InternalMiniJava.g:1613:2: rule__Type__Group_0__2__Impl\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1. you can not new Singleton() in other places
private Singleton2() { }
[ "private SingletonDesignDemo(){}", "private Singleton() {\r\n }", "private Singleton() {\r\n\r\n }", "private Singleton() {\n\n }", "private LazyDoubleCheckSingleton() {\n\n }", "public Singleton() {\n super();\n }", "private SingletonExample() {\n\t\tsuper();\n\t}", "private Sim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
2nd test for toString()
@Test public void test2ToString() { AddressEntry entry = new AddressEntry("Jane", "Doe", "123 Street", "Fremont", "Ca", 94555, "123-000-7009", "n/a"); assertEquals("Jane Doe\n 123 Street\n Fremont, Ca 94555\n n/a\n 123-000-7009\n", entry.toString()); }
[ "@Override\n public void testToString()\n {\n }", "@Test\r\n public void test_toString_1() {\r\n instance = new MemberContributionPoints();\r\n String res = instance.toString();\r\n\r\n assertTrue(\"'toString' should be correct.\", res.contains(\"id:0\"));\r\n assertTrue(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: e
public Rect mo6123e() { int[] iArr = new int[]{Integer.MAX_VALUE, Integer.MAX_VALUE}; this.f6694a.getLocationInWindow(iArr); int i = iArr[0]; int i2 = iArr[1]; return new Rect(i, i2, this.f6694a.getWidth() + i, this.f6694a.getHeight() + i2); }
[ "@Override protected void process (int e) {\n\t\t}", "@Override\n\tpublic void eee() {\n\t\t\n\t}", "public void e() throws c {\n for (i a2 : this.f13971e) {\n a2.e();\n }\n }", "@Override\n\tpublic void visitEnemigo(Enemigo e) {\n\n\t}", "public int e() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets cached jdbc driver list to null, force reget the infomation when required next time.
public static void resetJdbcDriverNames( ) { jdbcDrivers = null; }
[ "@Override\n\tpublic void beforeJFinalStop() {\n\t\tsuper.beforeJFinalStop();\n\t\tEnumeration<Driver> drivers = DriverManager.getDrivers();\n\t\tSystem.out.println(\"开始反注册driver...\");\n\t\twhile (drivers.hasMoreElements()) {\n\t\t\tDriver driver = drivers.nextElement();\n\t\t\ttry {\n\t\t\t\tDriverManager.deregis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Required Passes: None Element Tested: CM Risk Weight (bkt 14) Risk Measure: Delta Group: Commodities
@Test public void testC249() { List<FixedAmount> fixed = Collections.emptyList(); List<NotionalFactor> factors = Collections.emptyList(); List<Notional> notional = Collections.emptyList(); List<ProductMultiplier> multipliers = Collections.emptyList(); List<Sensitivity> sensitivities = Collections....
[ "private double analyzeInvestment() {\n\treturn this.riskFactor * 50;\n }", "@Test\n public void presentValueNoConvexityAjustment() {\n double mqExpected = MQ_3M_CAL[2]; // Dec 14 price\n double pvExpected = (mqExpected - LAST_MARGIN_PRICE_ERZ4) * NOTIONAL * FUTURE_FACTOR * QUANTITY_ERZ4;\n MultiCurr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Iterates through the file stack If the file is a parent folder push the children onto the stack
public File getNextFile(){ //Returns null if there are no more files to iterate through if(fileStack.empty()){ return null; } //Loops and fills stack until it finds a file with no children while(fileStack.peek().listFiles() != null) { File file = fileSta...
[ "@Override\r\n\tpublic void buildTree() {\r\n\t\tif(this.file.exists()) {\r\n\t\t\tFile[] files = file.listFiles();\r\n\t\t\t\r\n\t\t\tfor(File f: files) {\r\n\t\t\t\tif(!f.isHidden()) {\t// we do not want to include hidden files or folders\r\n\t\t\t\t\tif(f.isDirectory()) {\r\n\t\t\t\t\t\tFTFolder newFolder = new ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub return super.toString();
@Override public String toString() { return "*************************************************"+ "------------------------------------------------"+"\n"+ this.host+"\n"+ "------------------------------------------------"+"\n"+ this.indexes+"\n"+ "------------------------------------------------"+...
[ "@Override public String toString() {\n\t\t \n\t return super.toString();\n\t }", "@Override\n public String toString() {\n return super.toString();\n }", "public String toString()\n {\n return super.toString();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
no recording generation no action
private void recordGPF(Population toRecord, int generation, int replicate) { if(!snapman.recordGPF(generation))return; // No output file no action if(this.outputGPF==null) return; this.logger.info("Recording genotype/phenotype/fitness at generation "+generation+" of replicate "+repli...
[ "protected abstract void nextGeneration();", "public void generate() {\n btGenerate().push();\n }", "public Recording() {\n\t\t// default constructor\n\t}", "public void generate() {\n \tnew GenerationDialog();\n }", "abstract void prepareNextGeneration();", "private Report()\n\t\t{\n\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 25 / 1 covered goal: Goal 1. com.ib.client.EWrapperMsgGenerator.updateMktDepthL2(IILjava/lang/String;IIDI)Ljava/lang/String;: rootBranch
@Test public void test25() throws Throwable { String string0 = EWrapperMsgGenerator.updateMktDepthL2((-2514), 5214, "h#`;P;7", (-3118), 0, (double) 13, (-364)); assertEquals("updateMktDepth: -2514 5214 h#`;P;7 -3118 0 13.0 -364", string0); }
[ "@Test(timeout = 4000)\n public void test49() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepth((-463), (-463), 2145324830, 2145324830, (-463), (-463));\n assertEquals(\"updateMktDepth: -463 -463 2145324830 2145324830 -463.0 -463\", string0);\n }", "@Test(timeout = 4000)\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the method parameter that failed validation.
public final MethodParameter getParameter() { return this.parameter; }
[ "public void validate() throws ParameterException;", "String validate(Parameter property);", "String getInvalidArgumentMsg();", "@Override\n\tpublic String getRequiredParamErrorMsg() {\n\t\treturn null;\n\t}", "public String getFailedHint() {\n\t\t\treturn \"最大长度不能大于\" + para;\n\t\t}", "public com.vmware....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table tb_class
public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; }
[ "public String classToTableName(String className) {\n return addUnderscores(StringHelper.unqualify(className));\n }", "@Override\n\tprotected String defineClass(String tableName, Map<String, FieldDesc> fieldS) {\n\t\treturn IEmpty.STRING;\n\t}", "private void addClass(TabStack code, String tablename, String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
User: carsten Date: Jan 31, 2010 Time: 11:28:11 PM
public interface AverageSpeed { public static final AverageSpeed UNKNOWN=new UnknownAverage(); double getAverageSpeed(); static class UnknownAverage implements AverageSpeed { @Override public double getAverageSpeed() { return 0; //To change body of implemented methods use F...
[ "float getDateCreated();", "@java.lang.Override\n public double getUserTime() {\n return userTime_;\n }", "HomeTimeStamp getOwnedTime();", "public static void main(String[] args) {\n\t\t\n\t\tDate data = null;\n\t\tString date = null;\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
move the position to ignore any bytes written so far
@SuppressWarnings("SameReturnValue") @Nullable private Work sendException(@NotNull TcpReplicator.TcpSocketChannelEntryWriter writer, long sizeLocation, @NotNull Throwable e) { writer.in().position(sizeLocation + HEADER_SIZE); writeException(writer, e); wr...
[ "private void shiftBuff() {\n System.arraycopy(buff, buffIdx, buff, 0, buffSize - buffIdx);\n\n buffSize -= buffIdx;\n saveIdx -= buffIdx;\n if (saveIdx < 0)\n saveIdx = 0;\n /*\n * throw new\n * RuntimeException(\"This should never happend, we found a b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a zerobased page index to be retrieved. Vaadin asks data from the backend in paged manner. This shorthand calculates the page index for backends using paged data access, such as Spring Data repositores.
public int getPage() { return getOffset() / getLimit(); }
[ "com.google.protobuf.ByteString\n getPageIndexBytes();", "@Value.Default\n public long getPageIndex(){\n\treturn 0;\n }", "public com.google.protobuf.ByteString\n getPageIndexBytes() {\n java.lang.Object ref = pageIndex_;\n if (ref instanceof java.lang.String) {\n com.google...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Fir the narriage section, we take in both rhe men and women list, the global being implemented later on and a lot of this already having been constructed. WE go over the entire men and women's list to set them all free We then go into a while loop that sets it's testAlone boolean at the bottom. It checks the pseudocod...
public static void marriages(List<Person> menList, List<Person> womenList) { boolean testAlone = true; for (Person oneMan : menList) { oneMan.setPartner(-1); } for (Person oneWoman : womenList) { oneWoman.setPartner(-1); } while(testAlone) { for(int i = 0; ...
[ "private static void GaleShapley() {\n\t\tQueue<Integer> queue = new LinkedList<Integer>();\n\t\tfor (int i=1; i<=n; i++) {\n\t\t\tqueue.add(i);\n\t\t}\n\t\t\n\t\twhile (!queue.isEmpty()) {\n\t\t\tint man = queue.poll();\n\t\t\tcount[man]++;\n\t\t\tif (count[man] > n) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tint woman ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
[ "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return number to a string in base 10
public String toString() { if (this.len == 0) return null; Num numInBase10 = this.convertBase(10); String value = null; StringBuilder str = new StringBuilder(); long[] arr = numInBase10.arr; int len = numInBase10.len; for (int i = 0; i < len; i++) { str.insert(0, String.format("%01d",...
[ "public String getStr(int num)\r\n\t\t{\r\n\t\t\tString str=new String();\r\n\t\t\tint i,quo,rem;\r\n\t\t\tif(num<0)\r\n\t\t\t{\r\n\t\t\t\tnum=128+(128+num);\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<2;i++)\r\n\t\t\t{\r\n\t\t\t\tquo=num/16;\r\n\t\t\t\trem=num%16;\r\n\t\t\t\tswitch(rem)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 0: str=\"0...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the present value curves sensitivity.
@Test public void presentValueCurveSensitivity() { final InflationProviderInterface creditDiscounting = new InflationProviderDecoratedIssuer(MARKET, BOND_TIPS_1_TRANSACTION.getBondStandard().getCurrency(), BOND_TIPS_1_TRANSACTION .getBondStandard().getIssuerEntity()); final MultipleCurrenc...
[ "@Test\n public void presentValueCurveSensitivityBetweenSettleMaturity() {\n final ZonedDateTime referenceDate = DateUtils.getUTCDate(2011, 12, 20);\n final Cash deposit = DEPOSIT_DEFINITION.toDerivative(referenceDate);\n final MultipleCurrencyParameterSensitivity pvpsDepositExact = PS_PV_C.calculateSensi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Choose whether the current process should use the builtin or an updated driver.
private static void chooseDriver(Context context, Bundle coreSettings) { final String driverPackageName = SystemProperties.get(PROPERTY_GFX_DRIVER); if (driverPackageName == null || driverPackageName.isEmpty()) { return; } final ApplicationInfo driverInfo; try { ...
[ "private boolean getUseGpu() {\n // SharedPreferences sp = getSharedPreferences(CloneGalleryActivity.SHARED_PREFERENCES_NAME,\n // Context.MODE_PRIVATE);\n // String sTargetsp.getString(CloneGalleryActivity.PREF_TARGET, \"CPU\");\n // TODO: currently forcing to use CPU, to be fixed later...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A method that updates the balance by calculating the monthly interest earned by the account, and adding this interest to the balance. This is performed by the following formulas: Monthly Interest Rate = (Annual Interest Rate/12) Monthly Interest = Balance Monthly Interest Rate Balance = Balance + Monthly Interest
public calcInterest () { //Debug messages System.out.println("**BankAccount calcInterest"); double monthRate = rate/12; //Monthly Interest Rate = (Annual Interest Rate/12) double monthInterest = bal*monthRate; //Monthly Interest = Balance * Monthly Interest Rate bal+= mon...
[ "public void calculateMonthlyInterest() {\r\n\t\t// calculateMonthlyInterest is correctly implemented\r\n\t\tsavingsBalance += (savingsBalance * annualInterestRate / 12.0);\r\n\t}", "public double calculateMonthlyInterest() {\n\t\tdouble monthlyInterest;\n\t\tmonthlyInterest = ((annualInterestRate * getSavingsBal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new FMeObjectReflection object
public FMeObjectReflection(String fieldName, Object valueObject, String objectId) { super(); this.fieldName = fieldName; this.valueObject = valueObject; this.objectId = objectId; }
[ "private ReflectionUtils () {}", "private GenericsFactory getFactory() {\n // create scope and factory\n return CoreReflectionFactory.make(this, ConstructorScope.make(this));\n }", "public static void main(String[] args) {\n\n String reflectedClass = \"DogForReflection\";\n try {\n Cla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a custom Logger with the name of the calling class.
public static Trace create() { final Logger wrapped = LogManager.getLogger(); return new Trace(wrapped); }
[ "public static Logger getLogger() {\r\n // Retrieve the calling class name by :\r\n // 1. creating an anonymous SecurityManager this way we can call the private method #getClassContext()\r\n String callingClassName = new SecurityManager() {\r\n // 2. create a public field in which we...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes a ChangeType property value.
void removeChangeType(String oldChangeType);
[ "void setChangeType(final ChangeType changeType);", "public void setChangeType(String changeType){\r\n\t\tthis.changeType = changeType;\r\n\t}", "public String removeProperty(String configType, String propertyName) {\n String previousValue = null;\n if (properties.containsKey(configType)) {\n previou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 2 /Coverage entropy=0.9344388388119891
@Test(timeout = 4000) public void test02() throws Throwable { LovinsStemmer lovinsStemmer0 = new LovinsStemmer(); String string0 = lovinsStemmer0.stemString("her"); assertEquals("hes", string0); String string1 = lovinsStemmer0.getRevision(); assertEquals("8034", string1); ...
[ "@Test(timeout = 4000)\n public void test153() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n assertEquals(0.0, evaluation0.SFEntr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int64 launchTime = 27;
long getLaunchTime();
[ "private int getNewExecutionTime() {\r\n\t\t//Load Your execution time from database or property file\r\n\t\tSystem.out.println(\"nextExecutionTime:\"+nextExecutionTime);\r\n\t\t\r\n\t\treturn 20000;\r\n\t}", "Long getRunningTime();", "public long getExecutionTime ();", "public int getWorkTime() {\n\t\treturn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
INSTANCE METHODS PUBLIC NODE OPERATIONS (DELETE) Removes a node from the tree. If a node identified by the key does not exist within the tree, then an exception is thrown.
public void removeNode(Object key) { removeNode(key, true); }
[ "public void delete(K key) {\r\n\t\troot.deleteValue(key);\r\n\t}", "protected abstract IMNode<V> delete(int key);", "@Override\n public void delete(Object key) {\n// System.out.println(\"key: \" + key);\n// this.print();\n// System.out.println(\"=====================================\");...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the publisher of the book.
public String getPublisher() { return publisher; }
[ "public String getPublisher() { return ((_publisher != null) && (_publisher.size() > 0)) ? _publisher.get(0) : null; }", "public String getPublisher() {\n return publisher;\n\n }", "public String getPublisher() {\n\t\treturn new String(publisher);\n\t}", "public com.adsizzler.mangolaa.commons.protob...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an InvalidSegment with the specified detail message.
public InvalidSegmentException(String msg) { super(msg); }
[ "public PIMException(java.lang.String detailMessage) {\n this(detailMessage, 1);\n }", "public InvalidDetailsException(String message) {\n\t\tsuper(message);\n\t}", "public ParserException(int code, String detailMessage) {\n\t\tsuper(detailMessage);\n\t\terrorCode = code;\n\t}", "public InvalidMessageForm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create stacpane to set traffic lights with default properties
@Override public void start(Stage stage) throws Exception { StackPane stackPane = new StackPane(); stackPane.setAlignment(Pos.TOP_CENTER); // creating rectangle to set background for traffic lights with default properties Rectangle rectangle = new Rectangle(10, 10, 450, 200);...
[ "public void createControlPanel(){\n \n // setup P5 library\n cp5 = new ControlP5(this);\n frameRate(25);\n \n // variables for creating control panel\n int y = -10, height = 15, spacing = 20;\n \n // dataset selector\n float status3[] = { 0, 0, 0, 1, 0, 0 };\n cp5.addTextlabel(\"la...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
notify subscribers registered in the list while publisher's status has changed
void notifySubscribers();
[ "private void notifyClientPublishers() {\n for (VmsHalPublisherListener listener : mPublisherListeners) {\n // Besides the list of layers, also a timestamp is provided to the clients.\n // They should ignore any notification with a timestamp that is older than the most\n // r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this assignment only use get method, does not implement post Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { processRequest(request, response); System.out.println("hi"); } catch (SQLException ex) { System.out.println("hello"); ...
[ "@Override\n\tpublic void doGet() {\n\t\tdoPost();\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse response) {\n\t\tdoGet(req, response);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, \n\t\t\t\t\t\t HttpServletResponse resp)\n\t\t\t throws Servle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compares to values a and b to see if the difference between them is less than the default numerical precision
public static boolean equals(double a, double b) { return equals(a, b, defaultNumericalPrecision()); }
[ "public boolean precisionCompare(double a, double b) {\n\t\tBigDecimal bd1 = BigDecimal.valueOf(a);\n\t\tBigDecimal bd2 = BigDecimal.valueOf(b);\n\t\t\n\t\tBigDecimal precision = BigDecimal.valueOf(tolerance);\n\t\t\n\t\t// Used for debugging. Uncomment line below to see comparison output\n\t\t// System.out.println...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables
void setLocationRelativeTo(boolean b) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
[ "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\tprotected void initVariable() {\n\t\n\t}", "public void mo17751g() {\n }", "public void mo1857d() {\n }", "public static void Q22()\r\n\t{\r\n\t}", "public void mo28221a() {\n }", "public void mo3914b() {\n }", "protecte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate SAP across sets of v and w, looking for the shortest combination
private void calculateSAP(Iterable<Integer> vIterable, Iterable<Integer> wIterable) { int minLength = Integer.MAX_VALUE; int minAncester = -1; for (int v : vIterable) { for (int w : wIterable) { calculateSAP(v, w); if (sapLength != -1 && sapLength < m...
[ "private List<Integer>[] findShortestCommonPaths(int v, int w) {\r\n // return findShortestCommonPathsNonBFS(v, w);\r\n return findShortestCommonPathsBFS(v, w);\r\n }", "int[] checkWayFromVtoW(int v, int w) {\n validateArg(v);\n validateArg(w);\n\n // use BreadthFirstDirected...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Code to be executed when an ad opens an overlay that covers the screen.
@Override public void onAdOpened() { }
[ "@Override\n public void onAdOpened() {\n Log.i(TAG, \"Ads_StatusMain : An ad opens an overlay\");\n }", "@Override\n\t\t\tpublic void onDomobAdOverlayPresented(DomobAdView adView) {\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new button, set up its word, and set up the value
private Button createButton (String buttonText, String txtIndex) { Button button = new Button(buttonText); button.setOnAction(eve->{btnSelectAWord.setText(button.getText()); outputSelectedWord.setText(button.getText()); outputSelectedWordIndex.setText(txtIndex); stagePopUp.close();}); return button...
[ "private void makeButton() {\r\n\t\t_add = new JButton(\"ADD MachineID and Message\");\r\n\t\t_search = new JButton(\"SEARCH by MachineID or Keyword\");\r\n\t\t_remove = new JButton(\"REMOVE by MachineID or Keyword\");\r\n\t\t_ran = new JButton(\"GENERATE Random Description\");\r\n\t\t\r\n\t\t_add.setBackground(Col...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bool should_be_uploaded_to_shared_cache = 7; optional bool should_be_uploaded_to_shared_cache = 7;
boolean hasShouldBeUploadedToSharedCache();
[ "default boolean isAllowedToLoadFromCache() {\n return true;\n }", "@Override\n\tpublic void setShared(boolean shared) {\n\t\t\n\t}", "boolean isPartIsShareable();", "boolean isShareable() {\n return shareable;\n }", "public interface MultipartCache {\r\n\t/**\r\n\t * A cache s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleOpAnd" $ANTLR start "entryRuleXEqualityExpression" ../org.xtext.builddsl/srcgen/org/xtext/builddsl/parser/antlr/internal/InternalBuildDSL.g:783:1: entryRuleXEqualityExpression returns [EObject current=null] : iv_ruleXEqualityExpression= ruleXEqualityExpression EOF ;
public final EObject entryRuleXEqualityExpression() throws RecognitionException { EObject current = null; EObject iv_ruleXEqualityExpression = null; try { // ../org.xtext.builddsl/src-gen/org/xtext/builddsl/parser/antlr/internal/InternalBuildDSL.g:784:2: (iv_ruleXEqualityExpressio...
[ "public final EObject ruleXAndExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_XEqualityExpression_0 = null;\r\n\r\n EObject lv_rightOperand_3_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generates SQL fragment for dates filtering based on status given in parameter
private static String getSQLPredicateFromLoanStatus(LoanStatus status) { switch (status) { case NEW: return FLD_DATE_OUT + " IS NULL"; case RETURNED: return FLD_DATE_IN + " IS NOT NULL"; case OUT: return FLD_DATE_OUT + " IS NOT NULL AND " + FLD_DATE_IN + " IS NULL"; ...
[ "private String PlanDateConditions(String selDate1, String[] status1, String selDate2, String[] status2)\n\t{\n\t\tString selectFmt1 = \"PLN.PLAN_DATE <= \" + DBFormat.format(selDate1) +\n\t\t\t\t\t\t\t\" AND ( \" + StatusFlagConditions(status1) + \") \";\n\n\t\tString selectFmt2 = \"PLN.PLAN_DATE <= \" + DBFormat....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Functions /convert Hashmap to adjacent matrix
public void convertToGraph(String input, HashMap<String, Integer> idMap) { int node1; int node2; StringTokenizer tk; /*This tk is for those files with comma delimiter*/ tk = new StringTokenizer(input, ","); /*This tk is for those files with tab delimiter*/ //tk = ...
[ "public abstract Map<Integer, Set<Integer>> getAdjacencyList(double[][] similarityMatrix);", "int[][] toAdjacencyMatrix();", "Map<R, Map<C,V>> rowMapView();", "Jewel[][] getMap();", "private static void fillMap(Map<Integer, Integer[]> map) {\n\t\tfor (int r = 0; r <= 5; r++) {\n\t\t\tint c = -r;\t\n\t\t\tw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recover a TweetStructure from a json line generated by ETL phase 1
public Q2Q3TweetStructure(String jsonLine){ Gson gson = new Gson(); Q2Q3TweetStructure temp = gson.fromJson(jsonLine, this.getClass()); this.id = temp.id; this.userId = temp.userId; this.skewedTimestamp = temp.skewedTimestamp; this.censoredText = temp.censoredText; ...
[ "public Twat (String n) {\n// HashMap<String,Object> properties = new ObjectMapper().readValue(\"../data/twitter_lookup.json\", HashMap.class);\n// Set set = properties.entrySet(); \n// // Get an iterator \n// Iterator i = set.iterator(); \n// // Display elements \n// while(i.hasNext()) { \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
> | | |
public void stmt() { System.out.println("Begin <stmt>"); if (current.getDescription() == "identifier") { switch (current.getDescription()) { case "identifier": ass_stmt(); } } else { switch (current.getLexeme()) { ...
[ "public void stepBack(){\n pipe.stepBack();\n }", "RBP RIGHT();", "@Override\r\n\tpublic void right() {\n\t\t\r\n\t}", "boolean leftLine();", "public void operatorControl() {\n }", "LBP LEFT();", "Variable output() { return direction == FORWARD ? v2 : v1; }", "@Test\n\tpublic void test() {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }