query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Implementations encode a contribution URI so that it may be dereferenced remotely in a domain, e.g. over HTTP. | public interface ContributionUriEncoder {
/**
* Encode the local contribution URI.
*
* @param uri the uri to encode
* @return the encoded URI which may be dereferenced in the domain
* @throws URISyntaxException if the URI is invalid
*/
URI encode(URI uri) throws URISyntaxException... | [
"String getContributionURI();",
"URI encode(URI uri) throws URISyntaxException;",
"public abstract String encodeURL(CharSequence url);",
"public static URI parseContributionName(URL contribution) {\n String contributionName;\n String path = contribution.getPath();\n int pos = path.lastInd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The 'randomString' is not a special value for the BINARY_DOUBLE type so it should throw an error. | @Test(expected = Exception.class)
public void testInsertPSRandomValuesDoNoWorkInBinaryDoubleColumn() throws Exception {
testInsertSpecialValuesByPS("randomString");
} | [
"@Test(expected = Exception.class)\n public void testPersistRandomValuesDoNoWorkInBinaryDoubleColumn() throws Exception {\n testPersistSpecialValues(\"randomString\");\n }",
"@Test(expected = Exception.class)\n public void testInsertPS2RandomValuesDoNoWorkInBinaryDoubleColumn() throws Exception {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Paints all of the Nodes of the GraphModel. | private void paintNodes(Graphics2D g) {
for (Node node : graph.getNodes())
paintNode(g, node);
} | [
"public void drawGraph() {\r\n\t\tdouble x0, x1, y0, y1, directX, directY;\r\n\t\tCollection<node_data> nodes = g.getGraph().getV();\r\n\t\tfor (node_data i : nodes) {\r\n\t\t\tx0 = g.getGraph().getNode(i.getKey()).getLocation().x();\r\n\t\t\ty0 = g.getGraph().getNode(i.getKey()).getLocation().y();\r\n\t\t\tStdDraw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validar que el importe de la carta fianza no sea cero | private boolean verificarImporte(double importe) {
if (importe == 0) {
return false;
}
return true;
} | [
"private void validaImportoCapitoloUscitaPrevisione() {\n\t\tvalidaImportoCapitolo(model.getImportiCapitoloUscitaPrevisione0(), 0, true, true);\n\t\tvalidaImportoCapitolo(model.getImportiCapitoloUscitaPrevisione1(), 1, false, true);\n\t\tvalidaImportoCapitolo(model.getImportiCapitoloUscitaPrevisione2(), 2, false, t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Launches default Email app | public void launchEmail(){
Intent sendIntent = new Intent(Intent.ACTION_MAIN);
sendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);
if (sendIntent.resolveActivity(pacman) != null) {
startActivity(sendIntent);
return;
} else {
Toast.makeText(context, "No Email... | [
"private void openGmailApp() {\n Spanned text = Html.fromHtml(\"Android OS Version: \" + android.os.Build.VERSION.SDK_INT + \"<br>\" +\n \"Device Information: \" + getDeviceName() + \"<br>\");\n\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n emailIntent.putExtra(android... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the rep is ok in the following aspects: (1) neighborOk()? Modifies: operation repOk() | private boolean repOk() {
// #[ operation repOk()
return (neighborOk());
// #]
} | [
"private boolean neighborOk() {\r\n // #[ operation neighborOk()\r\n // check if this arc has two neighbors\r\n if (neighbor.size() != 2)\r\n return false;\r\n // check if all the neighbors are Node\r\n Iterator iter = getNeighbor();\r\n while (iter.hasNext()) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return a complex object its value is the sum of this object and the given complex s | public Complex add(Complex s)
{
Complex temp = new Complex();
temp.setReal(s.real() + this.a);
temp.setImag(s.imag() + this.b);
return temp;
} | [
"public Complex multiply(Complex s)\r\n\t{\r\n\t\tComplex temp = new Complex();\r\n\t\ttemp.setReal(this.a * s.real() - this.b * s.imag());\r\n\t\ttemp.setImag(this.b * s.real() + this.a * s.imag());\r\n\t\treturn temp;\r\n\t}",
"Complex add(Complex z){\n return new Complex(this.re+z.re,this.im+z.im);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test RPC backoff by queue full. | @Test (timeout=30000)
public void testClientBackOff() throws Exception {
Server server;
final TestRpcService proxy;
boolean succeeded = false;
final int numClients = 2;
final List<Future<Void>> res = new ArrayList<Future<Void>>();
final ExecutorService executorService =
Executors.newF... | [
"public abstract void backoffQueue();",
"@Test(timeOut = 10_000)\n public void testThrottleEmptyQueue()\n throws Exception\n {\n\n ThrottledAsyncQueue<Integer> queue = new ThrottledAsyncQueue<>(2, 10, executor);\n assertTrue(queue.offer(1).isDone());\n assertTrue(queue.offer(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the master of proposal. | public void setMasterOfProposal(final MasterEntry masterEntry) {
this.masterOfProposal = masterEntry;
} | [
"@Override\n public void setMaster(NIONode master) {\n }",
"@ManyToOne(fetch = FetchType.LAZY)\n @JoinColumn(name = \"masterOfProposal\")\n public MasterEntry getMasterOfProposal() {\n return this.masterOfProposal;\n }",
"public void setMaster(IveObject master);",
"public long getMasterI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the galleryimage definition allowing to specify Disallowed. | interface WithDisallowed {
/**
* Specifies disallowed.
* @param disallowed the disallowed parameter value
* @return the next definition stage
*/
WithCreate withDisallowed(Disallowed disallowed);
} | [
"@Override\n\tpublic boolean isDenied() {\n\t\treturn _editionGallery.isDenied();\n\t}",
"boolean getNoImageState();",
"void setNoImageState(boolean b);",
"public boolean isProhibited() {\n return _isProhibited;\n }",
"public boolean isInhibited() {\n return inhibited;\n }",
"public boolean isPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserts a repetition of RXA16: "Substance Expiration Date" at a specific index | public DTM insertRxa16_SubstanceExpirationDate(int rep) throws HL7Exception {
return (DTM) super.insertRepetition(16, rep);
} | [
"public DTM insertSubstanceExpirationDate(int rep) throws HL7Exception { \r\n return (DTM) super.insertRepetition(16, rep);\r\n }",
"public Expiration insertExpiration(Expiration e){\n boolean expExists = false;\n int tempIter = 0;\n Expiration temp;\n while(!expExists && exp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
[DllImport(PATH, CallingConvention = CallingConvention.Cdecl)] public static extern int TextCreate(string font, int fontSize, bool bBold, bool bItalic, int x, int y, uint color, string text, bool bShadow, bool bShow); | int TextCreate(String font, int fontSize, boolean bBold, boolean bItalic, int x, int y, NativeLong color, String text, boolean bShadow, boolean bShow); | [
"Text createText();",
"Font createFont();",
"FONT createFONT();",
"public static native int create3DTextLabel(String text, int color, float x, float y, float z, float drawDistance, int worldid, boolean testLOS);",
"FreeText createFreeText();",
"public static native int createPlayer3DTextLabel(int playerid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a PacmanShape instance with specified values for instance variables. | public PacmanShape(int x, int y, int deltaX, int deltaY) {
super(x,y,deltaX,deltaY);
} | [
"public PacmanShape() {\n\t\tsuper();\n\t}",
"public PacmanShape(int x, int y) {\n\t\tsuper(x,y);\n\t}",
"public Pacman(String [] values) {\n\t\ttry {\n\t\t\tid = Integer.parseInt(values[1]);\n\t\t\tdouble x = Double.parseDouble(values[2]);\n\t\t\tdouble y = Double.parseDouble(values[3]);\n\t\t\tdouble z = Doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates how much damage their attack deals overrides Creature's damage random number between 1 and strength 5% chance of +50 damage | public int damage()
{
Random rand = new Random();
int dmg = rand.nextInt(strength)+1;
if(rand.nextInt(20)<1)
{
dmg+=50;
}
return dmg;
} | [
"public int damage(){\n Random rand = new Random();\n int damage = rand.nextInt(strength)+1;\n return damage;\n }",
"public int generateDamage() {\n int max = 175 * level;\n int min = 50 * level;\n return (int) (Math.random() * (max - min) + min);\n }",
"public int a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stack: 123456789 0ABCDEFGHIJKLMNOPQRSTUVWXYZ needlePos: 34 78 LMN R needleNeg: 34 78 U LMN R | @Test
public void testStringContainsString()
{
String stack = "123456789 0ABCDEFGHIJKLMNOPQRSTUVWXYZ";
String needlePos = "3478LMNR";
String needleNeg = "3478ULMNR";
assertTrue(MockServicesUtil.stringContainsString(stack, needlePos));
assertFalse(MockServicesUtil.stringContainsString(sta... | [
"boolean bufferMatches(byte[] haystack, byte[] needle, int position) {\n for (int i = 0; i < needle.length; i++) {\n int posInHaystack = position - i;\n while (posInHaystack < 0) {\n posInHaystack += haystack.length;\n }\n posInHaystack = posInHaysta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new issue. | public Issue(int issueId) {
super(issueId);
} | [
"Issue createIssue();",
"public Issue() {\n }",
"public IssueRecord() {\n\t\tsuper(Issue.ISSUE);\n\t}",
"public TcJiraIssue() {\r\n issue = new RemoteIssue();\r\n }",
"public IssuesTracker() {\r\n // Empty\r\n }",
"public final GitHubIssue create(GitHubIssue issue)\n\t\t\tthrows GitHu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a list of states into a sequence represented by a string. | String stateToString(List<Integer> states); | [
"String stateToString(int[] states);",
"List<Integer> stringToState(String sequence);",
"public static String stateProbabilityToString(double stateProbability[]) {\r\n\t\tString result = \"[\";\r\n\t\tfor (int i = 0; i < stateProbability.length; i++) {\r\n\t\t\tresult += Double.toString(Math.round(stateProbabil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the PersonneltypeBean object from the personnel.personneltypeid field. | public PersonneltypeBean getPersonneltypeBean(PersonnelBean pObject) throws SQLException
{
PersonneltypeBean other = PersonneltypeManager.getInstance().createPersonneltypeBean();
other.setPersonneltypeid(pObject.getPersonneltypeid());
return PersonneltypeManager.getInstance().loadUniqueU... | [
"public Integer getPersonnelType() {\n return personnelType;\n }",
"public void setPersonnelType(Integer personnelType) {\n this.personnelType = personnelType;\n }",
"public PersonnelBean getPersonnelBean(PersonnelBean pObject) throws SQLException\r\n {\r\n PersonnelBean other = Pe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the number of bits of precsions the depth buffer should have. Not sanity checking is performed, but it should be a multiple of 8. If a value of 0 is provided the depth buffer will be disabled for this buffer. | public void setDepthBits(int depth)
{
depthBits = depth;
} | [
"void setDepth(float depth);",
"public static native void ChannelHandshakeConfig_set_minimum_depth(long this_ptr, int val);",
"void setBitsPerComponent(int bitsPerComponent);",
"void setDepth( double theDepth );",
"public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);",
"prote... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form ConfigDialogTest | public ConfigDialogTest() {
initComponents();
} | [
"protected ConfigDialog createConfigDialog() {\r\n if (parent instanceof Frame) {\r\n \r\n return new ConfigDialog(this, (Frame) parent);\r\n } else if (parent instanceof Dialog) {\r\n return new ConfigDialog(this, (Dialog) parent);\r\n } else {\r\n Util.A... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the uniqueDeviceId of the king | public String getKingUniqueDeviceId() {
return kingUniqueDeviceId;
} | [
"UUID getDeviceId();",
"java.lang.String getDeviceId();",
"String getDeviceId();",
"@SuppressWarnings(\"HardwareIds\")\n public String getUniqueDeviceId() {\n return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);\n }",
"java.lang.String getDeviceid();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
True if we have a request token in the shared preferences, false otherwise | public static boolean hasRequestToken(Context context){
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
return prefs.getString(TWITTER_REQUEST_TOKEN, null)!= null;
} | [
"public static boolean hasRequestTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN_SECRET, null)!=null;\n\t\t}",
"public boolean isTokenValide() {\n try {\n token = Save.defau... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public Information info=new Information(player_1.getText().toString(),player_2.getText().toString(),Integer.parseInt(rounds.getText().toString())); | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Information.current_round_number = 1;
Information.player1_current_score = 0;
Information.player2_current_score = 0;
Button button... | [
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.player);\n\n\n //EditText namePlayer1 = (EditText) findViewById(R.id.editText);\n //s.setText(player1);\n //EditText namePlayer2 = (EditText) findVi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Structured version of the entity requesting config. .envoy.config.core.v3.BuildVersion user_agent_build_version = 8; | @java.lang.Override
public io.envoyproxy.envoy.config.core.v3.BuildVersion getUserAgentBuildVersion() {
if (userAgentVersionTypeCase_ == 8) {
return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;
}
return io.envoyproxy.envoy.config.core.v3.BuildVersion.getDefaultInstance()... | [
"@java.lang.Override\n public io.envoyproxy.envoy.config.core.v3.BuildVersionOrBuilder getUserAgentBuildVersionOrBuilder() {\n if (userAgentVersionTypeCase_ == 8) {\n return (io.envoyproxy.envoy.config.core.v3.BuildVersion) userAgentVersionType_;\n }\n return io.envoyproxy.envoy.config.core.v3.Build... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether this register is accepted_tou. | public void setAccepted_tou(boolean accepted_tou); | [
"public boolean isAccepted_tou();",
"public boolean getAccepted_tou();",
"public void setForua(boolean newValue);",
"public void setIsEuropeanUnion(Boolean value) {\r\n this.isEuropeanUnion = value;\r\n }",
"public void setIsaccepted(Integer isaccepted) {\n this.isaccepted = isaccepted;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__InputHandler__NameAssignment_1" $ANTLR start "rule__InputHandler__InputPortAssignment_3" InternalComponentDefinition.g:8157:1: rule__InputHandler__InputPortAssignment_3 : ( ( ruleFQN ) ) ; | public final void rule__InputHandler__InputPortAssignment_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:8161:1: ( ( ( ruleFQN ) ) )
// InternalComponentDefinition.g:8162:2: ( ( ruleFQN ) )
{
... | [
"public final void rule__InputPort__ServiceAssignment_3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:8033:1: ( ( ( ruleFQN ) ) )\n // InternalComponentDefinition.g:8034:2: ( ( ruleFQN ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy all issues from Jira into GitHub. | public void copyIssues() {
try {
SearchResult jiraResults = getJiraIssues();
Iterable<Issue> issues = jiraResults.getIssues();
GitHub github = GitHub.connectUsingPassword(getGitHubUsername(), getGitHubPassword());
GHMyself me = github.getMyself();
GHRepository sitewhere = github.getRep... | [
"private List<TurboIssue> deepCopyIssues(TreeMap<Integer, TurboIssue> issuesToCopy) {\n ArrayList<TurboIssue> copiedIssues = new ArrayList<>();\n issuesToCopy.values().forEach(issue -> copiedIssues.add(new TurboIssue(issue)));\n\n return copiedIssues;\n }",
"private Issue convertToIssue(GH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the tags to be added to the note | public void setTags(Tag[] tags) {
this.tags = tags;
} | [
"public abstract void setTags(String tags);",
"Imports setTags(String tags);",
"public void setTags(String tags) {\r\n this.tags = tags;\r\n }",
"public void setTags(UniqueTagList replacement) {\n }",
"void addTag(String tag){tags.add(tag);}",
"public void addTags(Map<String,String> tags) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the location for Y of the black king | public int getBlackY(){
return blackKingPos[1];
} | [
"public int getWhiteY(){\n \treturn whiteKingPos[1];\r\n }",
"Square kingPosition() {\r\n return king;\r\n }",
"public Square getBlackKingPosition()\n\t{\n return squareMap.get(\"BK\");\n }",
"public int get_Y_Coordinate()\n {\n return currentBallY;\n }",
"public int g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the passive perception based on the Wisdom. | private void updatePassivePerception(){
//TODO Proficiency is not being calculated right now.
//Base 10 plus ability modifier equals passive perception.
this.passivePerception = 10 + (int) Math.floor((double) (this.wisdom-10)/2);
} | [
"private void updatePassTarget() {\n Ball ball = fsmAI.ball;\n double time = ball.getTimeToCoverDistance(Vector.getDistanceBetween(passTarget, ball.position), ball.getCurrentSpeed());\n \n passTarget = ball.predictPositionInTime(time);\n \n if (steeringBehavior instanceof Arriv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Replaces the given sheep entity with a mushroom sheep entity. | public static void replaceSheep(@Nonnull Sheep sheep, @Nullable MushroomType mushroomType) {
sheep.setSpeed(0);
Level world = sheep.level();
//create mushroom sheep
MushroomSheepEntity mushroomSheep = ModEntityTypes.MUSHROOM_SHEEP.get().create(world);
if (mushroomSheep != null &&... | [
"public void addSheep(Sheep sheep) {\r\n\t\tsheeps.add(sheep);\r\n\t}",
"@Override\n public void setSheared(boolean sheared) {\n this.entityData.set(SHEARED, sheared);\n super.setSheared(sheared); //set sheared value of super class to be compatible with other mods\n }",
"public void replaceH... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the icon size panel. | private JPanel createIconSizePanel() {
ProportionalGridPanel gridPanel = new ProportionalGridPanel(2);
gridPanel.add(new JLabel(Translator.get("prefs_dialog.toolbar_icons")));
gridPanel.add(toolbarIconsSizeComboBox = createIconSizeCombo(MuConfiguration.TOOLBAR_ICON_SCALE, MuConfiguration.DEF... | [
"ImageIcon createResizedIcon(ImageIcon i, int w, int h);",
"private FocusPanel createIconPanel()\r\n \t{\r\n \t\tFocusPanel iconPanel = new FocusPanel();\r\n \t\ticonPanel.setStyleName(\"icon\");\r\n \t\treturn iconPanel;\r\n \t}",
"private void createXONImageMakerIconPane() throws Exception {\r\n\t\tif (m_XONI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Mode Variable'. | ModeVariable createModeVariable(); | [
"Mode createMode();",
"ModeElementType createModeElementType();",
"ModeElement createModeElement();",
"static UaVariableNode addModeInstanceDeclaration(UaObjectTypeNode conveyorTypeNode, OpcUaServer server, UShort namespaceIndex) {\n NodeId nodeId = new NodeId(namespaceIndex, \"ObjectTypes/ConveyorType... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reallocate the view to the new size given by the passed shape. | protected Rectangle reallocate(Shape a) {
Rectangle alloc = a.getBounds(); // makes a fresh rectangle instance
setSize(alloc.width, alloc.height); // set new size
return alloc;
} | [
"public void redrawShape() {\r\n\t\tint currentLeft = shapeParentPanel.getWidgetLeft(shapePanel)-1;\r\n\t\tint currentTop = shapeParentPanel.getWidgetTop(shapePanel)-1;\r\n\t\t\r\n\t\tshape.setLeft(currentLeft);\r\n\t\tshape.setTop(currentTop);\r\n\t\tshapePanel.setShape(shape);\r\n\t}",
"@Override\n public Shap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Plazo Resolucion feature. | protected void addPlazoResolucionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(
createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TramitacionProcedimiento_plazoResolucion_feature"),
... | [
"protected void addPlacaPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors.add\r\n\t\t\t(createItemPropertyDescriptor\r\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t getResourceLocator(),\r\n\t\t\t\t getString(\"_UI_ContenedorDetalleVehiculoViewModel_plac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform an initial save of a previously unsaved RunJEquRunStatusHis entity. All subsequent persist actions of this entity should use the update() method. | public void save(RunJEquRunStatusHis entity) {
LogUtil.log("saving RunJEquRunStatusHis instance", Level.INFO, null);
try {
if (entity.getRunStatusHisId() == null) {
entity.setRunStatusHisId(bll.getMaxId(
"run_j_equ_run_status_his", "run_status_his_id"));
}
entityManager.persist(entity);
... | [
"public RunJEquRunStatusHis update(RunJEquRunStatusHis entity) {\r\n\t\tLogUtil.log(\"updating RunJEquRunStatusHis instance\", Level.INFO, null);\r\n\t\ttry {\r\n\t\t\tRunJEquRunStatusHis result = entityManager.merge(entity);\r\n\t\t\tLogUtil.log(\"update successful\", Level.INFO, null);\r\n\t\t\treturn result;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Preparing scenario: recipe without items | @Test(expected=CoffeeMachineException.class)
public void recipeWithoutItems() {
Recipe blackRecipe = blackRecipe();
blackRecipe.getItems().clear();
// Operation under test
facade.configuteDrink(Button.BUTTON_1, blackRecipe);
} | [
"private void checkRecipes() {\n\n for (Recipe recipe : this.recipeItems.values()) {\n List<String> requiredItems = new ArrayList<>(recipe.getRequiredItems());\n\n for (Item item : this.commonItems.values()) {\n requiredItems.remove(item.getName());\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the database table name for the class of this object. | public String getTableName () {
return getLegacyDbObjectClassVariables().tableName;
} | [
"public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}",
"public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}",
"public String getTableName() {\n if (tableName == null) {\n tableName = Strings.tableize(ActiveRecords.findActive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the precede weight | public double getPrecedeWeight()
{
return precedeWeight;
} | [
"int getStartWeight();",
"public void setPrecedeWeight(double precedeWeight)\n {\n this.precedeWeight = precedeWeight;\n }",
"public int getRelativeWeight() {\n return relativeWeight;\n }",
"public float getStartWeight()\n {\n return startWeight;\n }",
"public int weight(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A test for the startNextDay method (success scenario) | @Test
public void advanceDayTest_Succes(){
emptyAssemblyLineTest();
Timestamp oldTime = assemblyLine.getCurrentTime();
assemblyLine.startNextDay();
assertEquals(assemblyLine.getCurrentTime().compareTo(oldTime.getNextDay()),0);
} | [
"@Test\r\n\tpublic void testGetNextWorkingDayIfWeekendWhenNormalSundayThenAdd1Day() {\r\n\r\n\t\tLocalDate date = LocalDate.of(2018, 8, 26);\r\n\r\n\t\tLocalDate actualSettlementDate = dateService.getNextWorkingDayIfWeekend(date, \"SGP\");\r\n\r\n\t\tLocalDate expectedDate = LocalDate.of(2018, 8, 27);\r\n\r\n\t\tas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ onClickAction , will call on click of OK button and Run in background option. | private void onClickAction(int uiState)
{
switch (uiState) {
/*
*
* OK button , but now it will not execute because we removed the OK
* button and run in background option for these two case as per 2.1 SFD
*/
case HTSConstant.UPLOAD_PAUSED:
case HTSConstant.DOWNLOAD_PAUSED... | [
"void okButtonClicked();",
"public void ClickOKButton() {\n\n\t\tthis.ConfirmCTSelected();\n\n\t}",
"public void okClicked() {\n updateParameters();\n super.okClicked();\n }",
"public void clickOk()\n {\n click(OK_BUTTON);\n }",
"protected void onPositiveClick() {\n sLogger.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes a JSONObject to http response. | public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {
try {
response.setContentType("application/json");
response.addHeader("Access-Control-Allow-Origin", "*");
PrintWriter out = response.getWriter();
out.print(obj);
out.flush();
out.close();
} catch (Exc... | [
"public static void writeJsonObject(HttpServletResponse response, JSONObject obj) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tresponse.getWriter().print(obj);\n\t}",
"private PrintWriter writeJson(HttpServletResponse resp, JSONObject json)\n throws IOException {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Destroy the context of access in thread local. You should implement this in your AOP class of front class (for example Page class) at your real project. | protected void destroyAccessContext() {
AccessContext.clearAccessContextOnThread();
} | [
"void destroyWebContext() {\n\t\tBeanNakamuraWebContextImpl webContext = webContextThreadLocal.get();\n\n\t\tif (webContext == null)\n\t\t\treturn;\n\n\t\t// TODO: Once the OaeWebContext interface starts holding actual objects\n\t\t// we need to clear those as well.\n\n\t\twebContextThreadLocal.set(null);\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a TouchObject, so it can be manipulated by finger interactions. | public void addTouchObject(TouchObject touchObject) {
synchronized (touchObjects) {
touchObjects.add(touchObject);
}
} | [
"public void add(BaseObject object) {\n \t\n mPendingAdditions.add(object);\n \n /* XXX Droid Code © 2012 FrostBlade LLC - Start */\n// final int count = mObjects.getCount();\n// final Object[] objectArray = mObjects.getArray();\n// for (int i = 0; i < count; i++) {\n// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column task_test.CREATE_USER_NAME | public String getCreateUserName() {
return createUserName;
} | [
"java.lang.String getCreateUser();",
"public String getCreateUserName() {\r\n return createUserName;\r\n }",
"public String getCreateUserName() {\n return createUserName;\n }",
"public String getCreateUser()\r\n\t{\r\n\t\treturn createUser;\r\n\t}",
"public String getCreateUser () {\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called right when daytime starts. | public void becomingDay() {
} | [
"public void now(){\n // use now, since it will have the time of day for \n // jumping to the right time\n Date now = new Date();\n if (now.before(mDates[0]) || now.after(mConference.end)) {\n now = (Date) mDates[0].clone();\n } \n new SetDayThread(now).start();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fill in the body of an enum deserialization method. | private static void buildEnumDeserializeMethod(String type, String typesig,
String evfull, ExceptionMethodBuilder dmeth) {
// start by handling the null string case
dmeth.appendLoadLocal(0);
BranchWrapper nonnull = dmeth.appendIFNONNULL(dmeth);
dmeth.appendACONST_NULL();
dmeth.appendReturn(type);
... | [
"private static void buildEnumValueMethods(boolean exists, String type,\n String evmeth) throws JiBXException {\n \n // set up for adding serialize/deserialize methods to enum class\n BoundClass bndclas = BoundClass.getInstance(type, null);\n ClassFile ecf = bndclas.getClassFile()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load webapp code from path relative to user project | public void loadCodeFromLocalProject(String appFilePath); | [
"public void loadCode(String appFilePath);",
"private static Path get_webapp_path() {\n try {\n return Paths.get(Util.class.getResource(SERVLET_CONFIG_PATH).toURI()).getParent().getParent();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Failed find webapp pa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "cryptAlgorithmType" attribute | void xsetCryptAlgorithmType(org.openxmlformats.schemas.presentationml.x2006.main.STAlgType cryptAlgorithmType); | [
"void setCryptAlgorithmType(org.openxmlformats.schemas.presentationml.x2006.main.STAlgType.Enum cryptAlgorithmType);",
"void setCryptAlgorithmClass(org.openxmlformats.schemas.presentationml.x2006.main.STAlgClass.Enum cryptAlgorithmClass);",
"void setCryptProviderType(org.openxmlformats.schemas.presentationml.x2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete published not stared by feed id older than test. | @Test
public void deletePublishedNotStaredByFeedIdOlderThanTest() {
PostDao postDao = mock(PostDao.class);
postService.setPostDao(postDao);
final long feedId = 1L;
final int days = 30;
postService.deletePublishedNotStaredByFeedIdOlderThan(feedId, days);
verify(postDao).deletePublishedNotStaredByFeedIdOld... | [
"@Test\n\tpublic void deleteUnreadNotStaredByFeedIdOlderThanTest() {\n\t\tPostDao postDao = mock(PostDao.class);\n\t\tpostService.setPostDao(postDao);\n\n\t\tfinal long feedId = 1L;\n\t\tfinal int days = 30;\n\t\tpostService.deleteUnreadNotStaredByFeedIdOlderThan(feedId, days);\n\n\t\tverify(postDao).deleteUnreadNo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ID uniquely identifying this HeapFile. Implementation note: you will need to generate this tableid somewhere ensure that each HeapFile has a "unique id," and that you always return the same value for a particular HeapFile. We suggest hashing the absolute file name of the file underlying the heapfile, i.e. f.... | public int getId() {
return f.getAbsoluteFile().hashCode();
} | [
"public int getId() {\n // some code goes here\n if (tableid == 0) {\n tableid = f.getAbsoluteFile().hashCode();\n }\n return tableid;\n }",
"public int getId() {\n // some code goes here\n \treturn m_f.getAbsoluteFile().hashCode();\n }",
"public int getId(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Affiche l'ensemble des publications visibles pour un utilisateur | public ArrayList<Publication> getPublicationsVisibles(Utilisateur utilisateur) throws RemoteException; | [
"public ArrayList<Publication> getPublications(Utilisateur utilisateur) throws RemoteException;",
"public List<Publication> userPublications() throws UnauthorizedAccessException;",
"public Collection findPublicPresentations(Agent viewer, String toolId, String showHidden);",
"private void getPublications() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
go to brushes page | @Test
public void testBrushes(){
MainPage page1 = new MainPage(getDriver());
page1.findBrushes();
//enter and check the price range
BrushesPage brushes = new BrushesPage(getDriver());
brushes.writeRange();
brushes.openAllBrushes();
brushes.checkRange();
... | [
"public void goToBitbacket() {\n driver().get(bitbucketUrl);\n waitLoginButton();\n }",
"public static void navigateb()\n\t{\n\t\tdriver.navigate().to(url2);\n\t\t//navigate back\n\t\tdriver.navigate().back();\n\t\t//print url of current page\n\t\tSystem.out.println(driver.getCurrentUrl());\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field stackFrame is set (has been assigned a value) and false otherwise | public boolean isSetStackFrame() {
return this.stackFrame != null;
} | [
"public boolean isSetFrame()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(FRAME$4) != null;\n }\n }",
"public boolean isSetFrame()\n {\n synchronized (monitor())\n {\n check_orphaned();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field presenteeId is set (has been assigned a value) and false otherwise | public boolean isSetPresenteeId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRESENTEEID_ISSET_ID);
} | [
"public boolean isSetEmpId() {\n return this.empId != null;\n }",
"public boolean isSetUserId() {\n return this.userId != null;\n }",
"public boolean isSetUserId() {\n return this.userId != null;\n }",
"public boolean isSetPartnerId() {\n return EncodingUtils.testBit(__isset_bitfield, __PAR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Requesting camera permission This uses single permission model from dexter Once the permission granted, opens the camera On permanent denial opens settings dialog | private void requestCameraPermission() {
Dexter.withActivity(this)
.withPermission(Manifest.permission.CAMERA)
.withListener(new PermissionListener() {
@Override
public void onPermissionGranted(PermissionGrantedResponse response) {
... | [
"private void requestCameraPermission() {\n Log.i(TAG, \"CAMERA permission has NOT been granted. Requesting permission.\");\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n PermissionUtils.PERMISSIONS_CAMERA[0])) {\n // Provide an additional rationale to the ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a builder for an immutable PlatformPortMapping object. | public static Builder newPlatformPortMapping() {
return new Builder();
} | [
"public PlatformPortMapping build() {\n try {\n assertNotInvalidated(getClass(),mapping);\n return mapping;\n } finally {\n this.mapping = null;\n }\n }",
"public interface PortForwardingBuilder extends Builder<PortForwardingBuil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns to number of free copies available for this resource. | public int freeCopiesNo() {
return freeCopies.size();
} | [
"public int getCopiesAvailable() {\n return this.numberOfCopies - this.copiesCheckedOut;\n }",
"public int getCopiesAvailable() {\n\t\treturn this.copiesAvailable;\n\t}",
"public final synchronized int getFreeCount()\n {\n return free.size();\n }",
"int getNumberOfAvailableCopies(int materialId... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifica se um pedido de Desenho Industrial foi extinto. | public boolean isPedidoDesenhoIndustrialExtinto(String despacho){
String despachosExtincao ="^(42|43|44|45)$";
Pattern pattern = Pattern.compile(despachosExtincao);
Matcher seTem = pattern.matcher(despacho);
boolean isNegado = seTem.matches();
if(isNegado){
return Boolean.TRUE... | [
"public boolean isIndustrial() {\n return getStructureType() == EquipmentType.T_STRUCTURE_INDUSTRIAL;\n }",
"public boolean isContreExemple();",
"boolean hasIdProcesso();",
"private boolean verificaStock(Articulo articulo, int cantidadEntrega) {\n\t\treturn (articulo.getStock() - cantidadEntrega) >=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "MntExe" element | public void unsetMntExe()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(MNTEXE$22, 0);
}
} | [
"public void unsetTotMntExe()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TOTMNTEXE$6, 0);\r\n }\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of the shadow property. | public void setShadow ( Boolean shadow ) {
getStateHelper().put(PropertyKeys.shadow, shadow);
handleAttribute("shadow", shadow);
} | [
"public final native void setShadow(Shadow shadow) /*-{\n\t\tthis.setShadow({\n color: shadow.@net.edzard.kinetic.Shadow::getColour()().@net.edzard.kinetic.Colour::toString()(),\n blur: shadow.@net.edzard.kinetic.Shadow::getBlur()(),\n offset: [shadow.@net.edzard.kinetic.Shadow::get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
transform the 10 vector by the matrixed formed by the 9 and 4 vectors as columns | public void transform_10_by_9_4() {
final double t = x_9 * x_10 + x_4 * y_10;
y_10 = y_9 * x_10 + y_4 * y_10;
x_10 = t;
} | [
"public void transform_9_by_10_4() {\n final double t = x_10 * x_9 + x_4 * y_9;\n y_9 = y_10 * x_9 + y_4 * y_9;\n x_9 = t;\n }",
"public void transform_9_by_4_10() {\n final double t = x_4 * x_9 + x_10 * y_9;\n y_9 = y_4 * x_9 + y_10 * y_9;\n x_9 = t;\n }",
"public void transform_4_by_10_9()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate a new UUID, and remove all the '' characters from the resulting string. | public static String newUUIDString() {
return UUIDGenerator.newTimeUUID().toString().replace( "-", "" );
} | [
"public String getUUIDNoHyphen() {\n return uuid.toString().replaceAll(\"-\", \"\");\n }",
"public String getUuidPlain() {\n return uuid.replace(\"-\", \"\");\n }",
"private static String cleanUuid(final String uuid) {\n return uuid.replace(UUID_PREFIX, REPLACEMENT).replace(SEPERA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a SimpleEntry for a given key and value. The entry will be marked as readonly. | public SimpleEntry(K oKey, V oValue)
{
super(oKey, oValue);
m_fReadOnly = true;
} | [
"protected Map.Entry<K, V> instantiateEntry(K key, V value)\n {\n return new SimpleEntry<K, V>(key, value);\n }",
"public static <K, V> SimpleEntry<K, V> makeEntry(Map<K, V> map, K key)\n {\n return new SimpleEntry<>(map, key, false);\n }",
"public SimpleEntry(Map<K, V>... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the setter for the specified element. | private Setter getSetter(String namespaceURI, String localName)
throws SAXException {
Setter setter = setterFinder.findElementSetter(namespaceURI, localName);
if (setter == null) {
// If the namespace is not specified then look for a setter in
// the default namespace... | [
"public Method getSetter(Method getter);",
"public JMethod getSetter();",
"public String getSetterMethod() {\r\n return setter;\r\n }",
"public String getSetter() {\n return \"set\" + getCapName();\n }",
"Method getSetMethod();",
"public static String getPropertyForSetter(String setterName) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new builder with the default graph configuration. | public Builder() {
this(Graphs.<N, E>createUndirected());
} | [
"public static NodeConfigBuilder builder() {\n\t\treturn new NodeConfigBuilder();\n\t}",
"public static CdpClientConfigurationBuilder defaultBuilder() {\n return new CdpClientConfigurationBuilder();\n }",
"public static Builder builder()\n {\n return new Builder();\n }",
"public Builder() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a structured text, containing an image or name (if no image is found) of the button (on the keyboard, mouse or joystick) with the given code. Example: name = keyImage 28 Example result: "Enter" | public native static GameText keyImage(float oper1); | [
"CharSequence iconCode();",
"public native static GameText actionKeysImages(Object oper1);",
"public char getButtonChar()\n\t{\n\t\tswitch (getImageButton().getTag().toString())\n\t\t{\n\t\t\tcase \"r\":\n\t\t\t\treturn 'r';\n\t\t\tcase \"b\":\n\t\t\t\treturn 'b';\n\t\t\tcase \"g\":\n\t\t\t\treturn 'g';\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the cardinality of the result of a bitwise AND of the values of the current bitmap with some other bitmap. Avoids needing to allocate an intermediate bitmap to hold the result of the OR. | public int andCardinality(final EWAHCompressedBitmap a) {
final BitCounter counter = new BitCounter();
and(a, counter);
return counter.getCount();
} | [
"public void testAnd_Cardinality() {\n\n int l = 64;\n while (true) {\n DenseBitVector a = new DenseBitVector(l);\n DenseBitVector b = new DenseBitVector(l);\n DenseBitVector result;\n\n result = a.and(b);\n assertTrue(result.isEmpty());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the 1st quartile of the data in this column | default double quartile1() {
return quartile1.summarize(this);
} | [
"public double getQuartile(int q) {\n double[] data = getDataAsArray();\n return Statistics.quartile(data, q);\n }",
"public java.lang.Float getPercentile() {\n return percentile;\n }",
"public java.lang.Float getPercentile() {\n return percentile;\n }",
"double getQuartiles(int i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
increases player speed if player speed is less than 10 | public void increaseSpeed() {
//we know element 0 is the player ship because on init()
if(store.elementAt(0) instanceof PlayerShip && ((PlayerShip)store.elementAt(0)).getSpeed() < 10 ) {
PlayerShip mObj = (PlayerShip)store.elementAt(0);
mObj.setSpeed(mObj.getSpeed()+1);
}else {
System.out.println("... | [
"public void increaseSpeed(){\n if (score > traffic.getSpeed()*tsMultiplier){\n traffic.increaseSpeed();\n tsMultiplier += 1.5;\n }\n\n if (score > player.getSpeed()*psMultiplier){\n player.increaseSpeed();\n psMultiplier += 2;\n }\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overriding toString to properly return the word when called | @NonNull
@Override
public String toString() {
return word;
} | [
"public String toString()\n\t{\n\t\treturn word;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn \"<word><english>\"+this.english+\"</english><chinese>\"+this.chinese+\"</chinese><recited>\"+this.recited+\"</recited><right>\"+this.right+\"</right><start>\"+this.start+\"</start></word>\";\n\t}",
"@Ov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .cfwf.client_conn.school.MySeatWorkAnswer my_answers = 3; | com.cfwf.cb.business_proto.ClientConnSchool.MySeatWorkAnswerOrBuilder getMyAnswersOrBuilder(
int index); | [
"com.cfwf.cb.business_proto.ClientConnSchool.MySeatWorkAnswer getMyAnswers(int index);",
"public com.cfwf.cb.business_proto.ClientConnSchool.MySeatWorkAnswerOrBuilder getMyAnswersOrBuilder(\n int index) {\n if (myAnswersBuilder_ == null) {\n return myAnswers_.get(index); } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a handle for the given generic type or null if not found. | protected IType getHandle(IGenericType genericType, ReferenceBinding binding) {
if (genericType == null)
return null;
if (genericType instanceof HierarchyType) {
IType handle = (IType) this.infoToHandle.get(genericType);
if (handle == null) {
handle = ... | [
"IType readTypeHandle(StateSnapConstantPool pool, DataInputStream in, boolean allowNull) throws IOException {\r\n\tint index = in.readInt();\r\n\tif (index == 0) {\r\n\t\tif (!allowNull)\r\n\t\t\tbadFormat();\r\n\t\treturn null;\r\n\t}\r\n\treturn pool.getType(index);\r\n}",
"public static Object getHandle(Object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests DatabasePaymentPersistencegetPayment(long) for failure. It tests the case that when paymentIdGenerator is null and expects IllegalStateException. | public void testGetPayment_NullPaymentIdGenerator() throws Exception {
try {
instance.getPayment(1);
fail("IllegalStateException expected.");
} catch (IllegalStateException e) {
//good
}
} | [
"public void testGetPayment_PaymentPersistenceException() throws Exception {\r\n configuration.setPropertyValue(\"connectionName\", \"invalid\");\r\n instance.configure(configuration);\r\n try {\r\n instance.getPayment(1);\r\n fail(\"PaymentPersistenceException expected.\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This sets the number of cards in the distance that will be shown "rezzing in". These alpha values will be faded in from the background to the foreground over 'n' cards. A floating point value is used to allow subtly changing the rezzing in position. | public void setRezInCardCount(float n) {
mController.setRezInCardCount(n);
} | [
"public void drawCards(Integer ammount) {\n\t\tfor(int i = 0 ; i < ammount ; i++) {\n\t\t\tCard card = deck.getCard();\n\t\t\tthis.placeCardInHand(card);\n\t\t}\n\t}",
"public void newNumericCards(String color){\n for (int i=0; i<10; i++){\n drawPile.add(new NumericCard(color,i));\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
submit data edit reqeust | public <DATA> void submitEditDataRequest (DATA dataToEditOrView , EditorState editorState ) {
submitEditDataRequest(dataToEditOrView, editorState , new DataEditRequestCallback<DATA>(){
@Override
public void onEditComplete(DATA afterEditedData) {
}
});
} | [
"private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Servicio que obtiene lista de veredas | @RequestMapping(value = "/obtenerVeredas", method = RequestMethod.GET)
public Iterable<Vereda> obtenerListaVeredas() {
return veredaRepository.findAll();
//return JsonManager.toJson(veredaRepository.findAll());
} | [
"HostedServiceListResponse list() throws IOException, ServiceException, ParserConfigurationException, SAXException, URISyntaxException;",
"public List<Vendedor> listarVendedor();",
"List<String> listarServicio();",
"public List getVigencias();",
"List<VMware> list();",
"public List<ListVenuesResult> listV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to reset player's moves to max uses | public void movesReset(){
gamePlayer.resetMoves();
} | [
"public static void resetNumMoves() {\n numMoves = 0;\n }",
"public void clearBestMoveMax() { bestMaxToken = null; plyCounterMax = 1; bestMoveMax = \"\"; }",
"private void resetMoves(){\n\t\tunusedMoves.addAll(moves);\n\t\tmoves.clear();\n\t}",
"public void resetMovementAttempts() {\r\n\t\tmovementA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Limpiar lista parametro. Fecha: 22/08/2013 | public void limpiarListaParametro() throws Exception; | [
"private ArrayList<Parametro> unificar_parametros_formales (){\r\n ArrayList<Parametro> parametros=new ArrayList();\r\n //Contiene los parametros que debemos unificar en un solo ArrayList.\r\n ArrayList<String> params;\r\n int n=this.lista_parametros.size();\r\n int m=0;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
saves the users gender to the SharedPreferences | static void saveUserGender(Context context, Gender gender) {
context.getSharedPreferences(FILE_NAME, 0)
.edit()
.putInt(USER_GENDER_KEY, gender.getId())
.apply();
} | [
"public String getUserGender(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_GENDER, null);\n }",
"public static void removeUserGender(Context context) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .remove(USER_GENDER_KEY)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Left click released on another delivery. | void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery); | [
"void leftClickPressedOnDelivery();",
"public void mouseReleased (MouseEvent e)\r\n {\r\n fire (MouseTriggerEvent.RELEASE);\r\n }",
"@Override\n public void mouseReleased(MouseEvent e)\n {\n mouseLeftClick = false;\n }",
"public void mouseReleased(MouseEvent e) {\n mDow... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Protected method that updates the internally cached Command. Will always be called when the page name, request context, or variable changes. | protected void updateCommand(String requestContext) {
if(requestContext == null) {
m_command = PageCommand.NONE;
} else {
CommandResolver resolver = m_engine.getCommandResolver();
m_command = resolver.findCommand(m_request, requestContext);
}
if(m_command instanceof PageCommand && m_page != null) {
... | [
"@Caching(cacheName=\"queryCache\", action=CacheAction.CLEAR)\n public <C> int updateWithCommand(C Command);",
"private void processCommand(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t\tString command = request.getParameter(\"command\");\t\n\t\tSystem.out.println(\"received cmd:\" + c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test all the functions in TokenizerAdapter assuming it uses the student list in memory | @Test
@DisplayName("Next token should return student's name")
void testStudentName(){
assertTrue(adapter.hasMoreToken(), "hasMoreTokens should be true");
assertEquals("Show Pratoomratana", adapter.nextToken(), "Stu1 failed");
assertEquals("John Jonny", adapter.nextToken(), "Stu2 failed")... | [
"public interface TokenizerListener {\n \n\t/**\n\t * Jika tokenizer berhasil, maka akan mengembalikan ArrayList \n\t * yang berisi Map<token, kata> dan Map<type, tipe_kata>\n\t * \n\t * array list digunakan untuk menjaga urutan kata, karena urutan \n\t * kata diperlukan untuk melakukan proses parsing\n\t * \n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Create a Volume, wait for provisioning completion then return the volumeId | protected Long createAndProvisionVolume(VolumeMetaOption metaOption, Long size, Long count, Long hostGroupId) throws Exception {
//protected Long createVolume (Long hostId, Long applicationId, Long hostGroupId) {
String func = "volumeProvisioning()...";
UserContext userContext = getUserContextGood(TestExecTy... | [
"protected static void deleteAndProvisionVolume(Long id) {\n //protected Long createVolume (Long hostId, Long applicationId, Long hostGroupId) {\n\t\tString func = \"volumeDeleteProvisioning()...\";\n\t\tUserContext userContext = getUserContextGood(TestExecType.PROVISION);\n \t\tLong volumeId = null;\n\t\tVolu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column product_seller_goods_gallery.image_name | public void setImageName(String imageName) {
this.imageName = imageName == null ? null : imageName.trim();
} | [
"public void setImageName(String imageName) {\n this.imageName = imageName;\n }",
"public void setImageName(String _imageName) {\r\n\t\tthis._imageName = _imageName;\r\n\t}",
"public MediaGalleryEditPage updateImageName(String newimagename)\r\n\t{\r\n\t\treadconfig();\r\n\t\tdriver.findElement(By.xpat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method triggered when a swipe from top to bottom of the screen is identified. | public abstract boolean onTopToBottomSwipe(); | [
"public abstract void onSwipeTop();",
"public abstract void onSwipeBottom();",
"@Override\r\n public void onSwipeTop() {\r\n //Do Nothing\r\n }",
"@Override\r\n public void onSwipeBottom() {\r\n //Do Nothing\r\n }",
"@Override\n public void onSwipeLeft()\n {\n onSwipeB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a Content Item of the specified content type. | public static PSItem createItem(ContentSOAPStub binding, String contentType)
throws Exception
{
CreateItemsRequest request = new CreateItemsRequest();
request.setContentType(contentType);
request.setCount(1);
PSItem[] items = binding.createItems(request);
return items[0];
} | [
"ItemType createItemType();",
"DocItemType createDocItemType();",
"public ItemInstance makeInstanceOf(QName itemTypeID) throws InvalidEntityException\n {\n Item itemTemplate = retrieveItem(itemTypeID);\n return ItemInstance.newItem(itemTemplate);\n }",
"private Item createNotExistingItem(ItemTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a subset of the given list of metrics in "defaults" and the corresponding value of each returned metric in the subset. Note if the custom set is empty, the full set of default machine metrics and values will be returned. (In particular, as in set theory, a set is a subset of itself.) | private MetricValues metricValues(Set<MachineMetric> customSet,
List<MachineMetric> defaults, List<Long> values) {
List<MachineMetric> actualMetrics = defaults;
List<Long> actualValues = values;
if (customSet.size() > 0) {
// custom set of machine metrics specified
... | [
"private Map<String, List<Object>> setDefaultDimensionsSubset(\n List<DimensionDescriptor> customDimensions, SimpleFeature feature) {\n Map<String, List<Object>> dimensionsSubset = new HashMap<String, List<Object>>();\n for (DimensionDescriptor dimensionDescriptor: customDimensions) {\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if key presents in trie, else false | static boolean search(String key) {
int lvl, idx;
int n = key.length();
TrieNode tn = root;
for (lvl = 0; lvl < n; lvl++) {
idx = key.charAt(lvl) - 'a';
if (tn.children[idx] == null) return false;
tn = tn.children[idx];
... | [
"boolean equalsTrie(T key);",
"public boolean contains(String key) {\n\n char[] characters = key.trim().toCharArray();\n\n TrieNode trieNode = root; // current trie node\n\n boolean contains = true;\n\n for (char ch : characters) {\n\n // get the character represent index fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "DYNAMIC_ABSOLUTE_INDEXED_SCOPE_ATTR" $ANTLR start "SCOPE_INDEX_EXPR" | public final void mSCOPE_INDEX_EXPR() throws RecognitionException {
try {
// org\\antlr\\grammar\\v3\\ActionTranslator.g:643:2: ( (~ ']' )+ )
// org\\antlr\\grammar\\v3\\ActionTranslator.g:643:4: (~ ']' )+
{
// org\\antlr\\grammar\\v3\\ActionTranslator.g:643:... | [
"public final void mDYNAMIC_ABSOLUTE_INDEXED_SCOPE_ATTR() throws RecognitionException {\r\n try {\r\n int _type = DYNAMIC_ABSOLUTE_INDEXED_SCOPE_ATTR;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n CommonToken x=null;\r\n CommonToken expr=null;\r\n Common... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ BuildLabel Param in: Label to build Sets size, alignment and border of the label given | private void buildLabel(Label label) {
label.setAlignment(Pos.CENTER);
label.setPrefSize(160, 40);
label.setBorder(
new Border(new BorderStroke(grey, grey, grey, grey, BorderStrokeStyle.SOLID, BorderStrokeStyle.SOLID,
BorderStrokeStyle.SOLID, BorderStrokeStyle.SOLID, null, new BorderWidths(1), null... | [
"JLabel addLabel(String text, int style, float size, Object constraints);",
"public BoardSizeButton(final String theLabel) {\r\n super();\r\n myLabel = theLabel;\r\n myButtonAreaSize = new Dimension(ORIG_SIZE.width * M + AREA_PADDING,\r\n ORIG_SIZE.heig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string call_to_action_link = 13; | java.lang.String getCallToActionLink(); | [
"public String recommendationsLink_action()\n { \n return \"case1\";\n }",
"public void _linkAction(Action action1);",
"public String getAction(int actionNum) {\n // replace with your own code\n return \"\";\n }",
"ActionCall getActionCall();",
"String getOnclick();",
"String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Loop__Group__3__Impl" $ANTLR start "rule__FLOAT__Group__0" InternalMLRegression.g:2271:1: rule__FLOAT__Group__0 : rule__FLOAT__Group__0__Impl rule__FLOAT__Group__1 ; | public final void rule__FLOAT__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMLRegression.g:2275:1: ( rule__FLOAT__Group__0__Impl rule__FLOAT__Group__1 )
// InternalMLRegression.g:2276:2: rule__FLOAT__Group__0__Impl rule__... | [
"public final void rule__FLOAT__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:2329:1: ( rule__FLOAT__Group_1__0__Impl rule__FLOAT__Group_1__1 )\n // InternalMLRegression.g:2330:2: rule__FLOAT__G... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes the parts of the query and extracts the parts bounded by the indices Returns the string joined by a " " | private String extractString ( String [] queryParts, int start, int end ) {
StringBuilder stringBuilder = new StringBuilder();
String space = "";
for ( int i = start; i <= end && i < queryParts.length; i++ ) {
stringBuilder.append(space);
stringBuilder.append(queryParts[i... | [
"String indexFormat();",
"public String getQueryAtIndex(int ndx, String delim) {\n\n StringBuffer query = new StringBuffer(512);\n Style comment = getStyle(\"Green\");\n boolean onlyOne = true;\n\n try {\n char[] text = this.getText(0, getLength()).trim().toCharArray();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'var202' field. | public com.dj.model.avro.LargeObjectAvro.Builder clearVar202() {
var202 = null;
fieldSetFlags()[203] = false;
return this;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar232() {\n var232 = null;\n fieldSetFlags()[233] = false;\n return this;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder clearVar113() {\n var113 = null;\n fieldSetFlags()[114] = false;\n return this;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleXSwitchExpression" $ANTLR start "entryRuleXCasePart" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2701:1: entryRuleXCasePart : ruleXCasePart EOF ; | public final void entryRuleXCasePart() throws RecognitionException {
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2702:1: ( ruleXCasePart EOF )
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui... | [
"public final void entryRuleXCasePart() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1272:1: ( ruleXCasePart EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets tests end point url. | public static String getTestsURL() {
return baseURL + login_required_string + "/rest/domains/" + domain + "/projects/" + project + "/tests";
} | [
"public String testUrl() {\n return get(TESTURL, \"\");\n }",
"private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}",
"java.lang.String getEndpointUrl();",
"public static String getTestInstanceURL() {\n\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find an Agreement that may exists | public FindAgreementCall findAgreementByPk(String sourceSystemAgreementId, Market marketId) throws BillingServiceException {
String dataAreaId = converter.convert(marketId);
FindAgreementCall findAgreementCall = webServiceCallFactory.createCall(FindAgreementCall.class);
// Execute request... | [
"LegalAgreement getLegalAgreement();",
"Collection<Agreement> findByCustomerId(Long customerId);",
"public Agreement getAgreement() {\n\t\treturn this.agreement;\n\t}",
"public T caseAgreement(Agreement object) {\n\t\treturn null;\n\t}",
"public Agreement<P> getCurrentAgreement()\n\t{\n\t\tif (this.robots.s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'avgSpeed' field has been set | public boolean hasAvgSpeed() {
return fieldSetFlags()[6];
} | [
"public void setAvgSpeed(float avgSpeed) {\n this.avgSpeed = avgSpeed;\n }",
"public boolean isSetSpeed() {\n return this.speed != null;\n }",
"public void checkSpeed ()\n throws OneWireIOException, OneWireException\n {\n synchronized (this)\n {\n\n // only check the speed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate that a date used is on or after the valuation date. | default public void validateDate(LocalDate date) {
ArgChecker.isFalse(date.isBefore(getValuationDate()), "date should be on or after valuation date");
} | [
"public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }",
"public boolean validateDate() {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |