query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Ensures user inputs proper record size | public static void getRecordSize() {
System.out.println("Enter a fixed length between 80-256");
recordSize = userInput.getInt();
if (!userInput.isValid(recordSize, 80, 256)) {
recordSize = userInput.validEntry(recordSize);
}
} | [
"private void ensureValidSize(byte[] key, byte[] value) {\n int serializedSize = Records.LOG_OVERHEAD + Record.recordSize(key, value);\n if (serializedSize > this.maxRequestSize)\n throw new RecordTooLargeException(\"The message is \" + serializedSize\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this method is not phantom, abstract or native | private void build_PDG(SootMethod sM) {
if(!sM.isConcrete())
return;
System.out.println("\n\nMethod: " + sM.getName());
//print_body(sM.getActiveBody());
MDG mdg = new MDG(sM);
} | [
"protected abstract int isMethod();",
"boolean isEffectivelyNotImplemented();",
"public boolean isNative() {\n return false;\n }",
"public boolean isJavaMethod() { return false; }",
"public abstract boolean isTestable();",
"public abstract boolean method_282();",
"public abstract boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
validator with an override that skips validation if there are previous errors on /foo or /bar/baz | @Test
@RoxableTest(key = "24691a01aeb1")
public void abstractValidatorShouldSkipValidationDueToPreviousErrorsWithLocationsGivenByOverride() {
final TestValidator validator = new OverrideTestValidator();
// check that validate is not called with a previous error on /foo
when(contextMock.hasErrors("/foo")).thenR... | [
"@Override\n protected void doAdditionalValidation(final ValidationContext context) {\n }",
"@Override\r\n\tprotected void validateRequest() {\n\t\t\r\n\t}",
"@Override\n public void validateInput() {\n super.validateInput();\n validatePaginationParams();\n }",
"@Override\r\n\tprotec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
action event untuk button pita | public void actionPerformed(ActionEvent ActC) {
if(ActC.getSource().equals(btnExit)){ ///fungsi untuk back ke panel resistor lagi
setVisible(false);
}
} | [
"public void btnGOActionEvent(ActionEvent actionEvent) {\r\n\r\n }",
"public abstract void setButtonAction();",
"public void buttonClick(ClickEvent event) {\n }",
"@Override\n\t\t\tpublic void buttonPressed(Button b) {\n\t\t\t\t\n\t\t\t}",
"public abstract void buttonAction();",
"private voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a copy of the card rotated clockwise once. If there are players or treasures on the card, those are also copied. | private CardType rotateClockWise(CardType cardType)
{
Openings oldOpenings = cardType.getOpenings();
Openings rotatedOpenings = new Openings();
rotatedOpenings.setRight(oldOpenings.isTop());
rotatedOpenings.setBottom(oldOpenings.isRight());
rotatedOpenings.setLeft(old... | [
"public Card copy(Card card){\n\t\tCard temp = new Card (card.getcardSuit(), card.getcardValue());\n\treturn temp;\n\t}",
"public Corner rotateCounterClockwise() {\n Corner answer = new Corner(target, (orientation + 2) % 3);\n return answer;\n }",
"@Override\n public AbstractCard makeCopy() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the volume for the sounds this mob makes. | protected float getSoundVolume() {
return 1.0F;
} | [
"public int getVolume() {\n Logger.debug(\"getVolume()\");\n \n return libvlc.libvlc_audio_get_volume(mediaPlayerInstance);\n }",
"public double getVolume() {\n volume = ((4.0/3.0)*Math.PI*(radius*radius*radius));\n return volume;\n }",
"public Double getVolume() {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set font for title and message | public Snacker setTypeface(Typeface typeface) {
mTypeFace = typeface;
return this;
} | [
"private void setupFont() {\n Font sans_serif = new Font( Font.SANS_SERIF, Font.PLAIN, 14);\n Font sans_serif_bold = new Font( Font.SANS_SERIF, Font.BOLD, 14);\n\n mTitle.setFont(sans_serif_bold);\n mSubTitle.setFont(sans_serif_bold);\n mReviewTextArea.setFont(sans_serif);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the current vehicle ID. | @RequestMapping(value = "/vehicle/{id}")
public void changeVehicleID(@PathVariable int id) {
logger.info("/vehicle/" + id + " requested");
vehicleID = id;
} | [
"public String getVehicleId() {\r\n return this.Vehicle_id;\r\n }",
"@NotNull\n public Long getVehicleId() {\n return vehicleId;\n }",
"public String getId() {\n\t\treturn ((Car) this).getId();\n\t}",
"public VehicleDataResult getCloudAppVehicleID(){\r\n return (VehicleDataResult) getObj... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ID of the community to list projects in. string community_id = 1 [(.yandex.cloud.required) = true]; | java.lang.String getCommunityId(); | [
"@ApiModelProperty(value = \"The community from which the content originated.\")\n\n\tpublic String getCommunityId() {\n\t\treturn communityId;\n\t}",
"public Integer getCommunityID()\n {\n Integer communityID = null;\n String value = configMap.get(COMMUNITY_KEYWORD);\n if (value != null)\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the ball collides with the right end | public boolean isCollidingWithRightWall()
{
if(x >= (this.width-120))
{
board.playSound("..//team7//sound//btnPlay.wav");
return true;
}
return false;
} | [
"public boolean collideWithWall(){\n\t\t\t// Ball is colliding with the right side of the screen\n\t\t\tif(this.ball.getCircle().getBoundsInParent().intersects(this.WIDTH, 0, this.BOXWIDTH, this.HEIGHT)){\n\t\t\t\tthis.ball.setVX(-Math.abs(this.ball.getVX()));\n\t\t\t\tthis.playSound(\"\");\n\t\t\t}\n\t\t\t// Ball ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table lm_d_plan | public void or(Criteria criteria) {
oredCriteria.add(criteria);
} | [
"PlanType getPlan();",
"public String getPlanId() {\n return this.planId;\n }",
"public String getPlan() { return planDesc; }",
"PlanEntity loadPlanByPlanName(String planName);",
"public long getPlanTypeId();",
"@Override\n\tpublic Plan getPlan() {\n\t\t\n\t\treturn plan;\n\t}",
"@Select({\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CollinearService interface. This interface define methods to CompareServiceImpl. | public interface ICompareService {
/**
* Compare two {@code String}.
*
* <p>
* This method compares two version string as input and returns
* whether one is greater than, equal, or less than the other.
* </p>
*
* <p>
* This method uses {@code Locale.getDefault()}... | [
"public interface JobCandidateService {\r\n\t\r\n\t/**\r\n\t * add candidate to the Job service.\r\n\t * \r\n\t * @param jobId\r\n\t * the jobId\r\n\t * @param jobCandidate\r\n\t * the jobCandidate\r\n\t * @param bytes\r\n\t * the bytes\r\n\t * @return the response\r\n\t */\r\n\tpub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply colors to a given string, returning the new string with Bukkit colors in place of their Colors substitutes. | public String applyColors(String s) {
// simple optimization: if no % symbol is present at all in the value
// string, then we can skip color/arg replacement entirely. -morganm
if( s.indexOf('%') != -1 )
return s;
for (Entry<String, Pattern> e : regexPatterns... | [
"public static String rainbowChatColor(String string) {\n int lastColor = 0;\n int currColor = 0;\n String newMessage = \"\";\n String colors = \"123456789abcde\";\n for (int i = 0; i < string.length(); i++) {\n do {\n currColor = new Random().nextInt(col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: Statement returns LoopStatement LoopStatement returns LoopStatement Constraint: (count=Addition statements+=Statement+) | protected void sequence_LoopStatement(ISerializationContext context, LoopStatement semanticObject) {
genericSequencer.createSequence(context, semanticObject);
} | [
"private void statement_list(MyStack table)\n{\n while(isStatement())\n statement(table);\n}",
"AssStmt getLoop();",
"private void incrementNumStmtExprs(Analyzer analyzer) {\n // WITH clauses use a separate Analyzer with its own GlobalState. Skip counting\n // this expression towards... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the projects associated with an external user id. The user id is defined as a property of of a resource that belong to the project. The resource property name is 'External Reference ID'. and the property value is the given user id converted to string. | public Project[] getUserProjects(long user) throws PersistenceException; | [
"public List<Project> getProjectsForUser(final User user);",
"@Override\n\tpublic List<Project> getProjectsForUser(long idUser) {\n\t\treturn null;\n\t}",
"public List<Project> getUserProjects(Long id);",
"public List<Integer> getPLProjectIds(User user);",
"@Override\n public List<ProjectRecord> getUserP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
These overriden methods will be used to access the key store. | abstract String getAlias(); | [
"public interface KeyStoreProvider {\n\n /**\n * Internally used by crypto providers to retrieve the key for encryption/decryption.\n *\n * @param keyName The key to be retrieved for secret keys. Add suffix _public/_private to retrieve\n * public/private key\n * @return key Key... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all apps associated with an App Service plan. Get all apps associated with an App Service plan. | Observable<ServerfarmSite> listWebAppsAsync(final String resourceGroupName, final String name); | [
"public List<Application> getAllApprovedApplications();",
"public List<ApplicationCO> returnAppList(DashboardPortalSC criteria)throws BaseException;",
"@Test\n public void getAllAppsByNameTest() throws ApiException {\n String appName = null;\n List<App> response = api.getAllAppsByName(appName);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of employee masters where modifiedBy = &63;. | public int countBymodifiedBy(int modifiedBy)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public jkt.hms.masters.business.MasEmployee getModifiedBy () {\n\t\treturn modifiedBy;\n\t}",
"public void setModifiedBy (jkt.hms.masters.business.MasEmployee modifiedBy) {\n\t\tthis.modifiedBy = modifiedBy;\n\t}",
"public void setModifiedBy(int modifiedBy) {\n\t\tthis.modifiedBy = modifiedBy;\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a statement which does not affect another statement when combining it with AND (evaluates to TRUE). | public abstract String getNeutralAndElement(final ResourceType resourceType); | [
"public static boolean $opt$noinline$booleanOrToAnd(boolean a, boolean b) {\n if (doThrow) throw new Error();\n return !a | !b;\n }",
"public Sentence negate (){\n\t\treturn new Disjunction (s1.negate(),\n\t\t\t\t\t\t\t\ts2.negate());\n\t}",
"Query beginOr();",
"public Sentence driveInNegations(){\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test for loading a recipientScheduledNotification by Id and ensure the lists which are consequently accessed are initialized. | public void testGetById() throws Exception {
RecipientScheduledNotification recipientScheduledNotification = getDao().getById(1000);
assertEquals("Title", recipientScheduledNotification.getScheduledNotification().getTitle());
try{
for(StudyPersonnel sp: recipientScheduledNotification.g... | [
"public void loadNotifications() {\n try { //Load in the data from notifications.txt\n try (BufferedReader br = new BufferedReader(new FileReader(\"notifications.txt\"))) {\n String header = br.readLine();\n String line = br.readLine();\n while (line !=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int64 Volume = 9; optional int64 Volume = 9; | boolean hasVolume(); | [
"public void setVolume(int volume){ this.volume = volume; }",
"public static double specificVolume(){\n\t return 0.000765;\n }",
"public int getVolume(){\n return this.currentVol;\n }",
"@Override\n public int getVolume(){\n return volume;\n }",
"public int setIntern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 endpointId = 5; (uint8) Endpoint ID. If omitted, it means referring to all endpoints. | public boolean hasEndpointId() {
return ((bitField0_ & 0x00000010) == 0x00000010);
} | [
"public void set_endpoint(DTNEndpointID endpoint) {\r\n\t\tendpoint_ = endpoint;\r\n\t}",
"public EndpointHealthDataInner withEndpointId(String endpointId) {\n this.endpointId = endpointId;\n return this;\n }",
"private URI expandEndpointURI(URI endpoint, String siteId) {\n if (getSiteId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fogadja a GameState objektumokat, az eger kattintas infokat, ..., hivogatja a kontrol fuggvenyeit | @Override
public void receive(final Object object) {
} | [
"public void getGameState(int statekey);",
"public GameState() {\n gameState = new DualHashBidiMap<Position, Piece>();\n }",
"public void newGame() {\n state = new State();\n history = new History();\n achievements = new Achievements();\n setGameOn();\n }",
"@Test\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sends sms messages and listens to the status | private void sendCheckSMS(final String phoneNumber, String message)
{
String SENT = "SMS_SENT";
String DELIVERED = "SMS_DELIVERED";
PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,
new Intent(SENT), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcas... | [
"private void sendSms() {\n for (String phoneNumber : this.phoneNumbers) {\n if (!phoneNumber.matches(\"^[+]?[0-9]{4,13}$\")) {\n displayErrorToast();\n return;\n } else {\n SmsManager sm = SmsManager.getDefault();\n ArrayList<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simplified method form for invoking the ListPipelines operation with an AsyncHandler. | @Override
public java.util.concurrent.Future<ListPipelinesResult> listPipelinesAsync(
com.amazonaws.handlers.AsyncHandler<ListPipelinesRequest, ListPipelinesResult> asyncHandler) {
return listPipelinesAsync(new ListPipelinesRequest(), asyncHandler);
} | [
"public ListPipelinesResult listPipelines(ListPipelinesRequest listPipelinesRequest) \n throws AmazonServiceException, AmazonClientException;",
"public com.squareup.okhttp.Call listPipelinesAsync(String studyIdentifier, final ApiCallback<List<Pipeline>> callback) throws ApiException {\n\n Progre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that create a new file in a configurable secure storage. The final file name depends on the implementation. It s recommended that the final name be different from the user original file name. Also is recommended that the secure storage be outside the document root. | @Nonnull
public File createNewFileInSecureStorage(@Nonnull final InputStream inputStream,
@Nonnull final String initialFileName) throws SecureFileUploadException; | [
"private static void createFile(String userName) {\n\n Scanner sc= new Scanner(System.in);\n\n try {\n System.out.println(\"Enter name of your credential\");\n String input = sc.next();\n String path = \"database\\\\\"+userName+\"\\\\\"+input+\".txt\";\n Fil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EditText myEditText = (EditText) findViewById(R.id.editPasswd); ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)) .showSoftInput(myEditText, InputMethodManager.SHOW_FORCED); | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_to_do);
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
bTimePicker = (Button)findViewById(R.id.buttonTimePi... | [
"@Override\n public void onClick(View view) {\n InputMethodManager imm=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.showSoftInput(editText,InputMethodManager.SHOW_IMPLICIT);\n }",
"@Override\n public void run() {\n imm.showSoftInpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. | @jsweet.lang.Name("reduceRight")
native public T reduceRightCallbackfnFunction4(Function4<T,T,Double,ReadonlyArray<T>,T> callbackfn, InitialValueT<T> initialValue); | [
"static void sortReverse(Integer[] array) {\n Arrays.sort(array, Collections.reverseOrder());\n System.out.println(\"Sort Reverse: \" + Arrays.toString(array));\n }",
"public abstract void forEachReversed(IntConsumer cons);",
"public native <E> void each(Array<E> collection, Callback2<Integer, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: com.bytedance.android.livesdk.feed.f | public interface C5980f extends C6023h {
/* renamed from: a */
ItemRepository mo14609a(FeedDataKey feedDataKey);
/* renamed from: a */
void mo14610a();
/* renamed from: a */
void mo14611a(FeedDataKey feedDataKey, ItemRepository itemRepository);
/* renamed from: a */
void mo14612a(Feed... | [
"com.adsizzler.mangolaa.commons.protobuff.OpenRtb.FeedType getFeed();",
"Feed getAsFeed();",
"public void fetchFeed(final Context context, final Callback callback) {\n String method = \"GET\";\n String url = Constants.BASE_URL + \"/post\";\n JSONObject jsonRequest = new JSONObject();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use AskPriceLevelItem.newBuilder() to construct. | private AskPriceLevelItem(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
} | [
"private PriceTier(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private PBItemPriceInfo(Builder builder) {\n super(builder);\n }",
"Item(String nameIn, double priceIn){\n if(priceIn < 0){\n throw new IllegalArgumentException();\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
modifies global var 's' hence impure | void set_bad() {
s = 10;
} | [
"public void declareVar(Symbol s){\n String instr = String.format(\"SUB $sp, $sp, %d #Reserve memory for <%s>\", s.getDataSize(), s.getLexema());\n main.add(instr);\n // Updating pointer stack\n memManager.pushVar(s);\n }",
"private final void r(String s) {\n if (m() > 0)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Showing a progress dialog final ProgressDialog loading = ProgressDialog.show(getContext(),"Loading Data", "Please wait...",true,true); | private void getCurrentAppointmentData() {
JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,
URL, null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
//Dismissing progress dialog
... | [
"public void createLoadingDialog() {\n waiting_dialog = new ProgressDialog(this);\n waiting_dialog.setCancelable(true);\n waiting_dialog.setCanceledOnTouchOutside(false);\n waiting_dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: e | public static final void m8404e(@NotNull String str, @NotNull String str2) {
e$default(str, str2, (Throwable) null, 4, (Object) null);
} | [
"@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"
]
]
}
} |
Get the terminal's image loader instance. | public BlackenImageLoader getImageLoader(); | [
"public BufferedImageLoader getImageLoader() {return imageLoader;}",
"public static BufferedImage imageLoader(String path){\n\n try {\n return ImageIO.read(Loader.class.getResource(path));\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an existing skype bot to your contacts list | void addSkypeBotAsContact(String skypeBotId); | [
"public void onContact(SkypeContactAddedEvent e) {\n System.out.println(e.getUser().getUsername() + \" added me\");\n e.getUser().setContact(true);\n e.getUser().sendMessage(\"Thanks for adding me as a contact!\");\n }",
"private void addFriend() {\n\t\tif (!currentProfile.getName().equals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a CompositeHitbox with the specified relative position. | public CompositeHitbox(long relX, long relY) {
super(relX, relY);
} | [
"public abstract HitBox getHitBox();",
"public void makeHitbox()\n {\n hitbox = new Rectangle2D.Double(center.x - xWidth/2, center.y - yWidth/2, xWidth, yWidth);\n rotateTransform.rotate(angle, center.x, center.y);\n hitbox = rotateTransform.createTransformedShape(hitbox);\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the time that the item was created according to the uploader. | protected Date getContentCreatedAt() {
return getPropertyAsDate(BoxConstants.FIELD_CONTENT_CREATED_AT);
} | [
"public long getCreatedTime() {\n return this.d_createdTime.getTime();\n }",
"public Time getTimeCreated();",
"@java.lang.Override\n public int getTimeCreated() {\n return timeCreated_;\n }",
"@Override\n public FileTime creationTime() {\n return FileTime.from(crea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Invite)) {
return false;
}
Invite other = (Invite) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
} | [
"public int getId () { return id; }",
"public int getId(){ return this.id;}",
"public int id() {return this.id;}",
"@Override\n public int getId() { return id; }",
"public void setId(long id){ \r\n this.id = id; \r\n }",
"public void setId( int id ) { this.id = id; }",
"public void setId( l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
long preTime = System.currentTimeMillis(); System.out.println("Can sum > " + canSum(1000, Arrays.asList(1, 2, 4, 5))); long postTime = System.currentTimeMillis(); System.out.println("Time taken to compute in milliseconds> " + (postTime preTime)); long preTime = System.currentTimeMillis(); System.out.println("Can sum > ... | public static void main(String[] args) {
// long preTime = System.currentTimeMillis();
// System.out.println("Can sum -> " + canSumMemo(15, (Arrays.asList(1, 2, 4, 5))));
// long postTime = System.currentTimeMillis();
// System.out.println("Time taken to compute in milliseconds-> " + (postT... | [
"@Benchmark\n public long arrayListStream() {\n long sum = arrayListValues.stream().reduce((l, r) -> l + r).get();\n assert sum == expectedCount;\n return sum;\n }",
"@Benchmark\n public long parallelLinkedListStream() {\n long sum = linkedListValues.parallelStream().reduce((l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pop off the oldest data | public void enqueue(Node value){
Data.remove();
// Add newer data
Data.offerLast(value);
// Toggle update
updated = true;
// Set maxima status if applicable
if(size > 5){
int tempLoc = size - 3;
float mean, percentDifference;
float activLevel;
Node nodeArray[] = new Node[... | [
"public T removeOldest() \n\t{\n\t\tif ( ENABLE_SANITY_CHECKS && (tail >= head || tail == data.length-1 ) ) {\n\t\t\tthrow new NoSuchElementException(\"Array is empty?\");\n\t\t}\n\t\t@SuppressWarnings(\"unchecked\")\t\t\n\t\tfinal T result = (T) data[tail];\n\t\tif ( ENABLE_SANITY_CHECKS && result == null ) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Normalizes the request parameters according to the spec. | private String normalizeRequestParameters(List<QParameter> parameters) {
StringBuffer sb = new StringBuffer();
QParameter p = null;
for (int i = 0, size = parameters.size(); i < size; i++) {
p = parameters.get(i);
sb.append(p.mName);
sb.append("=");
sb.append(p.mValue);
if (i < size - 1) ... | [
"public void normalizeRequest(ChunkTypeRequest request)\n {\n\n }",
"private void lookupStandardParameters() {\n this.requestParameters.put(\n \"eq_std\",\n notNull(selectDbValue(this.context, \"eq\", \"eq_std\",\n \"eq_id = \" + literal(this.context, getRequestString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 depot_id = 1; optional uint32 depot_id = 1; | boolean hasDepotId(); | [
"void setDepotNo(int depotNo)\n\t{\n\t\tthis.depotNo = depotNo;\n\t}",
"public boolean hasDepotId() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public int getDep() {\n return dep;\n }",
"public void setDep(int dep) {\n this.dep = dep;\n }",
"@Override\n\tpublic D... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Can t run in parallel while another thread (say t2) executes a statement when set of t2's "live children threads" is s? | private boolean isLiveParallel(int t, IntArraySet s) {
int n = s.size();
if (thrKind == ThrKind.CONCRETE) {
for (int i = 0; i < n; i++) {
int t2 = s.get(i);
if (t2 == t)
return true;
IntArraySet s2 = threadToDescendants.get(t2);
if (s2 != null && s2.contains(t))
return true;
}
ret... | [
"public void foo() {\n t1.start();\r\n t2.start();\r\n }",
"private void func() throws InterruptedException {\n\t\tThreadGroup pGroup = new ThreadGroup(\"Parent ThreadGroup\");\n\t\t\n\t\t//create a child thread group for parent thread group\n\t\tThreadGroup cGroup = new ThreadGroup(pGroup,\"Chil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks if the map is a connected map by finding a path between two giving countries | private void findPath(int curCou, int desCou, ArrayList<Integer> path) {
ArrayList<Integer> tempadjacent = new ArrayList<Integer>();
tempadjacent.addAll(new_map_num.get(curCou));
for (int i = 0; i < tempadjacent.size(); i++) {
if(visited[tempadjacent.get(i)] == false){
... | [
"public boolean validateMapConquest(Map p_Map) {\n ArrayList<Country> l_Countries = p_Map.getD_Countries();\n ArrayList<Continent> l_Continents = p_Map.getD_Continents();\n\n boolean l_ConnectedGraph = false;\n boolean l_HasContinent = false;\n\n l_ConnectedGraph = dfs(l_Countries... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This methods returns a globally unique identifier for the SubmissionSet assigned by the creating entity. | public IdentifierOID getUniqueId() {
return uniqueId;
} | [
"@Override\n\tpublic long getCreatorId() {\n\t\treturn _surveyWriter.getCreatorId();\n\t}",
"public int getUniqueSavepointID();",
"String getGloballyUniqueId();",
"public String getUniqueId() {\n return request.get(\"uniqueid\");\n }",
"public static String createUniqueId() {\n return Document.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Resets the path to an ellipse positioned at the coordinate provided with the dimensions provided. | public void setPathToEllipse(final float x, final float y, final float width, final float height) {
TEMP_ELLIPSE.setFrame(x, y, width, height);
setPathTo(TEMP_ELLIPSE);
} | [
"private void extendEllipse() {\n //Converts width and height to radius\n width /= 2.0;\n height /= 2.0;\n\n //Redraws ellipse as it is resized\n ((Ellipse) shape).setRadiusX(width > 0 ? width : -width);\n ((Ellipse) shape).setRadiusY(height > 0 ? height : -height);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests toKey when passed a null. | @Test
public void toKeyNull() {
CommodityDocument commodityDocument = new CommodityDocument();
Assert.assertEquals("", commodityDocument.toKey(null));
} | [
"private void checkNullKey(String key)\r\n/* 145: */ {\r\n/* 146: 271 */ if (key == null) {\r\n/* 147: 272 */ throw new IllegalArgumentException(\"null key\");\r\n/* 148: */ }\r\n/* 149: */ }",
"@Override\n\tpublic Key getKey() {\n\t\treturn null;\n\t}",
"@NotNull\n String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display the admin page. | @RequestMapping("/admin")
public String showAdmin(final Model model)
{
List<User> users = usersService.getAllUsers();
model.addAttribute("users", users);
return "admin";
} | [
"public void openAdminPageUI() {\n new AdminPageUI(mainController, this);\n }",
"@RequestMapping(value = \"/admin\")\n public String adminPage(Model model) {\n\t\t\n\t\t// call the function that does database reference integrity check\n\t\tRefIntegrityCheck.check(userRepo, userRepoCustom, typeRepo, w... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A Helper method to help responseToServerMessage handling all type of CardMessage, This method will divide CardMessage into two categories (active and idle) and pass that message to either RobotEngineInActive or RobotEngineInIdle to handle. | public List<Object> handleCardMessage(CardMessage message, RobotEngine engine)
{
// INIT a list of Object to contain objects to return
List<Object> toReturn = new ArrayList<Object>();
// if message equals for self then
if (message.getToPlayer().getName().equals(
engin... | [
"public void serverStatus()\n {\n int dataItemLengths[];\n String dataItems[];\n int bundleLength;\n StringBuffer bundleString;\n Object items[];\n boolean noSendError;\n \n try {\n \n // Get the desired action\n dataItemLengths = new i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update tNet with a scale. | private void scale(Double scale) {
this.currentScaleFactor *= scale;
Matrix scalingMatrix = new TransformationMatrix();
Vertex r1 = new Vertex(scale, 0.0, 0.0, 0.0);
Vertex r2 = new Vertex(0.0, scale, 0.0, 0.0);
Vertex r3 = new Vertex(0.0, 0.0, scale, 0.0);
scalingMatrix.... | [
"public void changeScale(int inc){\r\n\t\tscale+=inc*scaleRate;\r\n\t\tif(scale<=0)scale=0;\r\n\t\tif(scale>maxScale)scale = maxScale;\r\n\t\trepaint();\r\n\t}",
"abstract public void setScale(double scale);",
"public void onScaleUpdate();",
"protected void updateScaleValue(){\n\t\t\n\t\t//removing all the li... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure product is approved, in the correct catalog and of the right type | @Override
public void visit(final ProductModel item) throws FieldValueProviderException
{
assertEquals(item.getApprovalStatus(), ArticleApprovalStatus.APPROVED);
assertEquals(item.getCatalogVersion(), site.getDefaultCatalog().getActiveCatalogVersion());
assertTrue(typeService.isInstance(productType, i... | [
"boolean constainsProduct(String productID);",
"public abstract boolean isApprovedProducts(Discount discount, Map<Product, Integer> products);",
"@Test\n\tpublic void TC030DCAA_18(){\n\t\tproductControl.addLog(\"ID : TC030DCAA_18 : Verify that the accessories table lists out correct items when filtering with 'R... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function to return custom View (View with an image and text) | public View getSpinnerRoomView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.room_dropdown_item, parent, false);
// Image and TextViews
TextVi... | [
"public abstract View getCustomizedView();",
"private View createView() {\n LinearLayout linearLayout = new LinearLayout(container.$context());\n linearLayout.setOrientation(LinearLayout.HORIZONTAL);\n linearLayout.setPadding(15,15,15,15);\n ImageView imageView = new ImageView(container.$context());\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'fulfillZipCode' field. Fufilling Zipcode | public io.sellaway.cart.objects.LineItem.Builder clearFulfillZipCode() {
fulfillZipCode = null;
fieldSetFlags()[3] = false;
return this;
} | [
"public example.avro.UserV2.Builder clearZipcode() {\n zipcode = null;\n fieldSetFlags()[3] = false;\n return this;\n }",
"public void unsetZipCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ZIPCODE$10, 0);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
items is a collection of CertificateSigningRequest objects repeated .k8s.io.api.certificates.v1.CertificateSigningRequest items = 2; | public io.kubernetes.client.proto.V1Certificates.CertificateSigningRequestOrBuilder
getItemsOrBuilder(int index) {
return items_.get(index);
} | [
"public java.util.List<com.appscode.api.kubernetes.v1beta2.Certificate> getItemsList() {\n return items_;\n }",
"public void setRequestItems(java.util.Map<String,java.util.List<WriteRequest>> requestItems) {\n this.requestItems = requestItems;\n }",
"@Override\n public int getItemCount() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
db private DBManager mgr; | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_example);
initView();
// initData();
// initAdapter();
initListener();
} | [
"private DBManager()\n\t{\t\n\t}",
"public interface DatabaseManager {\n\t\n\t/**\n\t * Commits the transaction data to the database\n\t * @throws SQLException\n\t */\n\tvoid commit() throws SQLException;\n\t\n\t\n\t/**\n\t * Rollbacks the transaction data\n\t * @throws SQLException\n\t */\n\tvoid rollback() thro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Access modifiers changed, original: final | public final void aFX() {
AppMethodBeat.i(126579);
if (this.hZL != null) {
this.hZL.stopTimer();
}
AppMethodBeat.o(126579);
} | [
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"public final void metodoFinal(){\n\n\n }",
"protected ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method changes paddles position to the right by 20 steps. | public void moveRight() {
if (this.paddleX + 20 >= 600) {
this.paddleX = 600;
} else {
this.paddleX += 20;
}
} | [
"public void moveRight() {\n coordinates.x = coordinates.x + coordinates.amount;\n coordinates.recalculate();\n coordinates.direction = Constants.RIGHT_DIRECTION ;\n }",
"public void moveRight() {\n\t\tmachinePointer = mod((machinePointer + 1), 50);\n\t}",
"public void moveRight(){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Busca lista de endereco por lista ceps | @Cacheable(value = "post-single", key = "#ceps")
@PostMapping("/buscar-enderecos")
public List<Endereco> buscarEnderecos(@RequestBody List<String> ceps){
return enderecoService.findEnderecosByCEP(ceps);
} | [
"@Override\n\tpublic List<Endereco> buscarTodos() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic ArrayList<Endereco> listar() {\n\t\treturn null;\n\t}",
"public ArrayList<Aluno> pesquisandoPorCidade(String cidade){\n ArrayList<Aluno> encontrados = new ArrayList<>();\n for(int i=0; i<this.lista.si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
RPC client sessionWrite method | public String SessionWrite(String sessionID, String version, String s, String discard_time, InetAddress[] destAddr) throws IOException {
// 打包数据
callID = callID + 1;
int cid_now = callID;
String op = "W";
String msg = callID + "," + op + "," + sessionID + "," + version + "," + s + "," + discard_time;
Sy... | [
"private void writeSession() throws Exception\n\t\t\t{\n\t\t\t\tif (needToHalt)\n\t\t\t\t\treturn;\n\n\t\t\t\tsetStatus(\"Writing Cytoscape session file...\");\n\t\t\t\tsetPercentCompleted(1);\n\n\t\t\t\t// Write session file to a temporary location\n\t\t\t\tFile tempFile = File.createTempFile(\"session\", \"cys\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the generate sequence helper. | public void setGenerateSequenceHelper(
GivingBatchHelper generateSequenceHelper) {
this.generateSequenceHelper = generateSequenceHelper;
} | [
"void setGenerateSequenceFlags(boolean generateSequenceFlags);",
"public Builder setSequence(int value) {\n \n sequence_ = value;\n onChanged();\n return this;\n }",
"private static void initializeSequenceGenerator() {\n\t\tsequenceGenerator = new SequenceGenerator(getInitialNot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Given a typical media file name this method parses it, finding a title and if possible year or season and episode information. | private TemporaryMedia getInformation(StringBuilder mySb) {
TemporaryMedia returnMedia= new TemporaryMedia();
StringBuilder wordSb = new StringBuilder();
int tmpYear;
int year = -1;
int thisYear = Calendar.getInstance().get(Calendar.YEAR);
boolean deleteYear = ... | [
"public static ParsedMovieInfo getMovieInfo(Path path) {\n\r\n\t\tVideoInfo info = getVideoInfo(path);\r\n\t\tif (info instanceof ParsedMovieInfo) {\r\n\t\t\treturn (ParsedMovieInfo) info;\r\n\t\t}\r\n\r\n\t\tString fileNameWithoutExtension = path.getFileName().toString();\r\n\t\tif (Files.isRegularFile( path )) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field applicationExp is set (has been assigned a value) and false otherwise | public boolean isSetApplicationExp() {
return this.applicationExp != null;
} | [
"@java.lang.Override\n public boolean hasAppValue() {\n return appValue_ != null;\n }",
"public boolean hasExp() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public boolean isSetOpEx() {\n return this.opEx != null;\n }",
"public boolean hasAppkey() {\n return ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert some coins. Easy test. | @Test
public void testInsert()
{
Purse purse = new Purse(3);
assertTrue( purse.insert(factory.createMoney(5)));
assertTrue( purse.insert(factory.createMoney(1)));
assertTrue( purse.insert(factory.createMoney(10)));
assertEquals( 3, purse.count() );
// purse is ful... | [
"public void insertCoin() {\n\t\tcoins.addCoin();\r\n\t\tupdateTotal();\r\n\t}",
"public void insertCoin(Coin coin) {\n if (coin.getPrice() == 10){\n System.out.println(\"you just inserted 10p\");\n balance = balance + coin.getPrice();\n }\n }",
"public void insertCoins(in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Emit the bell curve with noise | private static double emit() {
final double r = 10 * random.nextGaussian();
return r;
} | [
"public float noise(float x);",
"public void makeNoise() {\n\t\tSystem.out.println(\"*breathing heavy*\");\n\t\t\n\t}",
"public float noiseFloor(){\n double noise;\n //cte de bolzman por Temperatura en dBm\n double KT = -174;\n //Ancho de banda en dB = 10*log(10E6)\n double BW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub setContentView(R.layout.activity_location); | @Override
protected void layout() {
setBackButton();
findViewById(R.id.lLocation).setOnClickListener(this);
String bdlocationStr = (String)SXPApplication.getInstance().getSXPConfigurationContext().getData("bdlocation");
locationInfomation.setText(bdlocationStr);
} | [
"public void onCreate(Bundle savedInstanceState) {\n\t // TODO Auto-generated method stub\n\t setContentView(R.layout.enter_location);\n\n Button enterLocationButton = (Button)findViewById(R.id.locationButton);\n enterLocationButton.setOnClickListener(locationClickListener);\n\n\t}",
"@Overrid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 119 /Coverage entropy=1.8432740094215279 | @Test(timeout = 4000)
public void test119() throws Throwable {
StringReader stringReader0 = new StringReader("nul[");
JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);
JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);
javaParserTo... | [
"@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the border color of the shape. | public void setColor(java.awt.Color color); | [
"public void setBorder(Color border) {\r\n\t\tthis.border = border;\r\n\t}",
"public void setBorderColor(String borderColor) {\n this.borderColor = borderColor;\n }",
"public void setBorderColor(Color color) {\n \t\tthis.borderColor = color;\n \t}",
"public void setBorderColor(Color bordersColor) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a Console in the database. | void deleteConsole(Long id); | [
"public void deleteDB() {\r\n try {\r\n String sql = \"DELETE FROM Customers WHERE CustID = '\" + getCustId() + \"'\";\r\n Statement stmt = connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
END SETUP INFO// SERVER GUI INITIATE// | protected void setFrameTitle(String string){
this.setTitle(string);
} | [
"public GlobalServerGUIHandler() {\n\t\tsuper(\"Global Server\");\n\t\t\n\t\tsetUpGUI();\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}",
"public ServerGUI() {\r\n\t\tthis.manager = new ClientManager();\r\n\t\tthis.server = new MultiplayerServer(this,manager);\r\n\t\tthis.infoHandler = new InfoHandler(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string stage_image = 4; | com.google.protobuf.ByteString
getStageImageBytes(); | [
"String getNameImg();",
"public String getName() {return \"Image Processing\";}",
"public abstract String getImageString();",
"public String method_178() {\r\n String[] var10000 = field_7722;\r\n return \"texture\";\r\n }",
"public static String stateImg(int state) {\n return \"assets/goa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only Trailing Constant Test Case 4014 | public static void TestCaseDiff4014() {
UsageCalculus.TestCase = 4014;
UsageCalculus.EqnRegressionDiffStatus = "All RED Including Values Trailing Constant Dropped";
UsageCalculus.EqnRegressionIntegreStatus = "All RED Including Values Trailing Constant Dropped";
UsageCalculus.EqnUnderT... | [
"static boolean constants(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"constants\")) return false;\n if (!nextTokenIs(b, \"\", CONST, ID)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = constants_0(b, l + 1);\n if (!r) r = constItem(b, l + 1);\n exit_section_(b, m, n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
",,0,1");//espace vide = spellSprite, 0=displayType, 1=showInFrontOf | public GAction newSpellArmeAction(CombativeCharacter caster, int targetCellID) {
return new GAction(caster.getWorld().getNextActionID(), LANCER_SORT_CAC.getType(), targetCellID+",,0,1");
} | [
"private void drawFireTruckAttacking(){\n game.batch.begin();\n game.font33.draw(game.batch, \"A\", screenWidth / 1.205f, screenHeight /2.81f);\n game.batch.end();\n }",
"public String getSprite() {\n return \"EYE\";\n }",
"void draw(SpriteBatch batch){ batch.draw(pauseMenuText... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes the software keyboard if its open | public void closeKeyboard() {
View view = this.getCurrentFocus();
if (view != null) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
} | [
"private void closeKeyPad() {\n\t}",
"public static void ck() {\r\n\t\tkeyboard.close();\r\n\t}",
"protected void closeSoftKeyBoard(){\n InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n// imm.soft\n if (getActivity().getCurrentFocu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_notice.oper_time | public Date getOperTime() {
return operTime;
} | [
"public String getInputOperTime() {\r\n\t\treturn inputOperTime;\r\n\t}",
"public Long getO_Time() {\n\t\treturn O_Time;\n\t}",
"public IntColumn getTime() {\n return delegate.getColumn(\"time\", DelegatingIntColumn::new);\n }",
"public String getInputOper2Time() {\r\n\t\treturn inputOper2Time;\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build qualified name from qualified name parts | String buildQualifiedName(String separator); | [
"QualifiedPrefix getName();",
"private static String toFullyQualifiedName(String shortName, String basePackage) {\n StringBuilder sb = new StringBuilder(basePackage);\n sb.append('.');\n sb.append(StringUtils.trimExtension(shortName));\n\n return sb.toString();\n }",
"private stat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the request to retrieve the avatar URL. | @Override
public Request<?> createRequest(final String requestUrl, final Response.Listener<Bitmap> responseListener, final int maxWidth, final int maxHeight, final Bitmap.Config bitmapConfig,
final Response.ErrorListener errorListener) {
final IDataRetriever dataRetriever... | [
"private static String buildActorAvatarUrl(String avatarPath) {\n Uri builder = Uri.parse(TMDB_IMAGES_BASE_URL)\n .buildUpon()\n .appendEncodedPath(TMDB_ACTOR_AVATAR_SIZE_URL_PATH + avatarPath)\n .build();\n\n return builder.toString();\n }",
"public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UNIVERSAL IMAGE LOADER SETUP | private void ImageLoaderConfig() {
DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
.cacheOnDisc(true).cacheInMemory(true)
.imageScaleType(ImageScaleType.EXACTLY)
.displayer(new FadeInBitmapDisplayer(300)).build();
ImageLoaderConfigu... | [
"public ImageLoader() {\n\t\tthis.image = null;\n\t\tthis.bufferedImage = null;\n\t}",
"@Override\n public void LoadImage() {\n }",
"public static void imageReader(){\r\n\t\tBufferedImageLoader loader=new BufferedImageLoader();\r\n\t\t\r\n\t\ttry{\r\n\t\t\t\r\n\t\tspriteSheet= loader.loadImage(\"/obraz8.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a String expression, this will return the same expression minus any spaces. | private static String removeSpaces(String expression) {
return expression.replaceAll("\\s+", "");
} | [
"String SpaceRem(String expression) {\t\r\n\t\tint Len=expression.length();\r\n\t\tString out1=\"\";\r\n\t\tString out2=\"\";\r\n\t\tfor(int i=0;i<Len;i++) {\r\n\t\t\tchar curr=expression.charAt(i);\r\n\t\t\tif(Check(curr)!=1) {\r\n\t\t\t\tout1+=curr;\r\n\t\t\t}\r\n\t\t}\r\n\t\tLen=out1.length();\r\n\t\tfor(int i=0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Positive case: transfer will succeed When amount is zero | @Test
public void transferMoneyWhenAmountZero() throws Exception {
// create account = 111 (accountFromId)
this.mockMvc.perform(post("/v1/accounts").contentType(MediaType.APPLICATION_JSON)
.content("{\"accountId\":\"111\",\"balance\":1000}")).andExpect(status().isCreated());
// create account = 123 (accoun... | [
"public void transferToCard(double amount){\r\n if (amount > 0 ){\r\n balance = balance + amount;\r\n System.out.println(\"balance is \" + balance);\r\n \r\n }\r\n else{\r\n System.out.print(\"error, amount must be greater than 0\");\r\n }\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Launch the application. Create the frame. | public FrameBoutique(JMenuBar jMenuBar) {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 691, 433);
//setJMenuBar(new FrameMenu().Menu());
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setJMenuBar(jMenuBar);
setContentPane(contentPane);... | [
"public final void runApp() {\n \t\ttry {\n \t\t\tjbInit();\n \t\t\tfinal int appSize = 500;\n \t\t\tthis.setSize(appSize, appSize);\n \n \t\t\t// Center the frame on screen\n \t\t\tthis.setLocationRelativeTo(null);\n \n \t\t\t// Display the giu\n \t\t\tthis.setVisible(true);\n \t\t} catch (Exception e) {\n \t\t\te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool result_null = 1001; | public Builder clearResultNull() {
resultNull_ = false;
onChanged();
return this;
} | [
"boolean getReturnResultNull();",
"void resultTrue();",
"public Builder setReturnResultNull(boolean value) {\n \n returnResultNull_ = value;\n onChanged();\n return this;\n }",
"boolean hasResultNum();",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calling the method from lead test | @Test(priority=eventCommonvalidationDetails)
void eventCommonvalidationDetails () throws InterruptedException, IOException{
leadtest.commonvalidationEventDetails();
} | [
"public void testManualTest()\n {\n\n }",
"abstract protected void doCall(TestMethod method) throws Exception;",
"@Override\n public void test() {\n }",
"@Override\n\t\tpublic void testMe() {\n\t\t\t\n\t\t}",
"public void testIt() {\n\t}",
"public void test(){\r\n\t}",
"public void tes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the route with the minimum movement cost between two territories so that covered territories except the start and end match the condition or null if no route exists. Also validates canals between any of the territories. Since different units can have different movement costs per territory, it takes the max move... | @Nullable
public Route getRouteForUnits(
final Territory start,
final Territory end,
final Predicate<Territory> cond,
final Collection<Unit> units,
final GamePlayer player) {
checkNotNull(start);
checkNotNull(end);
return new RouteFinder(this, Matches.territoryIs(end).or(cond... | [
"public Route getShortestRouteBetween(Town start, Town end) {\n VisitedTowns visited = new VisitedTowns(start);\n shortestRoute = 30;\n Set<Route> routes = searchForShortestRoute(visited, end);\n\n Route result = null;\n int shortest = Integer.MAX_VALUE;\n\n for (Route rout... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make sure nested filters encoding is enabled, otherwise skip test | @Test
public void testNesteGeometryFilterOnNonGeometryProperty() throws Exception {
Assume.assumeTrue(shouldTestNestedFiltersEncoding(rootMapping));
PropertyName nestedGeom = ff.property(NestedGeometryFilterEncodingTest.STATION_WRONG_NESTED_GEOM);
BBOX bbox = ff.bbox(nestedGeom, (-4), 2.5, 0... | [
"@Bean\n\tpublic OrderedCharacterEncodingFilter characterEncodingFilter() {\n\t\tOrderedCharacterEncodingFilter filter = new OrderedCharacterEncodingFilter();\n\t\tfilter.setEncoding(this.httpEncodingProperties.getCharset().name());\n\t\tfilter.setForceEncoding(this.httpEncodingProperties.isForce());\n\t\tfilter.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data JPA repository for the MaterielPromo entity. | @SuppressWarnings("unused")
@Repository
public interface MaterielPromoRepository extends JpaRepository<MaterielPromo, Long> {
} | [
"public interface PromotionDAO extends JpaRepository<PromotionDO, Long>{\n\n// PromotionDO findById(Long id);\n PromotionDO findByIdAndLimitMoneyIsLessThanEqual(Long promotionId, Long amount);\n List<PromotionDO> findAllByProductIdAndLimitMoneyLessThanEqual(Long productId, Long amount);\n}",
"@Repository... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Pop an element from the top of the stack public int pop() public Node pop() | public void pop() {
// Check if it's empty
if (this.top == null) {
System.out.println("Can't remove, stack is empty.");
} else {
this.top = this.top.next;
}
} | [
"public Node pop()\n {\n return stack.remove(top--);\n }",
"public int pop() {\n int value = this.top.data;\n this.top = this.top.next;\n return value;\n }",
"public int pop() {\n\t\treturn stack.remove();\n\t}",
"public int pop() {\n\t \tint x= peek();\n\t \tstack.remove(0);\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ operation for base panel | public void BaseaddComponet(BaseComponet bc){
BaseComponets.add(bc);
} | [
"abstract void buildPanel();",
"private JPanel getPanelBase() {\n\t\tif (panelBase == null) {\n\t\t\tpanelBase = new JPanel();\n\n\t\t\tpanelBase.setLayout(new CardLayout(0, 0));\n\n\t\t\t// se añade el panel de la tienda al card layout\n\t\t\tpanelBase.add(getPanelPrincipal(), \"panelPrincipal\");\n\n\t\t\t// se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lets see what's going on | private SmallAd querySmallAdDetails(SelenideElement smallAdElement)
{
smallAdElement.scrollTo();
// Get activation status
boolean isActive = isActive(smallAdElement);
// Get id
smallAdElement.shouldHave(attribute("data-adid"));
String id = smallAdElement.getAtt... | [
"private static void EX5() {\n\t\t\r\n\t}",
"protected void mo4791d() {\n }",
"private void testing() {\n\t}",
"@Override\r\n\tpublic void breakDown() {\r\n\t\t\r\n\t}",
"public static void Q22()\r\n\t{\r\n\t}",
"public static void debug_echoResult() {\n\n System.out.println(\"\");\n\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /vacationrequests/:id : delete the "id" vacationRequest. | @RequestMapping(value = "/vacation-requests/{id}",
method = RequestMethod.DELETE,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<Void> deleteVacationRequest(@PathVariable Long id) {
log.debug("REST request to delete VacationRequest : {}", id);
vacationR... | [
"@RequestMapping(value = \"/request/{id}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<?> deleteRequest(@PathVariable(value = \"id\") Integer reqeustIdParam) throws ServiceException {\n\n\t\tif (reqeustIdParam == null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t}\n\n\t\ttry {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A recursive function to max heapify the given subtree. This function assumes that the left and right subtrees are already heapified, we only need to fix the root. | public void repararHeap(int pos)
{
if (ehNoFolha(pos)) return;
int esq = filhoAEsquerda(pos);
int dir = filhoADireita(pos);
int maior = pos;
if (esq <= this.tamanhoMaximo && Heap[esq] > Heap[pos])
maior = esq;
if (dir <= this.tamanhoMaximo && Heap[dir] > Heap[maior])
maior = dir;
if (maio... | [
"private void adjustHeap(int root) {\n\t\tint l=this.left(root); \r\n\t\tint r =this.right(root);\r\n\t\tint max =root;\r\n\t\tif(l<this.getLength()&&a[l]>a[max])max=l;\r\n\t\tif(r<this.getLength()&&a[r]>a[max])max=r;//root的左右孩子和自己比较,找到当中值最大的下标,如果就是root的话,那么不用进行调整,否则,root和最大的值交换;\r\n\t\tif(max==root) {\t\t\t\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ sample => "webscraper" "4374 MB" | @Query(value = "SELECT :dbName AS table_name, pg_size_pretty( pg_database_size(:dbName) ), pg_database_size(:dbName)", nativeQuery = true)
public List<Object[]> getDbNameAndSizes(@Param("dbName") String dbName); | [
"@Ignore\n @Test\n public void stringSizeEstimatorQuality() \n {\n MemoryMeter meter = new MemoryMeter().ignoreKnownSingletons().ignoreOuterClassReference().ignoreNonStrongReferences();\n \n for(int k = 0; k < 100; ++k) \n {\n String s = new String();\n while(s.length() < ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Append InceptionResNet B to a computation graph. | public static ComputationGraphConfiguration.GraphBuilder inceptionV1ResB(ComputationGraphConfiguration.GraphBuilder graph, String blockName, int scale, double activationScale, String input) {
// first add the RELU activation layer
graph.addLayer(nameLayer(blockName,"activation1",0), new ActivationLayer.... | [
"public DynamicNetwork inject(ProjectBll projectBll, NodeBll nodeBll, GraphNodeBll graphNodeBll, RelationNodeBll relationNodes) {\n this.graphNodes = graphNodeBll;\n this.nodes = nodeBll;\n this.projects = projectBll;\n this.relationNodes = relationNodes;\n return this;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets be called on closing tags like: | @Override
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (localName.equals("pragyan")) {
this.in_pragyan = true;
}
else if (localName.equals("type")) {
this.in_type = false;
}else if (localName.equals("name")) {
this.in_name = false;
}else ... | [
"protected void closeTag()\n {\n closeTag(true);\n }",
"public boolean getNeedClosingTag();",
"public void closeTag()\n\t{\n\t\tbuilder.setLength(0);\n\t\tthis.tagStack.removeLast();\n\t}",
"void end(TagHeader adapter) throws HtmlWalkerException;",
"void end(TagObject adapter) throws HtmlWal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the Edge connecting Node u and Node v | public Edge getEdge(Node u, Node v) throws GraphException {
// check if nodes exist
if (indexVertex(u.getName()) == length || indexVertex(v.getName()) == length){
throw new GraphException(new Exception());
} else {
// check if edge exists
if (adjMatrix[u.getName()][v.getName()] == null){
throw... | [
"public float getEdge();",
"ZEdge edge();",
"int getEdgeConnectivity();",
"Edge(int u, int v, double w) {\n\t\tthis.u = u;\n\t\tthis.v = v;\n\t\tthis.w = w;\n\t}",
"public Edge(Node u, Node v, int type) {\n\t\tthis.u = u;\n\t\tthis.v = v;\n\t\tthis.type = type;\n\t}",
"public Edge edge(int u, int v) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets and updates the x location of the Game Object. | public void setX(double newX)
{
x = newX;
y = getTranslation().getTranslateY();
center.setLocation(x, y);
// Sets the translation to the new x.
resetTranslation();
translate(x, y);
} | [
"public void setX(int x){\n\t\tthis.pos.x=x;\n\t}",
"public void updateX() {\n\n for (GameObject gameObject : this.getGameObjectList()) {\n gameObject.setX(this.getX());\n }\n }",
"public void setX(int x)\r\n\t{\r\n\t\txPos = x;\r\n\t}",
"public void setX(double x){\n\t\tpos.x = x;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a hashcode for this object | @Override
public int hashCode() {
int hash = 3;
hash = (int) (hash + x);
hash = (int) (hash + y);
hash = (int) (hash + z);
return hash;
} | [
"public Integer getHashcode() {\n\t\treturn hashcode;\n\t}",
"public abstract int formHashCode();",
"public int hashCode()\n\t{\n\t\treturn this.toString().hashCode();\n\t}",
"public int hashCode() {\r\n return this.toString().hashCode();\r\n }",
"public int hashCode() {\n/* 102 */ int hash = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Crear la tabla de autores | @Override
public void onCreate(SQLiteDatabase db) {
String CREATE_AUTHOR_TABLE = "CREATE TABLE " + TABLE_AUTHOR + "(" +
KEY_AUTHOR_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
KEY_AUTHOR_NAME + " TEXT," +
... | [
"private void createTables() {\r\n \t/*\r\n \tString sql = \"CREATE TABLE IF NOT EXISTS Tiere (\"\r\n + \"Tiere_ID INTEGER AUTO_INCREMENT, \"\r\n + \"Tier VARCHAR(255), \"\r\n + \"Beine INTEGER, \"\r\n + \"PRIMARY KEY (Tiere_ID));\";\r\n // Sy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "authentication" element | void setAuthentication(com.guidewire.accelerator.deployment.Accelerator.RpcWebService.Setting.Authentication authentication); | [
"public void setAuthentication(Authentication Authentication) {\n this.Authentication = Authentication;\n }",
"public void setAuthenticationInfo( AuthenticationInfo authenticationInfo )\n {\n this.authenticationInfo = authenticationInfo;\n }",
"public void setElevatedAuthenticationCred... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method extracts the list of groups that the owner of this token has access to. If "Alice" is a member of the groups "G1" and "G2" defined at the group server "Server1", this method will return ["G1", "G2"]. | public List<String> getGroups(); | [
"java.util.List<com.cloudera.thunderhead.service.authdistributor.AuthDistributorProto.Group> \n getGroupsList();",
"java.util.List<io.kubernetes.client.proto.Meta.APIGroup> getGroupsList();",
"public List<String> ownGroups();",
"List<String> getUserGroups() throws JSchException, IOException {\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This returns the dump information. | @Override
public ArrayList<String> getDumpInfo()
{
ArrayList<String> tmpDumpList;
tmpDumpList = new ArrayList<>();
// Format the fields
tmpDumpList.add("============ STREAM HEADER ===========");
tmpDumpList.add(" Stream name = <" + this.StreamName + ">");
tmpDumpList.add(" Transaction ... | [
"@Override\n public ArrayList<String> getDumpInfo()\n {\n RecordError tmpError;\n int i;\n int tmpErrorCount;\n ArrayList<String> tmpDumpList;\n\n tmpDumpList = new ArrayList<>();\n\n // Get the error count\n tmpErrorCount = this.getErrors().size();\n\n // Format the fields\n tmpDumpLis... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |