__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/46460971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetMotorPosition(int port, boolean relative) throws IOException {
if (port < 0 || port > 2) {
throw new IllegalArgumentException("port must be 0, 1 or 2");
}
byte [] msg = new byte [4];
msg[0] = (byte)0x00;
msg[1] = (byte)0x0a;
msg[2] = (byte)port;
msg[3] = (byte)(relative?1:0);
sendMessage(msg);
}
COM: <s> resets the position of a motor </s>
|
funcom_train/2731503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VariableSet visit(LetTerm letTerm) {
VariableSet freeVars = new VariableSet();
VariableSet varSet = visit(letTerm.getVariable());
VariableSet initSet = visit(letTerm.getAssignmentTerm());
VariableSet bodySet = visit(letTerm.getBody());
freeVars.addAll(initSet);
freeVars.addAll(bodySet);
freeVars.removeAll(varSet);
return freeVars;
}
COM: <s> gets the free variables contained in the given let term </s>
|
funcom_train/22470816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playRequestsAtRandom(IRequestCycle cycle) {
User user = getUser();
if(user==null) {
return;
}
DJ dj = StreamMaster.getDJByUser(user.getId());
if(dj==null) {
return;
}
dj.getCandidateSelector().playRequestsAtRandom();
UserProperties.setUserProperty(getUser(),UserProperties.CandidateselectorPlayorder.class.getName(), UserProperties.CandidateselectorPlayorder.ATRANDOM.toString());
}
COM: <s> instructs the candidate selector to play the requested songs in </s>
|
funcom_train/32258633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setNoAdminOptions(boolean value){
fNonAdminWhereClauseLabel.setVisible(false);
fForAdminOnlyLabel.setVisible(false);
getEdSLSC().setVisible(false);
getChADMN().setVisible(false);
this.setSize(388, 260);
}
COM: <s> if true all options related to admin non admin users are hidden </s>
|
funcom_train/32778818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateStatistics(long n) {
TimeInstant now = presentTime();
_wSumAvail = _wSumAvail
+ ((double) _avail * TimeOperations.diff(now, _lastUsage)
.getTimeInEpsilon());
_lastUsage = now;
_avail += n; // n can be positive or negative
if (n > 0) // it is a real producer
{
_producers++;
if (_avail > _maximum) {
_maximum = _avail;
}
} else // it is a consumer
{
_consumers++;
}
}
COM: <s> updates the statistics for producers and consumers </s>
|
funcom_train/41962442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultCarrierCode(String dialingFrom, boolean nationalDialing) {
int id = getCarrierCodeResourceId(dialingFrom, nationalDialing);
if (id == 0) {
return null;
}
String[] carrierCodes = context.getResources().getStringArray(id);
return carrierCodes[0];
}
COM: <s> returns the default carrier code for dialing from a country </s>
|
funcom_train/1304479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UrlData getDestUrl() {
if (_destUrl == null) {
if (isLocal && linkUrl.indexOf(':') < 0) {
final String destUrlString = buildUrl(sourceUrl, linkUrl);
_destUrl = new UrlData(destUrlString);
}
else {
_destUrl = new UrlData(linkUrl);
}
}
return _destUrl;
}
COM: <s> get the full link destination url suitable for crawling for this link </s>
|
funcom_train/3143330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long lastModified() {
if (myFile != null) {
return myFile.lastModified();
} else if (myUrl != null) {
try {
return myUrl.openConnection().getLastModified(); // Hail Mary
} catch (IOException e) {
return Long.MAX_VALUE;
}
}
return 0; // can't happen
}
COM: <s> returns when the resource was last modified </s>
|
funcom_train/49143898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharMatcher negate() {
final CharMatcher original = this;
return new CharMatcher() {
@Override
public boolean matches(Character c) {
return !original.matches(c);
}
@Override
public boolean matchesAllOf(CharSequence sequence) {
return original.matchesNoneOf(sequence);
}
@Override
public boolean matchesNoneOf(CharSequence sequence) {
return original.matchesAllOf(sequence);
}
@Override
public int countOf(CharSequence sequence) {
return sequence.length() - original.countOf(sequence);
}
@Override
public CharMatcher negate() {
return original;
}
};
}
COM: <s> returns a matcher that matches any character not matched by this matcher </s>
|
funcom_train/7533430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLongParameter(int i, long value) throws SQLException {
checkSetParameterIndex(i, false);
int outType = parameterTypes[i - 1];
switch (outType) {
case Types.BIGINT :
Object o = new Long(value);
parameterValues[i - 1] = o;
break;
case Types.BINARY :
case Types.OTHER :
throw Util.sqlException(
Trace.error(Trace.INVALID_CONVERSION));
default :
setParameter(i, new Long(value));
}
}
COM: <s> used with long and narrower integral primitives </s>
|
funcom_train/47928342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextStage() {
//bgMusclose();
oppenentEntity = new attacksOpp1();
characterEntity = new attacksPlyr1();
newGame = new menuGameRender();
currentScreen = "newGame";
stopMus();
daWindow.setContentPane(newGame);
newGame.startFight();
reSize("game");
}
COM: <s> increments to next stage in story mode </s>
|
funcom_train/7867168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
iDragged = true;
iDragXLoc = e.getX();
iDragYLoc = e.getY();
// Calculate the selection point.
int min = Math.min(iDragXLoc, iStartXLoc);
int max = Math.max(iDragXLoc, iStartXLoc);
repaint();
}
COM: <s> invoked when a mouse button is pressed on a component and then </s>
|
funcom_train/9048664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getBean(String name) {
WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
if (applicationContext == null) {
throw new IllegalStateException("No Spring web application context found");
}
if (!applicationContext.containsBean(name)) {
throw new IllegalArgumentException("Spring bean not found: " + name);
}
return applicationContext.getBean(name);
}
COM: <s> look up a spring bean with the specified name in the current web </s>
|
funcom_train/8612142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteFusionStone(final int itemObjId, final int slot) {
DB.insertUpdate(DELETE_QUERY, new IUStH() {
@Override
public void handleInsertUpdate(PreparedStatement stmt) throws SQLException {
stmt.setInt(1, itemObjId);
stmt.setInt(2, slot);
stmt.setInt(3, ItemStoneType.FUSIONSTONE.ordinal());
stmt.execute();
}
});
}
COM: <s> deleted item stone from selected item </s>
|
funcom_train/1241388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
//attributes.
AttributesImpl attributes = makeAttributesEditable();
// how to convert to DOM ATTR
attributes.addAttribute(newAttr.getNamespaceURI(),
newAttr.getLocalName(),
newAttr.getLocalName(),
"CDATA",
newAttr.getValue());
return null;
}
COM: <s> set an attribute as a node </s>
|
funcom_train/16651759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countReferencesLeftForAuthor(Person author) {
int ret = 0;
List<Person> ip = publicationEntity.getAuthors();
for (Person p : ip) {
if (p.getId().equals(author.getId())) {
ret++;
}
}
if (publicationEntity.getDoiContact() != null && publicationEntity.getDoiContact().getId().equals(author.getId())) {
ret++;
}
return ret;
}
COM: <s> counts the references of an author in the publication entity </s>
|
funcom_train/35021519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getCharValue(Object o) throws EvaluationException {
if (o instanceof Character) {
return ((Character) o).charValue();
} else if (o instanceof CharValue) {
return ((CharValue) o).value();
} else {
throw new EvaluationException(
NbBundle.getMessage(getClass(), "error.oper.char"), getToken(), o);
}
}
COM: <s> returns the char value from the given object </s>
|
funcom_train/38379769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidIrcCommandWithMultipleCtcpCommands() {
IrcCommand command = CommandParser.parseIrcCommand(
VALID_IRC_COMMAND_WITH_TWO_CTCP_COMMANDS);
assertNotNull(command);
assertEquals(2, command.getCtcpCommands().size());
assertEquals("VERSION", command.getCtcpCommand(1).getName());
assertNotNull(command.getCtcpCommand(1).getParams());
assertEquals(0, command.getCtcpCommand(1).getParams().size());
}
COM: <s> test the parsing of a valid irc command with multiple ctcp commands in </s>
|
funcom_train/3081822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTreeSelectionListener(TreeSelectionListener tsl) {
getEventListenerList().addListener(TreeSelectionListener.class, tsl);
if (getEventListenerList().getListenerCount(TreeSelectionListener.class) != 0 && selectionForwarder == null) {
selectionForwarder = new TreeSelectionForwarder();
getSelectionModel().addTreeSelectionListener(selectionForwarder);
}
}
COM: <s> adds a listener for tree selection events </s>
|
funcom_train/42275921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getValueForState(Observation stateICareAbout) {
//Need to be a bit careful because this can be called
//before agent_init
if (stateICareAbout == null || QTable == null) {
return 0.0d;
}
int stateLabel = stateICareAbout.intArray[0];
return getPolicyValue(QTable[stateLabel]);
}
COM: <s> so we can draw fancy value functions in the visualizer </s>
|
funcom_train/8685738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureFileSet(ArchiveFileSet zfs) {
super.configureFileSet(zfs);
if (zfs instanceof TarFileSet) {
TarFileSet tfs = (TarFileSet) zfs;
tfs.setUserName(userName);
tfs.setGroup(groupName);
tfs.setUid(uid);
tfs.setGid(gid);
}
}
COM: <s> configure a fileset based on this fileset </s>
|
funcom_train/10197899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerDependent(QueryFactory queryFactory, PersistentObject master) {
Map circularCheckSet = new HashMap();
Link[] links = master.retrieveLinks(queryFactory);
Link parentLink = master.record().toLink();
registerDependent(queryFactory, parentLink, links, circularCheckSet);
}
COM: <s> adds child links to the master object </s>
|
funcom_train/32074780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String suggestJSON(String start, boolean ontological) throws Exception {
StringBuffer sb = new StringBuffer();
sb.append("[\"" + start + "\", ");
Collection<String> terms;
if(ontological) {
terms = OntologicalArguaments.getTerms(start);
} else {
terms = suggestTerms(start);
}
boolean first = true;
sb.append("[");
for(String term : terms) {
if(!first) {
sb.append(", ");
} else {
first = false;
}
sb.append("\"");
sb.append(term);
sb.append("\"");
}
sb.append("]]");
//System.out.println(sb.toString());
return sb.toString();
}
COM: <s> produce json for the possible expansions of a prefix for open search </s>
|
funcom_train/2881454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPath() {
if (m_attribute != null && m_parent != null) {
String parentPath = m_parent.getPath();
if ((parentPath != null) && (!parentPath.equals(""))) {
parentPath += ":";
}
return parentPath + m_attribute.getName();
} else {
return "";
}
}
COM: <s> gets the path attribute of the sfnode object </s>
|
funcom_train/48959963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public void execute() {
if (dao.first(TrackerUser.class) == null) {
UserImpl root = (UserImpl) securityDAO.findUser(rootUserName);
if (root != null) {
TrackerUser user = new TrackerUser();
user.setSecurityUser(root);
user.setSex(dao.first(Sex.class));
dao.create(user);
}
}
}
COM: <s> checks if the root user exists and if not creates one </s>
|
funcom_train/25824561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void store(String fileName, Object object) throws IOException {
/**/
System.out.println("Saving \"" + fileName + "\"....");
/**/
File file = new File(fileName);
if (file.exists())
file.delete();
file.createNewFile();
FileOutputStream out = new FileOutputStream(file);
ObjectOutputStream output = new ObjectOutputStream(out);
output.writeObject(object);
output.close();
/**/
System.out.println("\"" + fileName + "\" ready.");
/**/
}
COM: <s> this method allows to store the current neural network structure </s>
|
funcom_train/45622781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProjectPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImportType_project_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImportType_project_feature", "_UI_ImportType_type"),
MSBPackage.eINSTANCE.getImportType_Project(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the project feature </s>
|
funcom_train/11322775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeaderStyle(String name, String value) {
if (name == null) {
throw new IllegalArgumentException("Null name parameter");
}
if (value != null) {
getHeaderStyles().put(name, value);
} else {
getHeaderStyles().remove(name);
}
}
COM: <s> set the table header lt th gt css style name and value pair </s>
|
funcom_train/31018431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelectionCells(Object[] cells) {
if (cells != null) {
Vector change = new Vector();
for (int i = 0; i < cells.length; i++) {
if (cells[i] != null) {
boolean removed = deselect(cells[i]);
if (removed)
change.addElement(new CellPlaceHolder(cells[i], false));
}
}
if (change.size() > 0)
notifyCellChange(change);
}
}
COM: <s> removes paths from the selection </s>
|
funcom_train/48670228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkParam(MPEG7ScalableColor scd2) {
if(scd2.nofBitPlanesDiscarded != nofBitPlanesDiscarded) {
throw new UnsupportedOperationException("NumberOfBitPlanesDiscarded is not matching");
}
if (scd2.nofCoefficients != nofCoefficients) {
throw new UnsupportedOperationException("nofCoefficients is not matching");
}
if(scd2.histoHaar == null || this.histoHaar == null) {
throw new UnsupportedOperationException("One of the Descriptor histograms is NULL");
}
return true;
}
COM: <s> simply check if the parameters between this scalable color descriptor and the </s>
|
funcom_train/4257620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Reference getJarFileRef() {
Reference result = null;
if (getSchemeProtocol().equals(Protocol.JAR)) {
String ssp = getSchemeSpecificPart();
if (ssp != null) {
int separatorIndex = ssp.indexOf("!/");
if (separatorIndex != -1) {
result = new Reference(ssp.substring(0, separatorIndex));
}
}
}
return result;
}
COM: <s> returns the jar file reference </s>
|
funcom_train/36933110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void colorToBuffer(CCColor theColor, DoubleBuffer theBuffer, int theIndex) {
for(int i = 0; i < _myPixelFormat.numberOfChannels;i++) {
theBuffer.put(
theIndex + _myPixelFormat.offsets[i],
colorChannel(theColor, color_indices[_myPixelFormat.numberOfChannels - 1][i])
);
}
}
COM: <s> writes a color into a double buffer </s>
|
funcom_train/23695509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialiseCricksMethods(){
cricksMethod.put("all97", AllawiSantalucia97.class);
cricksMethod.put("bre86", Breslauer86.class);
cricksMethod.put("fre86", Freier86.class);
cricksMethod.put("san04", Santalucia04.class);
cricksMethod.put("san96", Santalucia96.class);
cricksMethod.put("sug95", Sugimoto95.class);
cricksMethod.put("sug96", Sugimoto96.class);
cricksMethod.put("tan04", Tanaka04.class);
cricksMethod.put("tur06", Turner06.class);
cricksMethod.put("xia98", Xia98.class);
}
COM: <s> initialises the cricks method of register methods </s>
|
funcom_train/36996064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getKerning( int ch_left, int ch_right ) {
for( int i = 0; i<kernLeftCodes.length; i++ ) {
if( ch_left == kernLeftCodes[i] && ch_right == kernRightCodes[i] ) {
return kernAdjustment[i];
}
}
return 0;
}
COM: <s> return adjustment from kerning table for specified pair of characters </s>
|
funcom_train/47891941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitFieldDecl(FieldDecl fd) {
super.visitFieldDecl(fd);
// get the field type
TypeDecl type = fd.getType();
if (type instanceof UserType && type != fd.getOwnerUserType()) {
links = links + containsWeight;
if (type.getSource() == null) {
if (!counted.contains(type.getSimpleName())) {
componentCount++;
counted.add(type.getSimpleName());
}
}
}
}
COM: <s> visit field decl </s>
|
funcom_train/3843260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureWorkspaceSettings() {
try {
// create a new instance of the current class
IPreferencePage page =
(IPreferencePage) this.getClass().newInstance();
page.setTitle(getTitle());
page.setImageDescriptor(image);
// and show it
showPreferencePage(pageId, page);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
COM: <s> creates a new preferences page and opens it </s>
|
funcom_train/18543942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String addAmount() {
String text = "";
if (p_props.containsKey(PropertyNames.AMOUNT)) {
String amountString = (String) p_props.get(PropertyNames.AMOUNT);
double amount = Double.parseDouble(amountString);
text = text + PrintHelper.printDouble(amount) + " ";
}
return text;
}
COM: <s> print the amount if necessary if its not 1 </s>
|
funcom_train/34126279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddBlocksEvent() {
TestBlockAddedListener listener = new TestBlockAddedListener();
board.addBlockAddedListener(listener);
Block block = new Block();
block.setCoordinate(new Coordinate(0, 0));
board.addBlocks(new Block[] { block });
if (!listener.eventFired) {
fail("Event never fired.");
}
}
COM: <s> tests that a block added event is fired when a block is added </s>
|
funcom_train/19035608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVote(MemberID memberID, VoteType voteType) {
if(memberID != null && voteType != null) {
this.voteKeeper.addVote(memberID, voteType);
this.link.setVotes(this.voteKeeper.size());
this.link.setTally(this.voteKeeper.getTally());
}
}
COM: <s> adds a new vote to the link </s>
|
funcom_train/3903681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateMeasureType_Max(BigDecimal measureType, DiagnosticChain diagnostics, Map context) {
boolean result = measureType.compareTo(MEASURE_TYPE__MAX__VALUE) <= 0;
if (!result && diagnostics != null)
reportMaxViolation(ImsssPackage.Literals.MEASURE_TYPE, measureType, MEASURE_TYPE__MAX__VALUE, true, diagnostics, context);
return result;
}
COM: <s> validates the max constraint of em measure type em </s>
|
funcom_train/32987089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Connection dbconn) throws TorqueException {
Criteria crit = new Criteria();
crit.add(DBMoleculeHyperlinkPeer.MOLECULE_ID, getMoleculeId());
crit.add(DBMoleculeHyperlinkPeer.HYPERLINK, getHyperlink());
List v = DBMoleculeHyperlinkPeer.doSelect(crit);
if (v.size() == 0) {
super.save(dbconn);
}
}
COM: <s> saves this to db </s>
|
funcom_train/48151477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doExperiment() {
super.doExperiment();
timeline.resetData();
time = 0;
for (int i = 0; i < k; i++) {
time = time - Math.log(1 - Math.random()) / r;
timeline.addTime(time);
}
arrivalTime.setValue(time);
}
COM: <s> this method defines the experiment k arrivals in the poisson process are </s>
|
funcom_train/12809910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PdfDictionary createDimensionDictionary(float d, float max, float min) {
PdfDictionary dict = new PdfDictionary();
dict.put(PdfName.DEFAULT, new PdfNumber(d));
dict.put(PdfName.MAX_CAMEL_CASE, new PdfNumber(max));
dict.put(PdfName.MIN_CAMEL_CASE, new PdfNumber(min));
return dict;
}
COM: <s> creates a dictionary that can be used for the height and width entries </s>
|
funcom_train/32943515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMapElement(String complexElementName, String simpleElementName) {
MapType mt;
try {
mt = (MapType) getElement(complexElementName).getValue();
mt.removeElement(crawlerSettings, simpleElementName);
}
catch (AttributeNotFoundException e) {
log.error("Could not find map with name " + complexElementName, e);
throw new WCTRuntimeException("Could not find map with name " + complexElementName, e);
}
}
COM: <s> remove an element from a map </s>
|
funcom_train/50378443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerConverter(IConverter c) {
Map<QName, IConverter> sameModelType = converters.get(c.getModelType());
if (sameModelType == null) {
sameModelType = new ConcurrentHashMap<QName, IConverter>();
converters.put(c.getModelType(), sameModelType);
}
sameModelType.put(c.getTargetType(), c);
}
COM: <s> register a converter </s>
|
funcom_train/25749081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
this.functionNames.clear();
this.jobNames.clear();
this.packageNames.clear();
this.procedureNames.clear();
this.queueNames.clear();
this.tableNames.clear();
this.typeNames.clear();
this.viewNames.clear();
}
COM: <s> removes all stored information on existing objects </s>
|
funcom_train/27781862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(long sid) {
// clear is synchronized thus we need not care about this much
NodeDB node = null;
try {
node = openServer(sid);
node.clear();
} catch (Throwable x) {
logger.log(Level.WARNING, "clear::clear", x);
} finally {
release(node);
}
}
COM: <s> clears the planner related to a server </s>
|
funcom_train/49873847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readFile(File file) throws IOException {
FileInputStream stream = new FileInputStream(file);
try {
FileChannel fc = stream.getChannel();
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc
.size());
/* Instead of using default, pass in a decoder. */
return Charset.defaultCharset().decode(bb).toString();
} finally {
stream.close();
}
}
COM: <s> reads a file into a string </s>
|
funcom_train/22357265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void currentUnitChanged() {
boolean enabled =
(currentUnit != null) && currentUnit.getFaction() != null
&& currentUnit.getFaction().isPrivileged();
setConfirmEnabled(enabled);
setCreationEnabled(enabled);
setDeletionEnabled(enabled && (currentUnit instanceof TempUnit));
}
COM: <s> updates the buttons according to the current unit </s>
|
funcom_train/28981985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(QueueElement<Q> o) {
QueueElement<Q> ps = (QueueElement<Q>) o;
int priorityOther = ps.priority;
if (this.priority == priorityOther) {
if (this.element.equals(ps.element)) {
return 0;
} else {
return -1;
}
} else {
if (this.priority < priorityOther) {
return -1;
} else {
return 1;
}
}
}
COM: <s> implementation of compare to </s>
|
funcom_train/18734255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResolvedType remove(String key) {
ResolvedType ret = (ResolvedType) tMap.remove(key);
if (ret == null) {
if (policy == USE_WEAK_REFS) {
WeakReference wref = (WeakReference) expendableMap.remove(key);
if (wref != null)
ret = (ResolvedType) wref.get();
} else if (policy == USE_SOFT_REFS) {
SoftReference wref = (SoftReference) expendableMap.remove(key);
if (wref != null)
ret = (ResolvedType) wref.get();
} else {
ret = (ResolvedType) expendableMap.remove(key);
}
}
return ret;
}
COM: <s> remove a type from the map </s>
|
funcom_train/34519798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHandlerStart(InstructionHandle ih){
super.setHandlerStart(ih);
if (ih!=null){
InstructionHandle temp = ih.getPrev();
if (filterEnd!=null)
filterEnd.removeTargeter(this);
if (temp!=null)
temp.addTargeter(this);
filterEnd = temp;
}
}
COM: <s> sets the handle of the start of the handler block </s>
|
funcom_train/536721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Average computeAverage(User user, TrackCollection trackCollection) {
Average average = new Average();
// For all tracks of this collection...
for (Track track : trackCollection.getTracks()) {
Rating rating = track.getRating(user);
if (rating != null && rating.getWeight() > 0) {
average.add(rating.getRawRating());
}
}
return average;
}
COM: <s> calculate the users opinion about this track collection </s>
|
funcom_train/17592467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numberOfElements() {
int total = 0;
for (Iterator i = list.iterator(); i.hasNext(); ) {
Object o = i.next();
if (o instanceof Collection) {
total += ((Collection) o).size();
} else {
++total;
}
}
return total;
}
COM: <s> returns the number of elements in this order </s>
|
funcom_train/17897001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillWithActions(CaoElement element, CaoList targetList, CaoActionList actionList,Object...initConfig) {
if (!canExecute(targetList,initConfig)) return;
for (CaoAction action : list) {
try {
if (action.canExecute(targetList,initConfig))
actionList.add(action);
} catch (Throwable t) {
//TODO logger
t.printStackTrace();
}
}
}
COM: <s> fill the list with a set of valid actions for this list </s>
|
funcom_train/46765168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getDeleteAccountMenuItem() {
if (deleteAccountMenuItem == null) {
deleteAccountMenuItem = new JMenuItem();
deleteAccountMenuItem.setText(Resources.getString("menu_delete_account"));
deleteAccountMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
deleteDialog();
}
});
}
return deleteAccountMenuItem;
}
COM: <s> this method initializes delete account menu item </s>
|
funcom_train/44714133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component createComponent() {
Submit submit;
if (get("defaultValue") == null) {
// There is no label set - use the constructor without
// label
submit = new Submit(getParameterName());
} else {
// There is a label set - use the constructor taking name
// and label
submit = new Submit(getParameterName(), (String)getDefaultValue());
}
return submit;
}
COM: <s> create the submit button whose persistence is managed </s>
|
funcom_train/15603029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isReverseComplement() {
Boolean isRevComp = (Boolean)browserModel.getModelProperty(BrowserModel.REV_COMP_PROPERTY);
if (isRevComp == null) throw new IllegalStateException("Model property GAAnnotRevComped not found.");
return isRevComp.booleanValue();
}
COM: <s> used for checking if is in reverse complement axis mode </s>
|
funcom_train/14059449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OT removeLast() {
int i;
final OT t;
i = this.m_count;
if (i <= 0) {
throw new ArrayIndexOutOfBoundsException();
}
i--;
t = this.m_data[i];
this.m_data[i] = null;
this.m_count = i;
return t;
}
COM: <s> remove the last object in the list </s>
|
funcom_train/28750647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFailed(Long newVal) {
if ((newVal != null && this.failed != null && (newVal.compareTo(this.failed) == 0)) ||
(newVal == null && this.failed == null && failed_is_initialized)) {
return;
}
this.failed = newVal;
failed_is_modified = true;
failed_is_initialized = true;
}
COM: <s> setter method for failed </s>
|
funcom_train/8015380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hideDetails() {
showHideDetails.setText(showDetails);
showHideDetails.setIcon(closeIcon);
JPanel panel = (JPanel) showHideDetails.getParent();
if (panel.getComponentCount() == 2) {
panel.remove(detailsScrollPane);
int dialogWidth = this.getWidth();
dialogHeight -= 200;
setSize(dialogWidth, dialogHeight);
pack();
repaint();
}
}
COM: <s> this method hides the panel thats has the genetics information </s>
|
funcom_train/51076401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopServer()
{
if(isStarted == false)
{
return;
}
try
{
Naming.unbind(registryName);
} catch (RemoteException ex)
{
ex.printStackTrace();
} catch (MalformedURLException ex)
{
ex.printStackTrace();
}
catch (NotBoundException ex)
{
}
}
COM: <s> stops the server and unexports it from the registry </s>
|
funcom_train/48911081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(100);
for (int i = 0; i < m_ptr; i++) {
if (i > 0)
sb.append(" ");
sb.append(m_v[i]);
}
return sb.toString();
}
COM: <s> return a string version of this value vector without parentheses </s>
|
funcom_train/2344816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("Agenda", null, getJPanel(), null);
jTabbedPane.addTab("Protokoll", null, getJSplitPane(), null);
jTabbedPane.addTab("Moderator", null, getJPanel1(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/19139489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double max() {
if (size() == 0) {
throw new IllegalStateException("cannot find maximum of an empty list");
}
double max = _data[_pos - 1];
for (int i = _pos - 1; i-- > 0;) {
max = Math.max(max, _data[_pos]);
}
return max;
}
COM: <s> finds the maximum value in the list </s>
|
funcom_train/99192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRemarkInherited(TridasValue value) {
TridasRemark remark = asTridasRemark();
for(TridasRemark aRemark : value.getRemarks()) {
if(RemarkEquals.remarksEqual(remark, aRemark)) {
// get the inherited count from the remark associated with the value
return (aRemark.isSetInheritedCount() && aRemark.getInheritedCount() > 0) ? true : false;
}
}
return false;
}
COM: <s> check if a remark is inherited </s>
|
funcom_train/35680152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInterfaceLsfilean() throws Exception {
CixsJaxwsService model = Samples.getLsfilean();
initWebServiceParameters(model);
File componentClassFilesDir = CodeGenUtil.classFilesLocation(
GEN_SRC_DIR, model.getPackageName(), true);
Jaxws2CixsGenerator.generateInterface(model, getParameters(),
componentClassFilesDir);
check(model);
}
COM: <s> case where operation has a different package than the service </s>
|
funcom_train/1710546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scrollAndUpdateCoords(MouseEvent event) {
//scroll if user hits side
int interval=decode_pdf.getScrollInterval();
Rectangle visible_test=new Rectangle(currentGUI.AdjustForAlignment(event.getX()),event.getY(),interval,interval);
if((currentGUI.allowScrolling())&&(!decode_pdf.getVisibleRect().contains(visible_test)))
decode_pdf.scrollRectToVisible(visible_test);
updateCords(event);
}
COM: <s> scroll to visible rectangle and update coords box on screen </s>
|
funcom_train/45192361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean booleanValue() {
if (value instanceof Boolean) {
return ((Boolean)value).booleanValue();
} else if (value instanceof Number) {
return ((Number)value).intValue()!=0;
} else if (value instanceof String) {
return WUtil.parseBoolean((String)value);
} else {
return false;
}
}
COM: <s> get a boolean value </s>
|
funcom_train/41825171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSvnLocal(int index) {
Element svnRoot = getChild(root,"scm");
Element svnLocations = getChild(svnRoot,"locations");
Element parent = getChildren(svnLocations,"hudson.scm.SubversionSCM_-ModuleLocation",index);
return getChild(parent,"local").getTextNormalize();
}
COM: <s> gets the svn local </s>
|
funcom_train/39126645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installMidiDevices() {
this.midiDeviceDescriptorMap = new HashMap<MidiDevice, MidiDeviceDescriptor>();
for (MidiDeviceDescriptor midiDeviceDescriptor : midiDeviceDescriptors) {
System.out.println("Installing Midi device: " + midiDeviceDescriptor.getMidiDeviceName() + " as " + midiDeviceDescriptor.getProjectName());
midiDeviceDescriptor.install(this);
}
}
COM: <s> go through the mididevice descriptor map and install mididevices </s>
|
funcom_train/10276176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractStringBuilder deleteCharAt(int index) {
if ((index < 0) || (index >= count))
throw new StringIndexOutOfBoundsException(index);
System.arraycopy(value, index+1, value, index, count-index-1);
System.arraycopy(taint, index+1, taint, index, count-index-1);
count--;
return this;
}
COM: <s> removes the code char code at the specified position in this </s>
|
funcom_train/3410574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowFocusEvent(WindowEvent e) {
WindowFocusListener listener = windowFocusListener;
if (listener != null) {
switch (e.getID()) {
case WindowEvent.WINDOW_GAINED_FOCUS:
listener.windowGainedFocus(e);
break;
case WindowEvent.WINDOW_LOST_FOCUS:
listener.windowLostFocus(e);
break;
default:
break;
}
}
}
COM: <s> processes window focus event occuring on this window by </s>
|
funcom_train/1238957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verifyIntegerProperty(String name, Object value) {
if (!(value instanceof Integer)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[]
{name,
"java.lang.Integer",
value.getClass().getName()}));
}
}
COM: <s> verify that the type of the object is an integer and throw </s>
|
funcom_train/5340576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playSong() {
DataLine line = TABLE.getSelectedDataLine();
if(line == null)
return;
File f = ((FileTransfer)line).getFile();
MODEL.setCurrentSong(f);
MediaPlayerComponent.playSongImmediately(f);
_songPlaying = true;
}
COM: <s> plays the first selected item </s>
|
funcom_train/26245226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getShelfPercentage() {
int size = 0;
for (int y=0; y < tileHeight; y++) {
int weight = 1;
for (int x=0; x < tileWidth; x++) {
if (shelfMap[x][y]>0) size += weight;
}
}
return (size*100) / (tileWidth * tileHeight);
}
COM: <s> calculates how much of the world surface is actually covered by </s>
|
funcom_train/28687952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isBeforeEnd(ConcurrentSkipListMap.Node n) {
if (n == null)
return false;
if (hi == null)
return true;
Object k = n.key;
if (k == null) // pass by markers and headers
return true;
int c = m.compare(k, hi);
if (c > 0 || (c == 0 && !hiInclusive))
return false;
return true;
}
COM: <s> returns true if node key is less than upper bound of range </s>
|
funcom_train/32057878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRowRule() {
System.out.println("testSetRowRule");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.setRowRule(null);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set row rule method of class gpdocument </s>
|
funcom_train/43417011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WritableFormChunk exportToFormChunk() {
final byte[] id = "IFZS".getBytes();
final WritableFormChunk formChunk = new WritableFormChunk(id);
formChunk.addChunk(createIfhdChunk());
formChunk.addChunk(createUMemChunk());
formChunk.addChunk(createStksChunk());
return formChunk;
}
COM: <s> exports the current object state to a form chunk </s>
|
funcom_train/43396583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play() {
if (!opened) {
throw new IllegalStateException("MidiPlayer is not open.");
}
if (sequence != null) {
try {
sequencer.setSequence(sequence);
sequencer.start();
}
catch (InvalidMidiDataException e) {
e.printStackTrace();
}
}
}
COM: <s> plays the current sequence </s>
|
funcom_train/21041780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionStatus addPeer(String strPeerMacID, LocalAddress peerAddress) {
//
if ((strPeerMacID != null) && (peerAddress != null)) {
peerResolvers.put(strPeerMacID, peerAddress);
actionStatus.setActionStatus("DONE");
} else
actionStatus.setActionStatus("NOTDONE");
return actionStatus;
}
COM: <s> add peer entry in hash peer resolvers </s>
|
funcom_train/22077634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateRoot(Map vars) throws MapperTechnicalException {
String rs = null;
/* instanciate root */
if (root == null) {
// try looking in env
rs = (String) vars.get("__ROOT__");
} else
rs = root.instance(vars);
try {
_root = nameParser.parse(rs);
vars.put("root", _root);
vars.put("__ROOT__", rs);
} catch (NamingException e1) {
throw new MapperTechnicalException(
"Cannot resolve name for root context " + root);
}
}
COM: <s> update the root context from which this mapper operates </s>
|
funcom_train/11344646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeSaxDriver() {
String version = (String) System.getProperty("java.vm.version");
if (version.startsWith("1.4")) {
System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
}
}
COM: <s> if ant runs with java 1 </s>
|
funcom_train/7421640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTypeFromCopyTo(ParticipantReferenceDataObject dataObject) {
if (dataObject.getCopyTo() != null) {
List<ParticipantReferenceDataObject> references =
this.diagram.getParticipantReferencesWithName(dataObject.getCopyTo());
for (Iterator<ParticipantReferenceDataObject> it =
references.iterator(); it.hasNext();) {
String type = getType(it.next());
if (type != null) {
return type;
}
}
}
return null;
}
COM: <s> determines the type of a participant reference from </s>
|
funcom_train/4962579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup(){
if (graph_ != null){//if this is called w/ no graph, nothing happens
VertexIterator vertices = graph_.vertices();
while(vertices.hasNext()){
Vertex currentVertex = vertices.nextVertex();
//Test if the vertex is decorated, because if graph is cyclic,
//then all vertices may not be visited.
if (currentVertex.has(NUMBER_KEY_)){
currentVertex.destroy(NUMBER_KEY_);
}
}
//set the state to be like pre-execution
graph_ = null;
}
}
COM: <s> cleans up all decorations that this algorithm was storing in the </s>
|
funcom_train/45934328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String emailAsBrowserLink() {
String v = (String)this.valueForKey("email");
if (v == null) return null;
v = v.trim();
v = UString.stringByEncodingURLComponent(v, null /* utf-8 */);
return v.length() > 0 ? ("mailto:" + v) : null;
}
COM: <s> returns the email field of the contact but adds mailto in front and </s>
|
funcom_train/3168940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSimple() {
if (myStartsInside) {
return myTransitionCount <= 1;
} else {
return myTransitionCount <= 2;
}
/*
udanax-top.st:68790:IntegerRegion methodsFor: 'testing'!
{BooleanVar} isSimple
"Inequalities and intervals are both simple. See class comment"
myStartsInside ifTrue:
[^myTransitionCount <= 1]
ifFalse:
[^myTransitionCount <= 2]!
*/
}
COM: <s> inequalities and intervals are both simple </s>
|
funcom_train/41856930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newGraph(String graphUri) {
synchronized (this) {
Model model = _getGraphsModel();
Resource subGraphRes = ResourceFactory.createResource(graphUri);
Statement stmt = ResourceFactory.createStatement(subGraphRes, RDF.type, Rdfg.Graph);
model.add(stmt);
log.debug("newGraph: added statement: " +stmt);
try {
_updateGraphsFile(model);
}
catch (Exception e) {
log.error("Cannot write out to file " +graphsFile, e);
}
}
}
COM: <s> adds a new graph to the internal graphs resource </s>
|
funcom_train/4422401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectCurrentLocation() {
try {
android.location.Location loc = positionManager.getCurrentLocation();
if (listener != null)
listener.locationSelected(loc.getLatitude(), loc.getLongitude(), "your location");
} catch (Exception e) {
Toast.makeText(parent, parent.getResources().getString(R.string.no_location), Toast.LENGTH_SHORT).show();
}
}
COM: <s> refreshes the latest current location </s>
|
funcom_train/49870143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startMatchReplay(String name){
try {
Statement stat = _connection.createStatement();
ResultSet rs = stat.executeQuery("SELECT start_time,end_time FROM Match WHERE name='"+name+"'");
_startTime = rs.getLong(1);
_replayTime = rs.getLong(1);
_endTime = rs.getLong(2);
System.out.println(_startTime+" "+_endTime);
stat.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> starts a blackback </s>
|
funcom_train/28658155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processFieldPaintEvent(XI5250FieldPaintEvent e) {
if (ivFieldPaintListener == null)
return;
switch (e.getID()) {
//
case XI5250FieldPaintEvent.FIELD_PAINT:
ivFieldPaintListener.fieldPaint(e);
break;
//
case XI5250FieldPaintEvent.ROW_PAINT:
ivFieldPaintListener.rowPaint(e);
break;
}
}
COM: <s> routes xi5250 field paint event to listeners </s>
|
funcom_train/2673971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Image getImage(Template template) {
ImageRegistry registry= AJavaEditorPlugin.getDefault().getImageRegistry();
Image image= registry.get(AJavaPluginConstants.AJAVA_TEMPLATES_DEFAULT_ICON);
if (image == null) {
ImageDescriptor desc= AJavaEditorPlugin.imageDescriptorFromPlugin(AJavaResourceDefinitions.getString("pluginName"), AJavaPluginConstants.AJAVA_TEMPLATES_DEFAULT_ICON);
registry.put(AJavaPluginConstants.AJAVA_TEMPLATES_DEFAULT_ICON, desc);
image= registry.get(AJavaPluginConstants.AJAVA_TEMPLATES_DEFAULT_ICON);
}
return image;
}
COM: <s> always return the default image </s>
|
funcom_train/11589720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMenuId(FacesContext context, UIComponent component) {
String menuId = component.getClientId(context).replaceAll(":", "_") + "_menu";
while (menuId.startsWith("_")) {
menuId = menuId.substring(1);
}
return menuId;
}
COM: <s> fetch the very last part of the menu id </s>
|
funcom_train/34078337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLibraryPathEntries() {
libraryPathEntries = new ArrayList<LibraryPathEntry>();
LibraryPathEntry libraryPathEntry = new LibraryPathEntry();
libraryPathEntry.setKind(Integer.valueOf(4));
libraryPathEntry.setPath("");
libraryPathEntries.add(libraryPathEntry);
libraryPathEntry = new LibraryPathEntry();
libraryPathEntry.setKind(Integer.valueOf(1));
libraryPathEntry.setLinkType(Integer.valueOf(1));
libraryPathEntry.setPath("libs");
libraryPathEntries.add(libraryPathEntry);
}
COM: <s> factory method needed to create library path entries list </s>
|
funcom_train/8632388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected AccessRestriction fetchAccessRestriction(String qualifiedBinaryFileName) {
if (this.accessRuleSet == null)
return null;
char [] qualifiedTypeName = qualifiedBinaryFileName.
substring(0, qualifiedBinaryFileName.length() - SUFFIX_CLASS.length)
.toCharArray();
if (File.separatorChar == '\\') {
CharOperation.replace(qualifiedTypeName, File.separatorChar, '/');
}
return this.accessRuleSet.getViolatedRestriction(qualifiedTypeName);
}
COM: <s> return the first access rule which is violated when accessing a given </s>
|
funcom_train/36246137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int showModalDialog() {
wizardDialog.setModal(true);
wizardDialog.pack();
/*if (bRatMode) {
wizardDialog.setSize(new Dimension(WIN_WIDTH, WIN_HEIGHT));
bRatMode = false;
}*/
wizardDialog.setLocationRelativeTo(null);
wizardDialog.setVisible(true);
return returnCode;
}
COM: <s> convienence method that displays a modal wizard dialog and blocks </s>
|
funcom_train/1711720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeStringTable() {
stringTable = new byte[8192][];
for (int i=0; i<256; i++) {
stringTable[i] = new byte[1];
stringTable[i][0] = (byte)i;
}
tableIndex = 258;
bitsToGet = 9;
}
COM: <s> initialize the string table </s>
|
funcom_train/17626722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAttributesToTag(TagNode tag, Map attributes) {
if (attributes != null) {
Map tagAttributes = tag.getAttributes();
Iterator it = attributes.entrySet().iterator();
while (it.hasNext()) {
Map.Entry currEntry = (Map.Entry) it.next();
String attName = (String) currEntry.getKey();
if ( !tagAttributes.containsKey(attName) ) {
String attValue = (String) currEntry.getValue();
tag.addAttribute(attName, attValue);
}
}
}
}
COM: <s> add attributes from specified map to the specified tag </s>
|
funcom_train/1797233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludeReturns(Boolean includeReturns) {
if (includeReturns == null) {
includeReturns = false;
}
// check if setting to existing value
if (!this.includeReturns.equals(includeReturns)) {
// set to new value for customer parameter
this.includeReturns = includeReturns;
setStringCustomParameter("returns",
!includeReturns ? null : includeReturns.toString());
}
}
COM: <s> sets the flag indicating whether returns and performance stats should be </s>
|
funcom_train/24934448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public I_DirectedLine draw(final Graphics graphic) {
final ArrayList fragments = fragmentLine();
for (final Iterator iterator = fragments.iterator(); iterator.hasNext();) {
final I_DirectedLine line = (I_DirectedLine) iterator.next();
line.draw(graphic);
}
return this;
}
COM: <s> draws the dashed line into the given graphic </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.