__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/37461946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveJobs( List<BlastJobEntity> jobs ) throws BlastJdbcException {
if ( jobs == null ) {
throw new NullPointerException( "Jobs-list must not be null!" );
}
if ( jobs.size() == 0 ) {
throw new IllegalArgumentException( "Jobs list must not be empty!" );
}
for ( BlastJobEntity job : jobs ) {
saveJob( job );
}
}
COM: <s> saves the list of job entities to the db </s>
|
funcom_train/20775072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setPathLength(int pathLength) {
if (pathLength < 2) {
pathLength = 2;
}
int old = this.pathLength;
this.pathLength = pathLength;
putInt("pathLength", pathLength);
getSupport().firePropertyChange("pathLength", old, pathLength);
if (velocityPoints > pathLength) {
setVelocityPoints(pathLength);
}
}
COM: <s> sets the maximum number of path points recorded for each cluster </s>
|
funcom_train/26462331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getViewportSize() {
int vpW, vpH;
Dimension size = getSize();
vpW = size.width;
vpH = size.height;
if (showingYScroll)
vpW -= yScroller.getSize().width;
if (showingXScroll)
vpH -= xScroller.getSize().height;
return new Dimension(vpW, vpH);
}
COM: <s> return the dimensions of the viewport </s>
|
funcom_train/3276111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Role readRole(String loginUser, int role) throws DataAccessException {
Role r;
Log.write("Enter", Log.INFO, "readRole", KasaiFacade.class);
r = readRole(role);
Log.write("Exit", Log.INFO, "readRole", KasaiFacade.class);
return r;
}
COM: <s> read a role </s>
|
funcom_train/49044848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefaultCapabilityPropertiesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_JasimModel_defaultCapabilityProperties_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_JasimModel_defaultCapabilityProperties_feature", "_UI_JasimModel_type"),
ModelPackage.Literals.JASIM_MODEL__DEFAULT_CAPABILITY_PROPERTIES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the default capability properties feature </s>
|
funcom_train/41825375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWarningsThreasholdLimit(String warningsThreasholdLimit) {
Element publisher = getChild(root,"publishers");
Element warings = getChild(publisher,"hudson.plugins.warnings.WarningsPublisher");
getChild(warings,"thresholdLimit").setText(warningsThreasholdLimit);
}
COM: <s> sets the warnings threashold limit </s>
|
funcom_train/46324186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteNugget(long offset) {
boolean found = false;
for (int i = 0; i < this.slots.size(); i = i + 1) {
if (this.slots.get(i).getOffSet() == offset) {
this.slots.get(i).setFree(true);
found = true;
}
}
return found;
}
COM: <s> removes a nugget from the file system </s>
|
funcom_train/22131580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(char[] data, int start, int end) {
int i;
for (i = start; i < end; i++) {
if (data[i] == '\n') {
col = 1;
line++;
} else {
col++;
}
}
ofs += (end - start);
}
COM: <s> the indicated range has been passed by the scanner </s>
|
funcom_train/2807765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canGenerateProblem(int depth) {
String s = p.randomInput(depth, separator());
logTestString(s);
Assembly a = assembly(s);
a.setTarget(freshTarget());
List in = new ArrayList();
in.add(a);
List out = completeMatches(p.match(in));
if (out.size() != 1) {
logProblemFound(s, out.size());
return true;
}
return false;
}
COM: <s> generate a random language element and return true if </s>
|
funcom_train/24262192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddUserE1() {
try {
User user1 = (User) sallyMcLaren.clone();
curationService.addUser(admin, user1);
User user2 = (User) sallyMcLaren.clone();
curationService.addUser(admin, user2);
fail();
}
catch(MacawException exception) {
int totalNumberOfErrors
= exception.getNumberOfErrors();
assertEquals(1, totalNumberOfErrors);
int numberOfErrors
= exception.getNumberOfErrors(MacawErrorType.DUPLICATE_USER);
assertEquals(1, numberOfErrors);
}
}
COM: <s> error the addition of two users who have the same user id </s>
|
funcom_train/42667351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonOpen() {
if (jButtonOpen == null) {
jButtonOpen = new JButton();
jButtonOpen.setName("jButtonOpen");
jButtonOpen.setToolTipText("Open a graphics file");
jButtonOpen.setRolloverEnabled(false);
jButtonOpen.setText("Open");
jButtonOpen.setAction(new Actioneer(this, jButtonOpen));
}
return jButtonOpen;
}
COM: <s> this method initializes j button open </s>
|
funcom_train/22307847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isColumnExpandable( final int index ) {
final HeaderPermanentInfo info
= getPermanentInfo( columnHeaderPermanentInfos_, index, false );
final boolean isExpandable;
if( info == null ) {
isExpandable = false;
}
else {
isExpandable = info.isExpandable();
}
return isExpandable;
}
COM: <s> return true if this column can be expanded beyond its preferred size </s>
|
funcom_train/47140803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IOReturn doIO (DisplayManager theDisplayManager) {
FormSheet fs = createFormSheet(theDisplayManager);
fs.addItem (new StockEditDescriptor(cItems, stSource, stDest));
theDisplayManager.fillFormSheet(fs);
return new StockEditReturn((Stock) fs.getItem (0).getData());
}
COM: <s> perform the io request </s>
|
funcom_train/10671070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testEquals() {
try {
int i = findProperty("prop1");
if (!propertyDescriptors[i].equals(propertyDescriptors[i])) {
throw new Exception("PropertyDescriptor.equals");
}
return passed();
} catch (Exception e) {
e.printStackTrace();
return failed(e.getMessage());
}
}
COM: <s> verify that property descriptor </s>
|
funcom_train/50012024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setJMenuBar(getFrameMenuBar());
this.setContentPane(getMainContentPane());
this.setTitle("Statistics");
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent _e) {
try {
DatabaseManager.close();
} catch (IOException e) {
throw wrapUnchecked("Failed to close database", e);
}
dispose();
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/1440689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddConnection() throws Exception {
System.out.println("addConnection");
ConnectionData data = new ConnectionData();
Server server = new Server();
ServerDataContainer container = new ServerDataContainerImpl();
ServerDataListenerImpl instance = new ServerDataListenerImpl(server);
instance.setServerDataContainer(container);
instance.addConnection(data);
assertTrue(container.getConnectionDataList().contains(data));
}
COM: <s> test of add connection method of class server data listener impl </s>
|
funcom_train/28758930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLeftbackground(String newVal) {
if ((newVal != null && this.leftbackground != null && (newVal.compareTo(this.leftbackground) == 0)) ||
(newVal == null && this.leftbackground == null && leftbackground_is_initialized)) {
return;
}
this.leftbackground = newVal;
leftbackground_is_modified = true;
leftbackground_is_initialized = true;
}
COM: <s> setter method for leftbackground </s>
|
funcom_train/32611205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMousePickRotationAnimation(BranchGroup objectRoot, TransformGroup rootTransformGroup, Canvas3D canvas) {
/*
* Initalise the capabilities on the rootTransformGroup
*/
rootTransformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
rootTransformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
rootTransformGroup.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
/*
* Initalise the behaviour.
*/
ChivePickRotationAnimationBehavior pickRotate = new ChivePickRotationAnimationBehavior(objectRoot, canvas, VisualisationEnvironment.getVisualisationEnvironmentBounds());
/*
* Add the behaviour to the root BranchGroup
*/
objectRoot.addChild(pickRotate);
}
COM: <s> adds a new mouse pick rotation animation to the scene graph </s>
|
funcom_train/37556093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MenuItem getDefaultItem () {
checkWidget ();
if (OS.IsWinCE) return null;
int id = OS.GetMenuDefaultItem (handle, OS.MF_BYCOMMAND, OS.GMDI_USEDISABLED);
if (id == -1) return null;
MENUITEMINFO info = new MENUITEMINFO ();
info.cbSize = MENUITEMINFO.sizeof;
info.fMask = OS.MIIM_ID;
if (OS.GetMenuItemInfo (handle, id, false, info)) {
return parent.findMenuItem (info.wID);
}
return null;
}
COM: <s> returns the default menu item or null if none has </s>
|
funcom_train/34311263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLocation(final String l, final boolean readInfo) {
if (isRead) {
return;
}
//如果是文件,则当场读出来
if (isFile) {
es.execute(new Runnable() {
public void run() {
setLocation0(l, readInfo);
}
});
} else {//如果不是文件,则起个线程异步读出来
new Thread() {
public void run() {
setLocation0(l, readInfo);
}
}.start();
}
}
COM: <s> reads or not file comments tags </s>
|
funcom_train/7280568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildConnections() throws Exception {
LEAF_1 = countingConnectionFactory.createConnection("localhost", PORT);
LEAF_2 = countingConnectionFactory.createConnection("localhost", PORT);
LEAF_3 = countingConnectionFactory.createConnection("localhost", PORT);
UP1 = countingConnectionFactory.createConnection("localhost", PORT);
UP2 = countingConnectionFactory.createConnection("localhost", PORT);
UP3 = countingConnectionFactory.createConnection("localhost", PORT);
UDP_ACCESS = new DatagramSocket();
}
COM: <s> builds the connections between the entities in the test </s>
|
funcom_train/15917041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAtom(XTerm term) throws XFailure {
if (!consistent) return;
valid = false;
if (roots == null) roots = CollectionFactory.<XNativeTerm,XPromise> newHashMap();
XNativeTerm t = (XNativeTerm) term;
XPromise p = t.nfp(this);
if (p != null) return; // nothing to do
p = intern(t);
}
COM: <s> add an atomic formula to the constraint </s>
|
funcom_train/18337041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVariable(String name) {
if (variables.containsKey(name)) {
Object variable = variables.get(name);
if (variable instanceof String) {
return (String) variable;
} else if (variable instanceof String[]) {
return ((String[]) variable)[0];
}
}
return null;
}
COM: <s> returns one variable value </s>
|
funcom_train/25687130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopIt() {
if (bkThreadStarted) {
if (jobMonitoring) {
logger.info("Sending last job monitoring packet...");
/**
* send a datagram with job monitoring information which covers the last time interval
*/
bkThread.sendJobInfo();
}
}
dgramSocket.close();
if (bkThread != null)
bkThread.monitor.stopIt();
setBackgroundThread(false);
}
COM: <s> must be called when the ap mon object is no longer in use </s>
|
funcom_train/7540977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handlePropertyChangeEvent(PropertyChangeEvent event) {
Assert.isTrue(isNewSetup());
if (fCodeScanner.affectsBehavior(event))
fCodeScanner.adaptToPreferenceChange(event);
if (fStringScanner.affectsBehavior(event))
fStringScanner.adaptToPreferenceChange(event);
if (fSingleQuoteStringScanner.affectsBehavior(event))
fSingleQuoteStringScanner.adaptToPreferenceChange(event);
if (fDocScanner.affectsBehavior(event))
fDocScanner.adaptToPreferenceChange(event);
if (fCommentScanner.affectsBehavior(event))
fCommentScanner.adaptToPreferenceChange(event);
}
COM: <s> adapts the behavior of the contained components to the change encoded in </s>
|
funcom_train/24928035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double discountFactor(final double rate) {
double df = 0;
for(int i=0; i<2*yearsToMaturity; i++) {
df += (couponRate/2) / Math.pow(1 + rate/2, i);
}
df += (1+couponRate/2) / Math.pow(1, + rate/2, 2*yearsToMaturity);
return df;
}
COM: <s> calculate discount factor usually for futures </s>
|
funcom_train/9663335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepare(Widget widget) {
FlexTable grid = getGrid();
int row = getRow();
int column = getColumn();
if (getWidget() != null)
remove(getWidget());
add(widget);
Widget current = null;
if (row < grid.getRowCount() && column < grid.getCellCount(row))
current = grid.getWidget(row, column);
if (current != this)
grid.setWidget(row, column, this);
}
COM: <s> this method prepares a cell before displaying it </s>
|
funcom_train/49997164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Day getDay(String yearString, String monthString, String dayString) {
int year = Integer.parseInt(yearString);
int month = Integer.parseInt(monthString);
int day = Integer.parseInt(dayString);
return Day.getInstance(year, month, day);
}
COM: <s> get day object from year month and day strings </s>
|
funcom_train/7624852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeSyncDataBytes(SQLiteDatabase db, String account, byte[] data) {
ContentValues values = new ContentValues();
values.put("data", data);
db.update(SYNC_STATE_TABLE, values, ACCOUNT_WHERE, new String[]{account});
}
COM: <s> sets the sync data bytes for the given account </s>
|
funcom_train/17827559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String sql) {
BufferedReader reader = new BufferedReader(
new StringReader(sql));
try {
String line = reader.readLine();
while (line != null) {
++lineCount;
buffer.append(line);
buffer.append(LINE_SEP);
line = reader.readLine();
}
}
catch (IOException e) {
/* CAN'T HAPPEN */
}
}
COM: <s> adds sql to the current buffer that may or may not contain </s>
|
funcom_train/44852605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGroupAdmin(Long inMemberID, Long inGroupID) throws BOMChangeValueException {
try {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(GroupAdminHome.KEY_MEMBER_ID, inMemberID);
lKey.setValue(GroupAdminHome.KEY_GROUP_ID, inGroupID);
findByKey(lKey);
return true;
}
catch (BOMNotFoundException exc) {
return false;
}
catch (VException exc) {
throw new BOMChangeValueException(exc.getMessage());
}
}
COM: <s> tests whether the specified member is admin of the specified group </s>
|
funcom_train/4877734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAllSquareToDefault() {
for (int i = 0; i < getLines(); i++) {
for (int j = 0; j < getColumns(); j++) {
setSquare(new EmptySquare(), new Coordinates(i, j));
}
}
}
COM: <s> this method fills the whole square matrix to empty squares </s>
|
funcom_train/24941132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Value createForwardPushedValue() {
int maxSize = 0;
boolean isSigned = true;
for (Port goPort : getGoPorts()) {
Port dataPort = getDataPort(goPort);
maxSize = Math.max(maxSize, dataPort.getValue().getSize());
isSigned = isSigned && dataPort.getValue().isSigned();
}
return new Value(maxSize, isSigned);
}
COM: <s> creates a new value to be pushed forward during partial const </s>
|
funcom_train/44282724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestPatchDump(int bankNum, int patchNum) {
patchSize = patchSize - BANK_NAME_SIZE;
for (int i = 0; i < RolandVG88SingleDriver.NUM_PATCH; i++) {
singleDriver.requestPatchDump(0, i);
try {
Thread.sleep(600); // wait .
} catch (Exception e) {
ErrorMsg.reportStatus(e);
}
}
patchSize = patchSize + BANK_NAME_SIZE;
}
COM: <s> request all user patchs </s>
|
funcom_train/3411331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(Graphics g) {
if (isShowing()) {
Thread t = Thread.currentThread();
try {
synchronized (this) {
if (printingThreads == null) {
printingThreads = new HashSet();
}
printingThreads.add(t);
printing = true;
}
super.print(g); // By default, Component.print() calls paint()
} finally {
synchronized (this) {
printingThreads.remove(t);
printing = !printingThreads.isEmpty();
}
}
GraphicsCallback.PrintCallback.getInstance().
runComponents(component, g, GraphicsCallback.LIGHTWEIGHTS);
}
}
COM: <s> prints the container </s>
|
funcom_train/50137173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeVector(ObjectOutputStream out, Vector vect) throws IOException {
if (vect != null)
for (int i=0; i < vect.size(); ++i) {
Object obj = vect.elementAt(i);
if (!(obj instanceof NotSerialize) || !(monitor.isExporting()))
out.writeObject(obj);
}
out.writeObject(null);
}
COM: <s> this method is useful to serialize only the vectors </s>
|
funcom_train/38475453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getLanguage(Locale locale){
int language = 0;
try{
language = CultureInfo.GetCultureInfo(locale.toString().replace("_", "-")).get_LCID();
}catch(Throwable th){
try{
language = CultureInfo.GetCultureInfo(locale.getLanguage()).get_LCID();
}catch(Throwable th2){}
}
return language;
}
COM: <s> convert the java locale to a language id </s>
|
funcom_train/7924306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSpanNearScorerSkipTo1() throws Exception {
SpanNearQuery q = makeQuery();
Weight w = q.createWeight(searcher);
Scorer s = w.scorer(searcher.getIndexReader());
assertEquals(true, s.skipTo(1));
assertEquals(1, s.doc());
}
COM: <s> not a direct test of near spans but a demonstration of how when </s>
|
funcom_train/23365320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveIndexes() throws SQLException {
String[] titleArr = this.title == null ? null : getIndexArray(this.title);
String[] summaryArr = this.summary == null ? null : getIndexArray(
this.summary);
String[] bodyArr = getIndexArray(this.body);
saveToDb(titleArr, bodyArr, summaryArr);
}
COM: <s> saves indexes to database by transforming the </s>
|
funcom_train/14274422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel constructConfigPanel() {
JPanel ret=new JPanel();
checkbox=new JCheckBox(getConduitResourceBundle().getString("deleter.onoff.text"));
checkbox.setSelected(false);
checkbox.addItemListener(this);
ret.setLayout(new BorderLayout());
ret.add(checkbox, BorderLayout.CENTER);
return ret;
} // end-method
COM: <s> constructs the configuration panel for this j conduit </s>
|
funcom_train/18958236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChildListThatEndsWithAttributeListClosingParenthese() {
b.append("a{b)\n");
try {
parse(b);
fail();
} catch (NgreaseException e) {
// expected
}
events.add("symbol:a");
events.add("{");
events.add("symbol:b");
events.add(";");
events.add("error:Expected '}'");
assertEvents();
}
/**
* Regression test: this used to loop forever
*/
public void testAttributeListThatEndsWithChildListClosingParenthese() {
b.append("a(b}\n");
try {
parse(b);
fail();
} catch (NgreaseException e) {
// expected
}
events.add("symbol:a");
events.add("(");
events.add("symbol:b");
events.add(";");
events.add("error:Expected ')'");
assertEvents();
}
COM: <s> regression test this used to loop forever </s>
|
funcom_train/34586989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initExt(String id)
{
props = new HashMap();
buttons = new ArrayList();
// configure some defaults and the required renderTo component
setProperty("frame", true);
setProperty("bodyStyle", "padding:5px 5px 0");
setProperty("renderTo", id);
}
COM: <s> initialize the component </s>
|
funcom_train/10913000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getOffset() {
int offset = 0;
if (parentAlignmentContext != null) {
offset = parentAlignmentContext.getTotalTopOffset() - getTotalTopOffset();
} else {
offset = getAltitude() - scaledBaselineTable.getBaseline(EN_TEXT_BEFORE_EDGE);
}
return offset;
}
COM: <s> returns the offset from the before edge of the parent to </s>
|
funcom_train/13561622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double interpolate(double x, double y){
switch(this.interpolationMethod){
case 0: return this.biLinearInterpolator.biLinearInterpolation(x, y);
case 1: return this.biCubicInterpolator.biCubicInterpolation(x, y);
case 2: return this.inverseDistanceWeighting.inverseDistanceWeighting(x, y, this.exp);
}
return Double.NaN;
}
COM: <s> interpolates the value at the given coordinate x y </s>
|
funcom_train/28104673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String retrieveProperty(String property) throws RemoteException {
// System.out.println("retrieveProperty in ConfiguratorProvider called");
if(property==null) {
return null;
}
Object prop;
if(property.startsWith(HarnessServiceProperties.INSTANCE_PREFIX)) {
prop= base.getInstanceProperty(property.substring(
HarnessServiceProperties.INSTANCE_PREFIX.length()));
} else {
prop= base.getProperty(property);
}
if(prop!=null) {
return prop.toString();
} else {
return null;
}
}
COM: <s> retrieve property behave analogously to configure property </s>
|
funcom_train/9495464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMean(double p) {
if (p <= 0) {
throw MathRuntimeException.createIllegalArgumentException(
"the Poisson mean must be positive ({0})",
p);
}
this.mean = p;
normal.setMean(p);
normal.setStandardDeviation(Math.sqrt(p));
}
COM: <s> set the poisson mean for the distribution </s>
|
funcom_train/20541447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected static final Property INVALID_PROPERTY = new Property() {
public Member getMember () { return null; }
public Class<?> getType () { return null; }
public Type getGenericType () { return null; }
public Object get (Object object) { return null; }
public void set (Object object, Object value) { }
};
COM: <s> indicates that a property field is invalid and should be re created </s>
|
funcom_train/32878064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSigned(String transID) {
boolean signed = false;
if (helperMap.containsKey(transID)) {
PDFSVSHelper helper = (PDFSVSHelper) helperMap.get(transID);
PdfReader reader = helper.getPdfReader();
if (reader != null) {
if (iTextUtils.getSignatureFields(reader.getAcroFields(), true, true).size() > 0) {
signed = true;
}
}
}
return signed;
}
COM: <s> returns whether the current pdf has been signed or not </s>
|
funcom_train/1111219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createBufferedImage(int width, int height) {
GraphicsConfiguration graphicsConfig = getGraphicsConfiguration();
if (graphicsConfig != null) {
try {
offscreen = graphicsConfig.createCompatibleImage(width,
height, Transparency.OPAQUE);
} catch (OutOfMemoryError e) {
offscreen = null;
offgraphics = null;
}
} else {
try {
offscreen = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
} catch (OutOfMemoryError e) {
offscreen = null;
offgraphics = null;
}
}
}
COM: <s> utility method to create a standard buffered image </s>
|
funcom_train/15491728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendLine(String data) {
if (vData==null)
setColumnHeadings("");
char[] chars = data.toCharArray();
vData.addElement(chars);
iRowCount++;
if (isShowing()) {
if (iColCount==1 && tc.fMetrics!=null) {
iColWidth[0] = Math.max(iColWidth[0], tc.fMetrics.charsWidth(chars,0,chars.length));
adjustHScroll();
}
updateDisplay();
}
}
COM: <s> adds a single line to the end of this text panel </s>
|
funcom_train/30075671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Manufacturer manufacturer = (Manufacturer) command;
// delegate the insert to the Business layer
getGpir().storeManufacturer(manufacturer);
return new ModelAndView(getSuccessView(), "manufacturerId", Integer.toString(manufacturer.getId()));
}
COM: <s> method inserts a new code manufacturer code </s>
|
funcom_train/10519223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLastBuild(String lastbuild) throws BuildException {
try {
Date lastBuildTime = DATE_FORMAT.parse(lastbuild);
this.lastBuild = new OLEDate(lastBuildTime);
} catch (ParseException e) {
throw new BuildException("Unable to parse the date '"
+ lastbuild + "'", e);
}
}
COM: <s> the timestamp of the build that will be stored with the label required </s>
|
funcom_train/15605440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteTierOrder(String orderName) {
//Put this guy in the deleted collection.
InfoObject tmpObject = (InfoObject)tierOrderCollection.get(orderName);
if (tmpObject == null) return;
deletedInfos.put(tmpObject.getKeyName(), tmpObject);
tierOrderCollection.remove(orderName);
}
COM: <s> removes the tier order object from the working collection commits and </s>
|
funcom_train/2301938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setID(int id) {
if (("q" + this.id).equals(name)) name = null;
this.id = id;
getAutomaton().distributeStateEvent
(new AutomataStateEvent(getAutomaton(), this, false, false, true));
}
COM: <s> sets the id for this state </s>
|
funcom_train/21059351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showFindDialog() {
if (searchReplaceDialog == null) {
searchReplaceDialog = new SearchReplaceDialog(this);
}
String findText = this.getSelectedText();
if ((findText != null) && (findText.length() > 0)) {
searchReplaceDialog.setFindText(findText);
}
searchReplaceDialog.show();
}
COM: <s> shows the find replace dialog </s>
|
funcom_train/28957567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws ValidateException {
Reader reader = null;
try {
reader = openTemplateInputStream();
} catch (Exception ex) {
throw new ValidateException("Could not load template " + getTemplate(),
ex);
} finally {
try {
if (reader != null) {
reader.close();
}
// CSOFF: EmptyBlockCheck
} catch (IOException e) {
// CSON: EmptyBlockCheck ignore
}
}
}
COM: <s> validates semantical correctness of the mapping </s>
|
funcom_train/44011701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCustomerID() {
System.out.println("setCustomerID");
String customerID = "";
TransactionBO instance = new TransactionBO();
instance.setCustomerID(customerID);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set customer id method of class edu </s>
|
funcom_train/5872950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlotData(PlotData pd) {
if (_rmDataList == null)
_rmDataList = new LinkedList();
_rmDataList.add(pd);
if (getAttribute(ATTR_ON_REMOVE_DATA_RESPONSE) == null) {
setAttribute(ATTR_ON_REMOVE_DATA_RESPONSE, Boolean.TRUE);
Events.postEvent(-20000, "onRemoveDataResponse", this, null);
}
}
COM: <s> remove a plot data from the plotinfo </s>
|
funcom_train/1941976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttributeValue(Attribute attribute, String value) throws IllegalArgumentException {
if (!this.attributes.containsKey(attribute.getName())) throw new IllegalArgumentException("No such attribute " + attribute.getName());
this.attributes.put(attribute.getName(), value);
}
COM: <s> sets the attribute value of the code attribute code </s>
|
funcom_train/17848930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removePersona(PersonaInfo info) {
if(info != null && !info.isSelectedPersona() && !info.getId().equals(PersonaInfo.DEFAULT_ID) && !info.getId().equals(PersonaInfo.RANDOM_ID)) {
return mPersonaMap.remove(info.getId()) != null;
}
return false;
}
COM: <s> removes the given persona form the list </s>
|
funcom_train/33606733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals() {
System.out.println("equals");
Coordinate c2 = null;
R2 instance = new R2();
boolean expResult = false;
boolean result = instance.equals(c2);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of equals method of class r2 </s>
|
funcom_train/4124388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNationType(NationType nationType) {
// Make the change:
freeColClient.getMyPlayer().setNationType(nationType);
// Inform the server:
Element nationTypeElement = Message.createNewRootElement("setNationType");
nationTypeElement.setAttribute("value", nationType.getId());
freeColClient.getClient().sendAndWait(nationTypeElement);
}
COM: <s> sets this clients players nation type </s>
|
funcom_train/33496415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createThreads(int numberOfThreads) {
int ncreated = 0;
for (int i = 0; i < numberOfThreads; ++i) {
synchronized(poolLock_) {
if (poolSize_ < getMaximumPoolSize()) {
++poolSize_;
++ncreated;
Worker worker = new Worker(null);
Thread thread = getThreadFactory().newThread(worker);
threads_.put(worker, thread);
thread.start();
}
else
break;
}
}
return ncreated;
}
COM: <s> create and start up to number of threads threads in the pool </s>
|
funcom_train/16380295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextFieldWidthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TextualAnswerType_textFieldWidth_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TextualAnswerType_textFieldWidth_feature", "_UI_TextualAnswerType_type"),
CTEPackage.Literals.TEXTUAL_ANSWER_TYPE__TEXT_FIELD_WIDTH,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the text field width feature </s>
|
funcom_train/42709831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSpread() {
double spread = 0;
for (int i = 0; i < stats.size(); i++) {
double s = stats.get(i).spread(goals.get(i));
spread += s*s * goalWeights.get(i);
}
return spread;
}
COM: <s> full difference compute delta squared difference between stats and goals going </s>
|
funcom_train/4378231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownRadio() {
if (!radioPlayer.isPlaying()) {
return;
}
if (radioPlayer != null) {
try {
radioPlayer.shutdown();
} catch (Throwable e) {
e.printStackTrace();
RSFMUtils.debug("Exception when trying to shutdown radio: "+e.getMessage(), this);
}
} else {
throw new IllegalStateException("Attempt to turn off radio where radio is null");
}
}
COM: <s> attempts to shut down radio through radioplayer </s>
|
funcom_train/5346005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startWorker(final RemoteFileDesc rfd) {
DownloadWorker worker = new DownloadWorker(this,rfd,commonOutFile,stealLock);
Thread connectCreator = new ManagedThread(worker);
connectCreator.setName("DownloadWorker");
synchronized(this) {
_workers.add(worker);
currentRFDs.add(rfd);
}
connectCreator.start();
}
COM: <s> starts a new worker thread for the given rfd </s>
|
funcom_train/1152357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsBox(float hx, float hy, Vec2 center, float angle) {
setAsBox(hx, hy);
XForm xf = new XForm();
xf.position.set(center);
xf.R.set(angle);
for (int i = 0; i < vertices.size(); ++i) {
vertices.get(i).set(XForm.mul(xf, vertices.get(i)));
}
}
COM: <s> build vertices to represent an oriented box </s>
|
funcom_train/2289276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkLoginAllowed() throws CmsAuthentificationException {
if ((m_loginMessage != null) && (m_loginMessage.isLoginCurrentlyForbidden())) {
// login message has been set and is active
throw new CmsAuthentificationException(Messages.get().container(
Messages.ERR_LOGIN_FAILED_WITH_MESSAGE_1,
m_loginMessage.getMessage()));
}
}
COM: <s> checks if a login is currently allowed </s>
|
funcom_train/5231146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCmdDesc(String cmdDesc) {
if (cmdDesc == null || cmdDesc.length() <= 0) {
throw new IllegalArgumentException(Strings.get(
"BasicCmdLineHandler.cmdDescTooShort",
new Object[] { cmdDesc }));
}
this.cmdDesc = cmdDesc;
}
COM: <s> sets a description of the commands purpose </s>
|
funcom_train/3000216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNumber() {
switch (m_type) {
case java.sql.Types.INTEGER :
case java.sql.Types.DECIMAL :
case java.sql.Types.NUMERIC :
case java.sql.Types.SMALLINT :
case java.sql.Types.FLOAT :
case java.sql.Types.DOUBLE :
case java.sql.Types.TINYINT :
return true;
default:
return false;
}
}
COM: <s> returns true if this datatype is a number </s>
|
funcom_train/2921143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL toURL(File path) {
try {
return new URL(path.toURI().toString());
} catch (Exception e) {
getLog().error("Could not resolve \"" + path.getPath() + "\".", e);
}
return null;
}
COM: <s> converts the given path to an url </s>
|
funcom_train/3117817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deviceTypeLayerChanged() {
super.deviceTypeLayerChanged();
for (Iterator i = getContents().getChildrenIterator(); i.hasNext(); ) {
final PNode dialogChild = (PNode)i.next();
if (dialogChild instanceof Conversation) {
((Conversation)dialogChild).deviceTypeLayerChanged();
}
}
}
COM: <s> called when the device type layer of a layer is changed </s>
|
funcom_train/20307823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findVars(Functor f, int maxIn) {
int max = maxIn;
Node[] args = f.getArgs();
for (int i = 0; i < args.length; i++) {
if (args[i].isVariable()) max = maxVarIndex(args[i], max);
}
return max;
}
COM: <s> find all the variables in a functor </s>
|
funcom_train/23717648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject getElementByName(String elementName) throws JSONException {
int len = elements.length();
for (int i = 0; i < len; i++) {
JSONObject element = elements.getJSONObject(i);
if (elementName.equals(element.get("name"))) {
return element;
}
}
return null;
}
COM: <s> lookup a metadata element in the schema based on its metadata element name </s>
|
funcom_train/31426228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge getEdge(UIOperation op, int index) throws WrongArgumentTypeException, ArgumentIndexOutOfBoundsException {
IOperationArgument arg = op.getSafeArgument(index);
if(arg != null) {
Object value = arg.getValue();
if(value instanceof Edge) {
return (Edge) value;
} else {
throw new WrongArgumentTypeException();
}
} else {
throw new ArgumentIndexOutOfBoundsException();
}
}
COM: <s> retrieves the edge element associated to the nth argument of the given operation </s>
|
funcom_train/4901056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResponseHeader(String headerLabel) {
if (readyState == ReadyState.RECEIVING || readyState == ReadyState.LOADED) {
StringBuffer buffer = new StringBuffer();
Header header = worker.response.getHeader(headerLabel);
return header == null ? null : header.getValue();
} else {
return null;
}
}
COM: <s> p gets a single response header as a string </s>
|
funcom_train/48495396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendModelDescription(Document xmlDoc) throws Exception {
this.xmlDoc = xmlDoc;
if (isSlave)
throw new Error("Only master can send initialization commands");
logger.info("Sending xml document...");
ObjectBuf<Document> xmlDocBuffer = ObjectBuf.buffer(xmlDoc);
comm.broadcast(comm.rank(), SETUP_DATA | SEND_MASTER, xmlDocBuffer);
logger.info("sending xml document: complete");
}
COM: <s> sends the model description xml document to slaves </s>
|
funcom_train/32610110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TreePath getOutlineNodePath(OutlineTreeNode root, Node node){
int size = root.getChildCount();
for (int i = 0; i < size; i++) {
OutlineTreeNode on = (OutlineTreeNode) root.getChildAt(i);
if (on.getNode() == node) {
return new TreePath((Object[]) on.getPath());
}
}
return null;
}
COM: <s> get the tree path of a node for a given root outline node </s>
|
funcom_train/14421946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String text) {
if (log.isDebugEnabled())
log.debug("Setting text on widget " + SWTUtils.getText(widget) + " to " + text);
assertEnabled();
if (hasStyle(widget, SWT.READ_ONLY))
throw new RuntimeException("This combo box is read-only.");
asyncExec(new VoidResult() {
public void run() {
getCCombo().setText(text);
}
});
notify(SWT.Modify);
}
COM: <s> sets the text in the c combo box </s>
|
funcom_train/33263978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelected(boolean in) {
if (in != selected) {
selected = in;
label.setSelected(in);
if (in) {
edit.requestFocus();
edit.selectAll();
}
if (getParent() instanceof DataSheet) {
((DataSheet) getParent()).setActiveControl(this);
}
lastValue = edit.getText();
}
}
COM: <s> responds to the user selecting the data control </s>
|
funcom_train/33890747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancel() {
if (cancel == null) {
cancel = new JButton();
cancel.setBounds(new Rectangle(395, 137, 95, 22));
cancel.setText("Cancel");
cancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("The form is closed.");
}
});
}
return cancel;
}
COM: <s> this method initializes cancel </s>
|
funcom_train/44450361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SrcML getSrcMLInstance() {
if (m_srcml == null) {
SrcMLElement e = getSParent();
if (e == null) {
return null;
}
SrcML res = e.getSrcMLInstance();
if (res == null) {
return null;
}
// perform path compression for faster lookups later
setSrcMLInstance(res);
return res;
} else {
return m_srcml;
}
}
COM: <s> returns the instance of the responsible src ml class instance </s>
|
funcom_train/14433530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getTownAsMunicipalitiesCheckBox() {
if (townAsMunicipalitiesCheckBox == null) {
townAsMunicipalitiesCheckBox = new JCheckBox();
townAsMunicipalitiesCheckBox.setHorizontalTextPosition(2);
townAsMunicipalitiesCheckBox.setText("Towns as Municipalities");
}
return townAsMunicipalitiesCheckBox;
}
COM: <s> this method initializes town as municipalities check box </s>
|
funcom_train/12195768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMappingAndRetrievalEdgeCase() {
initialiseDoCoMoDeviceCache();
String deviceName = "DoCoMo-P700i";
String userAgentPattern = "DoCoMo/\\.\\.\\.\\.P700i.*";
String userAgentString = "DoCoMo/....P700ixxx";
mapPatternAndDeviceAndFindDeviceByUserAgent(deviceName,
userAgentPattern,
userAgentString);
}
COM: <s> ensure that mapping and retrieval works properly when </s>
|
funcom_train/42943816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field getField(int ndx) {
if ((ndx >= 0) && (this.fields != null) && (this.fields.length > 0)) {
if (ndx < this.fields.length) {
return this.fields[ndx];
}
else if (this.repeatLast) {
return this.fields[this.fields.length - 1];
}
}
return null;
}
COM: <s> gets field from fields array at index </s>
|
funcom_train/33914247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startListening() {
try {
socket = new DatagramSocket(Client.PORT);
byte[] data = new byte[1];
while (true) {
DatagramPacket receivedPacket = new DatagramPacket(data,
data.length);
socket.receive(receivedPacket);
System.out.println("ClientListenerThread: "
+ receivedPacket.getAddress().getHostAddress());
startPanel.updateHostList(receivedPacket.getAddress()
.getHostAddress());
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> initializes a socket and listens to answer packets from servers when the </s>
|
funcom_train/28667121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCGenerator() {
GridData gridData9 = new GridData();
gridData9.horizontalSpan = 2;
gridData9.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData9.grabExcessHorizontalSpace = true;
cGenerator = new Combo(groupGenerator, SWT.READ_ONLY);
cGenerator.setLayoutData(gridData9);
setGeneratorPoints(curve.getPoints());
}
COM: <s> this method initializes c generator </s>
|
funcom_train/37827869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChatboardInternalFrame(){
chatPanel = new ChatPanel();
chatboardInternalFrame = makeInternalFrame(chatIcon, ChatFrameName, true, true, true, true, 200, 200, 601, 0, true);
chatboardInternalFrame.getContentPane().add(chatPanel);
chatboardInternalFrame.setVisible(false);
theDesktop.add(chatboardInternalFrame);
resetDesktop();
System.err.println("Chat frame created and set to not visible");
}
COM: <s> adds a feature to the chatboard internal frame attribute of the cveidesktop </s>
|
funcom_train/23824541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent createUI() {
JComponent component = new Box(BoxLayout.Y_AXIS);
component.setAlignmentX(Box.LEFT_ALIGNMENT);
int SEP_SIZE = 14;
// Create and add the format combo panel
component.add(createFormatComboPanel());
// Add a separator
component.add(Box.createVerticalStrut(SEP_SIZE));
// Create and add the antialiased option panel
component.add(createAntialiasedOptionPanel());
// Add a sparator
component.add(Box.createVerticalStrut(SEP_SIZE));
// Create the scaling options panel
component.add(createScalingOptionPanel());
setControlState();
return component;
}
COM: <s> creates the ui for the format page </s>
|
funcom_train/21882824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openHandler(final CmdHandler handler) {
final String pathname = handler.getBuildFile().getAbsolutePath();
final Object node = find(tree, pathname);
if (null == node) {
System.out.println("couldn't find tree node named: " + pathname);
open(handler.getBuildFile());
} else {
open(this, tree, node);
}
}
COM: <s> opens the specified handler in the editor </s>
|
funcom_train/15628942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doClear(final boolean performAction) {
final MapView<G, A, R> mapView = currentMapView;
if (mapView == null) {
return false;
}
final Rectangle selectedRec = mapView.getMapGrid().getSelectedRec();
if (selectedRec == null) {
return false;
}
if (performAction) {
copyBuffer.clear(mapView, selectedRec);
}
return true;
}
COM: <s> executes the clear action </s>
|
funcom_train/41302570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveLocifyCredentials(String login, String password) {
try {
settings.put("name", login);
settings.put("password", Base64.encode(password));
saveXML();
} catch (Exception e) {
R.getErrorScreen().view(e, "SettingsData.saveLocifyCredentials", null);
}
}
COM: <s> saves login and password to database </s>
|
funcom_train/18077678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createVideoTab() {
if (FlexManager.get().getComponent(ObserverPanel.TITLE) == null) {
createTab(ObserverPanel.TITLE, L.tr(ObserverPanel.TITLE),
ObserverPanel.getVideoSingleton().getComponent());
} else {
FlexManager.get().setActive(ObserverPanel.TITLE);
}
}
COM: <s> this method creates the video observer panel as tab </s>
|
funcom_train/10601296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadPutResponse(String pageURL, String content) throws Exception {
URL url = new URL(this.setupBaseUrl(), pageURL);
PutMethod method = new PutMethod(url.toExternalForm());
method.setRequestEntity(new StringRequestEntity(content));
this.response = new HttpClientResponse(url, method);
}
COM: <s> sends http put request and loads response object </s>
|
funcom_train/25332157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAndSetDBSeqLength() {
DADNASequence instance = new DADNASequence();
assertEquals( instance.getDBSeqLength(), new Integer(0));
Integer bob = 1;
instance.setDBSeqLength(bob);
assertEquals( instance.getDBSeqLength(), bob);
}
COM: <s> test of get dbseq length method of class dadnasequence </s>
|
funcom_train/8318425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configure(final CacheConfiguration configuration) {
//Set up the max size.
setMaxSize(configuration.getMaxSize());
setItemExpirationEnabled(configuration.isItemExpirationEnabled());
setBuildStatsEnabled(configuration.isBuildStatsEnabled());
//Sleeptime.
setSleepTime(configuration.getTunerSleepTime() * 1000L);
}
COM: <s> configures the cache being decorated </s>
|
funcom_train/11164074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canLeave(int event) {
boolean canLeave = true;
Iterator lisIte = getListeners().values().iterator();
while(lisIte.hasNext()) {
IWizardListener wizardListener = (IWizardListener) lisIte.next();
canLeave &= wizardListener.onTransition(event);
}
return canLeave;
}
COM: <s> executed after the forward transition is chosen but before the state </s>
|
funcom_train/39912735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh11() {
System.out.println("setEh11");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh11(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set eh11 method of class timesheetmanagement </s>
|
funcom_train/5372081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayers(Vector r) {
if (r == null)
r = new Vector();
cards = r;
rowMap = new Vector(r.size());
if (r.size() == 0)
return;
int i;
int n = r.size();
for (i = 0; i < n; i++) {
// cards.add(r.elementAt(i));
rowMap.add(r.elementAt(i));
}
sortCol = 0;
ascending = true;
sortByColumn(sortCol, ascending);
}
COM: <s> sets the players attribute of the players model object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.