__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24516813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRowHeightUI(boolean respectRowSetFlag) {
if (respectRowSetFlag && isXTableRowHeightSet)
return;
int minimumSize = getFont().getSize() + 6;
int uiSize = UIManager.getInt(UIPREFIX + "rowHeight");
setRowHeight(Math.max(minimumSize, uiSize != 0 ? uiSize : 18));
isXTableRowHeightSet = false;
}
COM: <s> internal unsucessful hack to try and set row height to something more </s>
|
funcom_train/50301975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsGroup addGroup(String name, String description, int flags, String parent) throws CmsException {
return (m_rb.addGroup(m_context.currentUser(), m_context.currentProject(), name, description, flags, parent));
}
COM: <s> adds a new group to the cms </s>
|
funcom_train/42709473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonUpdateAdress() {
if (jButtonUpdateAdress == null) {
jButtonUpdateAdress = new JButton();
jButtonUpdateAdress.setActionCommand("UpdateAdress");
jButtonUpdateAdress.setBounds(new Rectangle(140, 270, 121, 21));
jButtonUpdateAdress.setText("Update");
}
return jButtonUpdateAdress;
}
COM: <s> this method initializes j button update adress </s>
|
funcom_train/19242933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(final String key) {
String value = null;
try {
value = getResourceBundle().getString(key);
} catch (MissingResourceException e) {
Trace.fatal(CLASS, this, "getString", "Couldn't find value for: "
+ key, e);
}
if (value == null) {
value = "Could not find resource: " + key + " ";
}
return value;
}
COM: <s> this method returns a string from the resource bundle </s>
|
funcom_train/3379258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encode(DerOutputStream out) throws IOException {
DerOutputStream theChoice = new DerOutputStream();
if (fullName != null) {
fullName.encode(theChoice);
out.writeImplicit(
DerValue.createTag(DerValue.TAG_CONTEXT, true, TAG_FULL_NAME),
theChoice);
} else {
relativeName.encode(theChoice);
out.writeImplicit(
DerValue.createTag(DerValue.TAG_CONTEXT, true,
TAG_RELATIVE_NAME),
theChoice);
}
}
COM: <s> encodes the distribution point name and writes it to the der output stream </s>
|
funcom_train/23453327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSParameterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ServiceParameter_sParameter_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ServiceParameter_sParameter_feature", "_UI_ServiceParameter_type"),
ProfilePackage.Literals.SERVICE_PARAMETER__SPARAMETER,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the sparameter feature </s>
|
funcom_train/16791179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildItemMap(TreeItem[] items, Map<Directory, TreeItem> itemMap) {
for (TreeItem item: items) {
if (item.getData() != null)
itemMap.put((Directory) item.getData(), item);
this.buildItemMap(item.getItems(), itemMap);
}
}
COM: <s> build a map of the existing directory structure </s>
|
funcom_train/12188813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmpty() throws Exception {
Sequence sequence = factory.createSequence(new Item[0]);
Function function = new SubsequenceFunction();
Value result;
result = invokeSubsequence(function, sequence, 1);
assertSame(sequence, result);
result = invokeSubsequence(function, sequence, -2);
assertSame(sequence, result);
result = invokeSubsequence(function, sequence, 100, 40);
assertSame(sequence, result);
}
COM: <s> test that an empty input sequence returns an empty sequence </s>
|
funcom_train/9533174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private Ontology getDestinationOntology() {
// if (!hasDestinationCharField()) return null;
// CharField cf = getDestinationCharField();
// if (!cf.hasOntologies()) {
// Ontology ont = new Ontology(cf.getName());
// cf.addOntology(ont);
// }
// return cf.getOntology(); // just assume theres only 1 ontol
// }
COM: <s> if char field doesnt have ontology yet create one </s>
|
funcom_train/3703267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List convert(List listTuples) {
List listOut = new LinkedList();
Iterator it = listOut.iterator();
Tuple t;
while (it.hasNext()) {
t = (Tuple) it.next();
listOut.add(convert(t));
}
return (listOut);
} // of method
COM: <s> convert into a list of context tuple sources </s>
|
funcom_train/43683432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String selectRole() {
if(getModel() == null || getModel().getId() == null ||
user == null || user.getId() == null) {
throw new ApplicationException("Please select a role at least.");
}
selectRole(getModel().getId(), user.getId(), true);
return JSON;
}
COM: <s> checkbox role session </s>
|
funcom_train/4969408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadGlobalConfiguration() throws Exception {
XToolsConfiguration c = XToolsConfiguration.getInstance();
minorityStrongMultiStarPercentage = c.getFloat(
ConfigSection.MINORITIES, "strongMultiStarPercentage",
minorityStrongMultiStarPercentage);
assignOneStrongMultiStar = c.getBoolean(ConfigSection.MINORITIES,
"assignOneStrongMultiStar", assignOneStrongMultiStar);
minorityTotalPercentage = c.getFloat(ConfigSection.MINORITIES,
"totalPercentage", minorityTotalPercentage);
minDistanceMinorities = c.getFloat(ConfigSection.MINORITIES,
"minDistance", minDistanceMinorities);
}
COM: <s> loads global values from configuration </s>
|
funcom_train/34339468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEnviar() {
if (Enviar == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
Enviar = new Command("Enviar", Command.OK, 0);//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return Enviar;
}
COM: <s> returns an initiliazed instance of enviar component </s>
|
funcom_train/6490090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunsValid(boolean state) {
LogTools.trace(logger, 25, "Cycle.setRunsValid("+state+")");
_runsValid = state;
notifyListeners(new CycleEvent(this, state ? CycleEvent.RUNS_VALID : CycleEvent.RUNS_INVALID));
}
COM: <s> set the invalidated status of the run list </s>
|
funcom_train/16546676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Record getRecord(String type, String identifier) throws RetrievalException {
log.debug("retrieving " + type + " " + identifier);
identifier = identifierFromURI(identifier); // TODO
if (identifier == null) return null;
for (DataStore store : stores) {
Record record = store.get(type, identifier);
if (record != null) return record;
}
return null;
}
COM: <s> retrieve a record from the owning repository </s>
|
funcom_train/13261178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findRegionNodes() {
//nodes of ther region must be found, using their names
network = sim.getNetwork();
regionNodes = new NetNode[regionNodeNames.length];
for (int i = 0; i < regionNodeNames.length; i++) {
//TODO: check wrong names...?
regionNodes[i] = network.getNode(regionNodeNames[i]);
}
}
COM: <s> finds and sets the net node objects using the node names </s>
|
funcom_train/17788398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int DecodeLengthsNew(int lblock, int codingPasses) throws EOFException, IOException {
int numBits;
int length = 0;
numBits = lblock + (int) Math.floor(Math.log(codingPasses) / Math.log(2D));
for (int nb = numBits - 1; nb >= 0; nb--) {
length += (1 << nb) * getBit();
}
return (length);
}
COM: <s> decode the length of codeword segment </s>
|
funcom_train/23716466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem2 () {
if (stringItem2 == null) {//GEN-END:|79-getter|0|79-preInit
// write pre-init user code here
stringItem2 = new StringItem ("PODTYTU\u0141: \n", null);//GEN-LINE:|79-getter|1|79-postInit
// write post-init user code here
}//GEN-BEGIN:|79-getter|2|
return stringItem2;
}
COM: <s> returns an initiliazed instance of string item2 component </s>
|
funcom_train/36930430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readLoop() {
if (!(ttype == TT_WORD && sval.equals("outer"))) {
CCLog.error("Format Error:expecting 'outer' on line " + lineno());
return;
}
getToken();
if (!(ttype == TT_WORD && sval.equals("loop"))) {
CCLog.error("Format Error:expecting 'loop' on line " + lineno());
} else{
skipToNextLine();
}
}
COM: <s> method that reads outer loop and then eol </s>
|
funcom_train/39973828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getArea() {
float area = 0;
int numPoints = vertices.size();
for (int i = 0; i < numPoints; i++) {
Vec2D a = vertices.get(i);
Vec2D b = vertices.get((i + 1) % numPoints);
area += a.x * b.y;
area -= a.y * b.x;
}
area *= 0.5f;
return area;
}
COM: <s> computes the area of the polygon provided it isnt self intersecting </s>
|
funcom_train/2763024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMetaInfoString() {
return "["+getMetaName()+"/"+_user+"@"+_url+" accessing a '"+_databaseProductName+"' version '"+_databaseProductVersion+"' using a '"+_driverName+"' version '"+_driverVersion+"']";
}
COM: <s> returns a string representing the meta data </s>
|
funcom_train/14178151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String loadGame(int gameID) {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction tx = null;
List result = null;
try {
tx = session.beginTransaction();
Query q = session
.createQuery("from GameState where GAMEID like :un");
q.setInteger("un", gameID);
result = q.list();
tx.commit();
} catch (HibernateException he) {
if (tx != null) {
tx.rollback();
}
throw he;
}
gameStatus = (GameState) result.get(0);
return gameStatus.getData();
}
COM: <s> return the saved game data </s>
|
funcom_train/19849537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadCollaborations() throws JAXBException, IOException {
this.collaborations.clear();
for (Collaboration c : ((Collaborations) JAXBContext.newInstance(Collaborations.class)
.createUnmarshaller().unmarshal(
new File(
this.path + File.separatorChar + this.collaborationsFile))).getCollaboration()) {
addCollaboration(c);
}
}
COM: <s> load collaboration data from its xml file </s>
|
funcom_train/38429696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getBlock() {
String encodedType = URLEncoder.encode( sLocationType );
String encodedName = URLEncoder.encode( mName );
String locationBlock =
encodedName + "\n" +
encodedType + "\n" +
mLatitude + "\n" +
mLongitude + "\n" +
mAltitude + "\n" +
mRadius + "\n";
return locationBlock;
}
COM: <s> gets this location encoded as a whitespace delimited string </s>
|
funcom_train/44118511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCodedFont(byte font, ByteArrayOutputStream afpdata) {
// Avoid unnecessary specification of the font
if (String.valueOf(font).equals(_currentFont)) {
return;
} else {
_currentFont = String.valueOf(font);
}
afpdata.write(new byte[] { 0x03, (byte) 0xF1, font, }, 0, 3);
}
COM: <s> the set coded font local control sequence activates a coded font and </s>
|
funcom_train/2537064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadStyles(AbstractMTApplication app, InputSource source) {
List<CSSStyle> styles= new ArrayList<CSSStyle>();
cssh = new CSSHandler(app, styles);
pa = new Parser();
pa.setDocumentHandler(cssh);
try {
pa.parseStyleSheet(source);
} catch (CSSException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> load styles from input source </s>
|
funcom_train/45486440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton8Del() {
if (jButton8Del == null) {
jButton8Del = new JButton();
jButton8Del.setBounds(new Rectangle(951, 196, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton8Del.setFont(font);
jButton8Del.setForeground(Color.red);
jButton8Del.setText("8");
}
return jButton8Del;
}
COM: <s> this method initializes j button8 del </s>
|
funcom_train/14601503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showAddDocument() {
if(addDocumentDialog != null) {
return;
}
addDocumentDialog = new JDialog(ui.UserInterface.win, "YART : Add a Document");
addDocumentDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
documentView = new DocumentView(this);
addDocumentDialog.add(documentView);
addDocumentDialog.setLocationRelativeTo(ui.UserInterface.win);
addDocumentDialog.pack();
addDocumentDialog.setVisible(true);
}
COM: <s> show the add a new document dialog box </s>
|
funcom_train/32112364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoreMaterial getCoreMaterial(int coreMaterialId) {
if((coreMaterialId < 0) || (coreMaterialId >= vectorCoreMaterial.size())) {
//TODO afegir exepcio
//CalError::setLastError(CalError::INVALID_HANDLE, __FILE__, __LINE__);
return null;
}
return vectorCoreMaterial.get(coreMaterialId);
}
COM: <s> provides access to a core material </s>
|
funcom_train/37821930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkIfPartitionsAreValid() {
int sum = 0;
Set<Event> all = new HashSet<Event>();
for (Partition p : observations) {
sum += p.getElements().size();
all.addAll(p.getElements());
}
if (sum == params.getEvents().size() && all.equals(params.getEvents())) {
bForward.setEnabled(true);
bNew.setEnabled(false);
bFill.setEnabled(false);
}
}
COM: <s> checks if the current observation set is valid which means all events are </s>
|
funcom_train/14640230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRawFrom(String rawFrom) {
if (rawFrom==null)
{
throw new RuntimeException("rawFrom must not be null.");
}
String oldRawFrom = this.rawFrom;
this.rawFrom = rawFrom;
this.firePropertyChange("rawFrom",oldRawFrom,this.rawFrom);
}
COM: <s> sets the raw from </s>
|
funcom_train/5272382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
int counter = 0;
while(go) {
if(counter % 60 == 1) {
try {
sendSocket.send(sendTo, sendWhat);
Thread.sleep(1000);
}
catch(InterruptedException e) {
DEBUG.error("LANkeepalive: run: sleep thrown exception, exiting to prevent flooding net!");
go = false;
}
} else {
try {
Thread.sleep(1000);
}
catch(InterruptedException e) {
DEBUG.error("LANkeepalive: run: sleep thrown exception, exiting to prevent flooding net!");
go = false;
}
}
counter++;
}
}
COM: <s> main method in which sending keepalives is performed </s>
|
funcom_train/9853673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return getClass().getName() +"["+ host +","+ getPort() +","+ username +","+
nick +","+ realname +","+ pass +","+ isConnected() +"]";
}
COM: <s> generates a code string code with some information about the instance of </s>
|
funcom_train/3474939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WindowDeactivation (Environment env, StructureElement[] children) {
super(env, children);
StructureElement[] filteredChildren = getChildren ("jacareto.record.WindowEventRecordable");
this.windowName = ((WindowEventRecordable) filteredChildren[0]).getWindowName ();
this.windowTitle = ((WindowEventRecordable) filteredChildren[0]).getWindowTitle ();
}
COM: <s> creates a new window deactivation structure element </s>
|
funcom_train/9535722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String data) {
try {
myLogger.debug(myThreadName + COLON + "Writing data");
if (isChunked(data)) {
sendChunkedData(data);
} else {
myOutputStream.write(data.getBytes());
myOutputStream.flush();
}
} catch (IOException ioe) {
myLogger.error(myThreadName + COLON + ioe.getMessage(), ioe);
}
}
COM: <s> this method writes data to the output stream </s>
|
funcom_train/41383572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetBallPosition() {
ball.resetPosition();
// The ball is reset to the position, so the status is not restored
Macadam.setRestored(false);
// Disable game over text
if ((InGameState) GameStateManager.getInstance().getChild(
GameStates.IN_GAME) != null)
((InGameState) GameStateManager.getInstance().getChild(
GameStates.IN_GAME)).setGameOver(false);
}
COM: <s> resets the ball position placing it over the launch pad </s>
|
funcom_train/32867889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void groupChatPresence(String sNewPresence) {
Enumeration e = groupChats.keys();
while (e.hasMoreElements()) {
Object obj = groupChats.get(e.nextElement());
((GroupChat)obj).presenceChange(moJabberComm, sNewPresence);
}
}
COM: <s> user has changed his her presence </s>
|
funcom_train/18742685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphJEdge computeJEdge(E edge, boolean bidirectional) {
GraphJEdge result = createJEdge(edge);
result.setBidirectional(bidirectional);
result.refreshAttributes();
JEdgeLayout layout = this.layoutMap.getLayout(edge);
if (layout != null) {
result.getAttributes().applyMap(layout.toJAttr());
}
return result;
}
COM: <s> creates a new j edge using </s>
|
funcom_train/19104920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inquiryCompleted( int completionType ){
switch( completionType ){
case INQUIRY_ERROR:
System.err.println("BT Locator: An error occured during the last inquiry.");
break;
case INQUIRY_TERMINATED:
System.err.println("BT Locator: The last inquiry was interrupted.");
break;
default:
System.out.println("BT Locator: Finished device enquiry.");
break;
}
// wake up locator thread
synchronized( this ){
try{
this.notifyAll();
}
catch( Exception e ){
// ignore
}
}
}
COM: <s> notifies waiting threads when bluetooth inquiry is finished </s>
|
funcom_train/29985204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createZip (File dir, File zipfile) throws IOException {
ZipOutputStream zos = new ZipOutputStream (new FileOutputStream (zipfile));
zos.setMethod (ZipOutputStream.DEFLATED);
zos.setLevel (9);
if (!(dir.getName ().equals (".")))
addDir ("." + File.separatorChar + dir.getName () + File.separatorChar, dir, zos);
else
addDir ("", dir, zos);
zos.close ();
}
COM: <s> create the zipfile and add the directory to it </s>
|
funcom_train/8357614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCmbtype() {
if (cmbtype == null) {
cmbtype = new JComboBox();
cmbtype.setModel(new DefaultComboBoxModel(new Object[] {TYPE_CSVM, TYPE_NUSVM}));
cmbtype.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateControls();
}
});
}
return cmbtype;
}
COM: <s> this method initializes cmbtype </s>
|
funcom_train/10628673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSignumNegative() {
byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
int aSign = -1;
BigInteger aNumber = new BigInteger(aSign, aBytes);
assertEquals("incorrect sign", -1, aNumber.signum());
}
COM: <s> signum of a negative number </s>
|
funcom_train/7389812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void abrirUsuarios(){
log.log("abrirUsuarios()::Inicializado", PGLog.DEBUG);
Rectangle tmp = new Rectangle();;
boolean reabierto = false;
try{
if (listUsers.isVisible()) {
tmp = listUsers.getBounds();
reabierto = true;
listUsers.setVisible(false);
}
} catch (Exception e){
// ya estaba abierto.
}
listUsers = new ListUsers(this);
if (reabierto) listUsers.setBounds(tmp);
listUsers.setVisible(true);
desktop.add(listUsers);
}
COM: <s> open user windows </s>
|
funcom_train/50912122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String property, Object value) {
if (property != null) {
if (propertyMap == null) {
propertyMap = new HashMap<String, Object>();
}
if (value == null) {
propertyMap.remove(property);
} else {
propertyMap.put(property, value);
}
}
}
COM: <s> set a property on the object </s>
|
funcom_train/48128461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNombreColumnaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Columna_NombreColumna_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Columna_NombreColumna_feature", "_UI_Columna_type"),
ERSMAPackage.Literals.COLUMNA__NOMBRE_COLUMNA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nombre columna feature </s>
|
funcom_train/8685519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getSourceContainer(String classname) throws IOException {
String sourceLocation = classname.replace('.', '/') + ".java";
// we look through the source path elements. If the element is a dir
// we look for the file. If it is a zip, we look for the zip entry.
// This isn't normal for source paths but we get it for free
return getResourceContainer(sourceLocation, sourcePath.list());
}
COM: <s> get the file that contains the class source </s>
|
funcom_train/10658504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Socket getSocket(String host, int port) throws IOException {
if (proxySet) {
return new Socket(proxyHost, proxyPort);
} else if (enableDirect) {
return new Socket(host, port);
} else {
// rmi.81=HTTP proxy is not set
throw new NoRouteToHostException(Messages.getString("rmi.81")); //$NON-NLS-1$
}
}
COM: <s> returns new socket connected to specified host and port probably </s>
|
funcom_train/1804023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCountries(Collection<String> countries) {
if (countries == null || countries.isEmpty()) {
clearCountry();
} else {
this.countryState = CountryState.COUNTRIES;
LinkedHashSet<String> set = new LinkedHashSet<String>();
for (String country : countries) {
set.add(country);
}
this.countries = Collections.unmodifiableSet(set);
}
}
COM: <s> defines the countries to which the rating applies </s>
|
funcom_train/7850787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long longArg(final int n) throws ArgumentTypeMismatchException, InsufficientArgsException {
final Object a = getArg(n);
if (a == null) {
throw new ArgumentTypeMismatchException(n, "long", "null");
}
try {
return ((Number) a).longValue();
} catch (final ClassCastException e) {
throw new ArgumentTypeMismatchException(n, "long", (a != null ? a.getClass().toString() : "null"));
}
}
COM: <s> helper function for longs </s>
|
funcom_train/8343433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendPopupMenuItems() {
JMenuItem currentItem;
if (menu.getSubElements().length > 0) {
menu.addSeparator();
}
currentItem = new JMenuItem(EXPAND_ENTIRE_TREE);
currentItem.addActionListener(sTreePaneMenuActionListener);
menu.add(currentItem);
currentItem = new JMenuItem(COLLAPSE_ENTIRE_TREE);
currentItem.addActionListener(sTreePaneMenuActionListener);
menu.add(currentItem);
currentItem = new JMenuItem(PRINT_TREE);
currentItem.addActionListener(sTreePaneMenuActionListener);
menu.add(currentItem);
}
COM: <s> append the expand collapse all options to the popup menu </s>
|
funcom_train/39534687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void retrieveModulePopupItems(){
//getting all the loaded modules
Collection<Module> modules=getSVGEditor().getSVGModuleLoader().getModules();
Collection<PopupItem> itemsList=null;
//for each module, gets the popup items linked with the given list of nodes
for(Module module : modules){
if(module!=null){
//getting the list of the popup items of each module
itemsList=module.getPopupItems();
if(itemsList!=null){
for(PopupItem item : itemsList){
if(item!=null){
popupItems.put(item.getId(), item);
}
}
}
}
}
}
COM: <s> retrieves all the popup items from the modules </s>
|
funcom_train/10416494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDistributable(boolean distributable) {
boolean oldDistributable = this.distributable;
this.distributable = distributable;
support.firePropertyChange("distributable",
new Boolean(oldDistributable),
new Boolean(this.distributable));
// Bugzilla 32866
if(getManager() != null) {
if(log.isDebugEnabled()) {
log.debug("Propagating distributable=" + distributable
+ " to manager");
}
getManager().setDistributable(distributable);
}
}
COM: <s> set the distributable flag for this web application </s>
|
funcom_train/4193453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStatus()
{ switch (status)
{ case D_INIT : return "D_INIT";
case D_WAITING : return "D_WAITING";
case D_SUBSCRIBED : return "D_SUBSCRIBED";
case D_PENDING : return "D_PENDING";
case D_ACTIVE : return "D_ACTIVE";
case D_TERMINATED : return "D_TERMINATED";
default : return null;
}
}
COM: <s> gets the dialog state </s>
|
funcom_train/50310502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notify(Object data) {
CallBackData cbData = (CallBackData)data;
Logger.log(Logger.DEBUG,
"Jobs: Call-back from job ID: " + cbData.getJobId(), this);
Task theSchedule = (Task)(jobs.get(new Integer(cbData.getJobId())));
if ((theSchedule != null)&&(theSchedule.isCallback()==true)) {
theSchedule.getTheClient().notify(cbData);
}
}
COM: <s> method to be executed by job call backs </s>
|
funcom_train/43245371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoPhoneNumber() {
System.out.println("getECTwoPhoneNumber");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoPhoneNumber();
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 get ectwo phone number method of class org </s>
|
funcom_train/38157316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireDownloadCompleted(Command command) {
TransferEvent evt = createTransferEvent(command);
TransferListener[] listeners = (TransferListener[])
listenerList.getListeners(TransferListener.class);
if(listeners.length == 0) {
downloadCompletedQueue.add(evt);
}
else {
for(int i = 0; i < listeners.length; i++) {
listeners[i].downloadCompleted(evt);
}
}
}
COM: <s> notify listeners that a download has been completed </s>
|
funcom_train/39252994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUnstyled() {
if (this.foreground != null)
return false;
if (this.background != null)
return false;
if (this.fontStyle != SWT.NORMAL)
return false;
if(!this.fontName.equals("宋体"))
return false;
if(this.fontSize != 9)
return false;
return true;
}
COM: <s> returns whether or not the receiver is unstyled i </s>
|
funcom_train/32776660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Length getLength(int index) {
if (index < 0 || index >= size()) {
// empty path or invalid index
return new Length();
}
Length length = new Length();
Position p = getPosition(0);
Space space = p.getSpace();
for (int i = 1; i <= index; i++) {
Position next = getPosition(i);
length = length.add(space.getDistance(p, next));
p = next;
}
return length;
}
COM: <s> returns the length of this path from the start position index 0 to </s>
|
funcom_train/51104416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPropertyMappingName(Element entityMapping, String propertyXmlTag) {
for (Iterator it = XMLUtil.getChildren(entityMapping).iterator(); it.hasNext();) {
Element propertyMapping = (Element) it.next();
if (propertyXmlTag.equals(propertyMapping.getAttribute("xmlTag"))) {
return propertyMapping.getAttribute("name");
}
}
return null;
}
COM: <s> returns the property that is associated with the passed in xml tag </s>
|
funcom_train/35361939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void config(Configuration config, String prefix, String name) {
// for now we will use just one list for anything. This can be modified
// by having a map from TokenType to String[] or something....
items = config.getPrefixPropertyList(prefix, name + ".Items");
}
COM: <s> the completions will for now reside on another properties style file </s>
|
funcom_train/5374448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection (int start) {
checkWidget ();
/*
if (!OS.IsUnicode && OS.IsDBLocale) start = wcsToMbcsPos (start);
OS.SendMessage (handle, OS.EM_SETSEL, start, start);
OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0);
*/
setSelection(start, textHandle.value.length ());
}
COM: <s> sets the selection </s>
|
funcom_train/45598604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeFile(FileInputStream inFile, FileOutputStream outFile) throws IOException {
//Buffer is 2 kilobytes
byte[] buf = new byte[2048];
int read;
//Reads buffering, and stops if should
while ((read = inFile.read(buf)) > 0 && !stopped)
outFile.write(buf, 0, read);
inFile.close();
}
COM: <s> gets data from input file and appends it to output </s>
|
funcom_train/10533011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File serializeCBCSS(ControlBeanContextServicesSupport cbcss, String serFileName) throws IOException {
File serFile = File.createTempFile(serFileName, "ser");
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(serFile));
oos.writeObject(cbcss);
oos.close();
return serFile;
}
COM: <s> serialize a control bean context services support instance </s>
|
funcom_train/927623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveRecentFiles() {
//Create directory if it doesnt exist
File dir = new File(m_sDirectory);
if (!dir.exists()) {
dir.mkdir();
}
File rmFile = new File(m_sDirectory + m_sFileName);
try {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(rmFile));
oos.writeObject(m_RecentFiles);
oos.close();
} catch(Exception e) {
e.printStackTrace();
}
}
COM: <s> save recentfiles list to file </s>
|
funcom_train/50366212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
MTable clone = (MTable) super.clone();
clone.innerTable = new ArrayList<MethodInfoStructure>();
for(MethodInfoStructure mis : innerTable) {
clone.addElement((MethodInfoStructure) mis.clone());
}
clone.infoStructuresFactory = infoStructuresFactory;
clone.setDna(dna);
return clone;
}
COM: <s> clone the current code methods table code instance </s>
|
funcom_train/1383069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PlanningMese getGiugno() {
if (giugno == null) {
try {
giugno = new PlanningMese(PlanningMese.GIUGNO, dbm, listener, padre);
giugno.setPreferredSize(new Dimension(600, 300)); // Generated
dbm.addDBStateChange(giugno);
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return giugno;
}
COM: <s> this method initializes giugno </s>
|
funcom_train/50427535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTuples() {
if (sortedTableListCache == null) getSortedTables();
if (sortedTableListCache.size() == 1) return ((Table) sortedTableListCache.get(0)).getTuples();
if (isRemote()) importDatabaseToLocal();
return joinAll();
}
COM: <s> this is the outer join function </s>
|
funcom_train/6206453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processProjectDeltas(IProject project, IResourceDelta delta) throws CoreException {
try {
handleProjectDeltas(project, delta);
if (project.isAccessible()) {
IGaijinProject gaijinProject = GaijinCore.getModel().getGaijinProject(project);
if (gaijinProject != null) {
processApplicationDeltas(gaijinProject, delta);
}
}
} catch (GaijinModelException e) {
GaijinCore.log(e.getStatus());
} catch (CoreException e) {
GaijinCore.log(e.getStatus());
}
}
COM: <s> process deltas related to a given project if it has a gaijin nature </s>
|
funcom_train/50084101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer resultString = new StringBuffer();
resultString.append("LonePair(");
resultString.append(this.hashCode());
if (atom != null) {
resultString.append(", ").append(atom.toString());
}
resultString.append(')');
return resultString.toString();
}
COM: <s> returns a one line string representation of this lone pair </s>
|
funcom_train/9006110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String identifier, String key, String value) {
Key dhtKey = new KeyImpl(identifier);
HashMap<String, String> data = retrieve(identifier);
try {
// Clear old value.
chord.remove(dhtKey, data);
// Append new value to end.
data.put(key, value);
// Put updated HashMap back into DHT.
chord.insert(dhtKey, data);
} catch (ServiceException e) {
throw new RuntimeException(e);
}
}
COM: <s> writes a key value pair to the dht </s>
|
funcom_train/14609734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void swap(int x1, int y1, int x2, int y2) {
int temp = nPuzzleData[y1 * nGridWidth + x1];
nPuzzleData[y1 * nGridWidth + x1] = nPuzzleData[y2 * nGridWidth + x2];
nPuzzleData[y2 * nGridWidth + x2] = temp;
++_counterValue;
}
COM: <s> swaps two pieces of the puzzle </s>
|
funcom_train/20884954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testXML() {
check(XML, "<root></root>", 0, TestDTOA.class);
check(XML, "<TestDTOA><fieldA>a</fieldA><fieldB>b</fieldB></TestDTOA>", 1, TestDTOA.class);
}
COM: <s> tests full cycle for xml </s>
|
funcom_train/592883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getKey(NodeEvaluation eval) {
Object key = eval.getNode().getTypedValue();
if (key.getClass() != Integer.class) {
throw new EvaluationException
("Attempting to index into an array using a non-integer index: " + key);
}
return (Integer) key;
}
COM: <s> fetches the key and casts unboxes it to an int </s>
|
funcom_train/5678864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (DEBUG) System.out.println("Splash.start()");
SwingUtilities.invokeLater( new SplashRunner( this) {
public void run() {
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
int width = getSplash().getSize().width;
int height = getSplash().getSize().height;
getSplash().setLocation( (d.width - width)/2, (d.height - height)/2);
getSplash().show();
}
});
}
COM: <s> shows the splash screen </s>
|
funcom_train/21305997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton(new ImageIcon(getClass().getResource("/irudiak/g2.png")));
jButton1.setBackground(Color.blue);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (jButton1.getBackground()==Color.blue)
jButton1.setBackground(Color.yellow);
else
jButton1.setBackground(Color.blue);
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/44717269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface Manipulator {
/**
* Performs some function on the Property and/or DataObject.
*
* @param p The Property
* @param data The DataObject that p belongs to.
*
* @pre data.getObjectType.hasProperty(p.getName());
*
* @throws Exception on any error in manipulation.
*/
public void manipulate(Property p, DataObject data) throws Exception;
}
COM: <s> predicate provides the manipulate method for manipulating some data object </s>
|
funcom_train/18255437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createThreads() {
if (factory.getThreads() != executors.length) {
executors = new ExecutionThread[factory.getThreads()];
for (int i = 0; i < executors.length; i++) {
executors[i] = new ExecutionThread(mainStrategy + " thread " + i, mainStrategy);
}
}
}
COM: <s> creates the threads </s>
|
funcom_train/1034097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescriptor() {
// FIXME: this is not completely accurate at this point (for
// example, it knows nothing about the packages for compound
// types)
if (clazz != null) {
return descriptor(clazz);
}
if (elementType != null) {
return "[" + descriptor(elementType.getName());
}
return descriptor(name);
}
COM: <s> returns the descriptor internal type signature corresponding to </s>
|
funcom_train/49247184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyStream(InputStream inputStream, OutputStream outputStream) throws IOException {
byte[] buffer = new byte[10240];
int length = inputStream.read(buffer);
int byteCounter = length;
while (length > -1) {
outputStream.write(buffer, 0, length);
length = inputStream.read(buffer);
if (length > 0) {
byteCounter = byteCounter + length;
}
}
inputStream.close();
outputStream.close();
}
COM: <s> copies data from an input stream to and output stream and closes both </s>
|
funcom_train/18488391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpThreadInfo() {
System.out.println("Full Java thread dump");
long[] tids = tmbean.getAllThreadIds();
ThreadInfo[] tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
for (ThreadInfo ti : tinfos) {
printThreadInfo(ti);
}
}
COM: <s> prints the thread dump information to system </s>
|
funcom_train/18304379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
// Notify connection listeners of the connection closing if done hasn't already been set.
if (!done) {
synchronized (connectionListeners) {
for (Iterator i=connectionListeners.iterator(); i.hasNext(); ) {
ConnectionListener listener = (ConnectionListener)i.next();
listener.connectionClosed();
}
}
}
done = true;
}
COM: <s> shuts the packet reader down </s>
|
funcom_train/31646884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performTextAction(Mobile m, String s){
Mobile target = m.getRoom().findMobile(s);
if(target == null) {
m.toUser(new MudData("text","That person doesn't exist."));
}
else {
doCombat(m,target);
}
}
COM: <s> perform the kill action </s>
|
funcom_train/9236047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTrimmed() {
final Object[] listenerList = listeners.getListenerList();
for (int i = 0; i < listenerList.length; i += 2) {
if (listenerList[i] == IRCDocumentListener.class) {
((IRCDocumentListener) listenerList[i + 1]).trimmed(iterators.size());
}
}
}
COM: <s> fires the trimmed method on all listeners </s>
|
funcom_train/45538029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
fCodeScanner= null;
fMultilineCommentScanner= null;
fSinglelineCommentScanner= null;
fStringScanner= null;
fJSCDocScanner= null;
if (fColorManager != null) {
fColorManager.dispose();
fColorManager= null;
}
if (fPreferenceStore != null) {
fPreferenceStore.removePropertyChangeListener(fPreferenceListener);
fPreferenceStore= null;
if (fCorePreferenceStore != null) {
fCorePreferenceStore.removePropertyChangeListener(fPreferenceListener);
fCorePreferenceStore= null;
}
fPreferenceListener= null;
}
}
COM: <s> disposes all the individual tools of this tools collection </s>
|
funcom_train/46982209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProjectToURL(String url, HashSet<String> userGroupSet) {
String urlID = getURLID(url);
if(urlID == null) {
urlID = getNewValidURLID();
urlHashMap.put(urlID, url);
}
serviceUrlToUserGroupSet.put(urlID, userGroupSet);
}
COM: <s> updates the service url to user group mapping for the given url </s>
|
funcom_train/20110134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetActiveSiteEnrollmentByType_ReturnsCommandResult() {
String type = "project";
Collection result = service.getActiveSiteEnrollmentByType(userContext1, type);
GetActiveSiteEnrollmentByTypeInvoker cmd =
(GetActiveSiteEnrollmentByTypeInvoker)
service.getExecuteSiteServiceCall_CommandArg();
assertEquals(service.siteResultCollection(cmd.getResult()), result);
}
COM: <s> verifies that collection returned from get active site enrollment by type </s>
|
funcom_train/36188794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testErrorReComposeAtomicPlan() throws Exception {
CompositionPlan plan;
this.activate(compContext);
this.setServiceDiscovery(serviceDiscovery);
ArrayList<PssService> failedServices = new ArrayList<PssService> ();
CompositionPlan newPlan = this.reComposePlan(failedServices, new CompositionID());
}
COM: <s> test if a recomposition takes place for a plan which was </s>
|
funcom_train/34138984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(Collection<? extends TrackedRect> rects) {
boolean initialized = false;
boolean wasEmpty = false;
synchronized (mRectQueue) {
initialized = mInitialized;
wasEmpty = mRectQueue.isEmpty();
mRectQueue.addAll(rects);
}
if (initialized && wasEmpty) {
next();
}
}
COM: <s> adds a collection of tracked rects to the queue </s>
|
funcom_train/29710324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTreeViewerComposite(Composite parent) {
Composite treeViewerComposite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
treeViewerComposite.setLayout(layout);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 2;
treeViewerComposite.setLayoutData(gridData);
Label label = new Label(treeViewerComposite, SWT.WRAP);
label.setText(_title);
label.setFont(treeViewerComposite.getFont());
createTreeViewer(treeViewerComposite);
Dialog.applyDialogFont(treeViewerComposite);
}
COM: <s> creates the contents of the composite </s>
|
funcom_train/124364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPreviousCard() {
if (getComponentCount() <= 0) {
return;
}
int index = getVisibleChildIndex();
if (index == -1) {
showCard(getComponent(0));
} else if (index == 0) {
showCard(getComponent(getComponentCount() - 1));
} else {
showCard(getComponent(index - 1));
}
}
COM: <s> show the card that was added to this card panel before the currently </s>
|
funcom_train/45389361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPending() {
//#if DEBUG==1
logger.print("CONNECT",Logger.INFO, "connect::isPending: httpComplete="
+ httpComplete + ";httpState=" + httpState);
//#endif
if (httpState == H_BUSY)
return true; // pending activity
return false; // Nothing to cancel
}
COM: <s> method is pending description check if there is a pending network </s>
|
funcom_train/5070007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
updateButtons();
if (folders != null) {
for (Iterator iterator = folders.iterator(); iterator.hasNext();) {
TextMarkerPageFolder v = (TextMarkerPageFolder) iterator.next();
if (!v.verify()) {
iterator.remove();
}
}
}
fLocationsViewer.refresh();
updatePageStatus(Status.OK_STATUS);
}
COM: <s> updates buttons and status based on current mans </s>
|
funcom_train/28350359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Component createConfirmBar() {
Box confirmBar = new Box( BoxLayout.X_AXIS );
confirmBar.setBorder( BorderFactory.createEtchedBorder() );
confirmBar.add( Box.createHorizontalGlue() );
JButton closeButton = new JButton("Close");
closeButton.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent event) {
setVisible( false );
dispose();
}
});
confirmBar.add( closeButton );
return confirmBar;
}
COM: <s> create the confirmation bar </s>
|
funcom_train/9869474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue3(Integer newVal) {
if ((newVal != null && this.value3 != null && (newVal.compareTo(this.value3) == 0)) ||
(newVal == null && this.value3 == null && value3_is_initialized)) {
return;
}
this.value3 = newVal;
value3_is_modified = true;
value3_is_initialized = true;
}
COM: <s> setter method for value3 </s>
|
funcom_train/26455087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cache createCache() {
log.info("Creating new cache");
Cache newCache = new Cache(isMemoryCaching(), isUnlimitedDiskCache(), isBlocking(), algorithmClass, cacheCapacity);
// Give the cache a name
nameCache("applicationCache", newCache);
configureStandardListeners(newCache);
return newCache;
}
COM: <s> creates a cache in this admin </s>
|
funcom_train/644603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alwaysOnTopStateChanged() {
boolean isAlwaysOnTop = frameMain.getCheckBoxMenuItemAlwaysOnTop().isSelected();
frameMain.setAlwaysOnTop(isAlwaysOnTop);
persistenceManager.gettIniFile().setValue(PersistenceManager.Sections.Appearance.name(), PersistenceManager.Keys.alwaysOnTop.name(), isAlwaysOnTop);
}
COM: <s> toggle the always on top option and saves it to the settings </s>
|
funcom_train/3600365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getField(String columnName, int row) throws SQLException {
if (row == -1) {
currentRecord++;
row = currentRecord;
}
int iColumnIndex = searchItem(columnName.toUpperCase());
java.util.LinkedList columnData = ((java.util.LinkedList) lstColumnData.get(iColumnIndex - 1));
return columnData.get(row);
}
COM: <s> get the field value specifed by the column name and the row </s>
|
funcom_train/46617170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getDecorateWindowCheckBox() {
if (decorateWindowCheckBox == null) {
decorateWindowCheckBox = new JCheckBox();
// read from properties
String decorateWindow = LocalProperties.getInstance().getProperty(LocalProperties.PROP_SYSTEM_STYLE_DECORATE);
decorateWindowCheckBox.setSelected(Boolean.valueOf(decorateWindow).booleanValue());
}
return decorateWindowCheckBox;
}
COM: <s> this method initializes decorate window check box </s>
|
funcom_train/29017207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose () {
if (tree != null && !tree.isDisposed()) {
if (this.column > -1 && this.column < tree.getColumnCount()){
TreeColumn treeColumn = tree.getColumn(this.column);
treeColumn.removeControlListener(columnListener);
}
if (treeListener != null) tree.removeTreeListener(treeListener);
}
columnListener = null;
treeListener = null;
tree = null;
item = null;
column = 0;
timer = null;
super.dispose();
}
COM: <s> removes all associations between the tree editor and the row in the tree </s>
|
funcom_train/9941378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCartLabel() {
final int size = objectLookup.getShoppingCartContents().size();
String text = "There are " + size + " files in your shopping cart.";
if (size > MAX_ITEMS_TO_DISPLAY) {
text += " Displaying the first " + MAX_ITEMS_TO_DISPLAY + ".";
}
cartLabel.setText(text);
}
COM: <s> sets the cart label </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.