__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/43153370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertEquals(byte[] expected, byte[] actual) { assertEquals(expected.length, actual.length); for (int i = 0; i < expected.length; i++) { if (expected[i] != actual[i]) { fail("[" + i + "]: expected: " + (int) expected[i] + " actual: " + (int) actual[i]); } } } COM: <s> check if two values are equal and if not throw an exception </s>
funcom_train/18141182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String unformat(String text) { // match all patterns for (int i=0;i<REGEXPNSUB.length;) { Matcher matcher = ((Pattern)REGEXPNSUB[i++]).matcher(text); text = matcher.replaceAll(REGEXPNSUB[i++].toString()); } // done return text; } COM: <s> take formatting away from text </s>
funcom_train/18644906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldComplete() { boolean ret=false; // Can complete if there is no outstanding activities, // and there are either no child sessions or they // are only awaiting completion - and the session // is not pending termination if (getSchedule().size() == 0 && (m_activeChildSessions.size() == 0 || childSessionsAllAwaitingCompletion()) && isPendingTermination() == false) { ret = true; } return(ret); } COM: <s> this method determines whether the session should </s>
funcom_train/17130977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFilesIgnoreErrors() { Model model = global.model; FileService fileService = model.currentSession.getFileService(); model.fileList.clear(); ServiceResult<List<String>> result = fileService.getFileNames(); if ( result.isSuccessful() ) { model.fileList.addAll(result.getData()); } } COM: <s> p tries to load files using configured </s>
funcom_train/44838648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enrollment findById(String id) throws RemoteException { Enrollment enrollment = null; try { enrollment = enrollmentManager.findById(id); } catch (RemoteException rex) { System.out.println("Error on the remote server" + rex); throw new RemoteException("Error on the remote server" + rex); } return enrollment; } COM: <s> finds an enrollment by id </s>
funcom_train/46718326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(Object target, ObjectBox objectBox) { interceptor.interceptFieldSet(target, value, objectBox); if (dependents != null) { for (FieldInterceptorElement interceptorElement : dependents) { if (interceptorElement.decrementDependencyCount() == 0) { interceptorElement.invoke(target, objectBox); } } } } COM: <s> execute the interceptor and then its dependents where applicable </s>
funcom_train/19242206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String filename) { updateBackBuffer(); Image output; if(zoomFactor > 1) { output = backBuffer.getScaledInstance(zoomFactor*bufferWidth, zoomFactor*bufferHeight, Image.SCALE_REPLICATE); } else { output = backBuffer; } BMPEncoder.encode(filename, output); } COM: <s> saves the current view of the backbuffer to file </s>
funcom_train/12522631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void instance_of(TypeBinding typeBinding) { if (DEBUG) System.out.println(position + "\t\tinstance_of:"+typeBinding); //$NON-NLS-1$ countLabels = 0; if (classFileOffset + 2 >= bCodeStream.length) { resizeByteArray(); } position++; bCodeStream[classFileOffset++] = Opcodes.OPC_instanceof; writeUnsignedShort(constantPool.literalIndexForType(typeBinding)); } COM: <s> we didnt call it instanceof because there is a conflit with the </s>
funcom_train/7458115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkEqualsIsConsistent(Message message) { // Object should be equal to itself. assertEquals(message, message); // Object should be equal to a dynamic copy of itself. DynamicMessage dynamic = DynamicMessage.newBuilder(message).build(); checkEqualsIsConsistent(message, dynamic); } COM: <s> asserts that the given proto has symetric equals and hash code methods </s>
funcom_train/38291720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFromReader(Reader reader) throws IOException { String line = null; do { line = getOneLine(reader); if (line != null) { line = line.trim(); if (line.length() == 0) { continue; // empty line } if (line.startsWith("#") || line.startsWith("!")) { continue; // comment line } addProperty(line); } } while (line != null); } COM: <s> add properties from reader </s>
funcom_train/35833187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotateBlock() { synchronized (block_list) { if (current_group != null) { int pivot_x = averageX(current_group); int pivot_y = averageY(current_group); if (canRotateBlockGroup(current_group, pivot_x, pivot_y)) { doBlockGroupRotation(current_group, pivot_x, pivot_y); } } } } COM: <s> rotates a block if possible </s>
funcom_train/21154099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(Object anObject, boolean alwaysClearRuleActiveState){ object = anObject; ruleSet.clearAll(); ruleSet.setResetRuleActiveState(alwaysClearRuleActiveState); matchSession.match(anObject); if(isPostponedNotification()) ruleSet.applyRules(); } COM: <s> activates rules depending upon given data </s>
funcom_train/43903459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getRequiredBoolean(final String name) { final String value = getRequiredString(name); if (value != null) { if (value.equalsIgnoreCase("true")) { return true; } if (value.equalsIgnoreCase("false")) { return false; } illegalArgument(new IllegalArgumentException(value)); } return false; } COM: <s> returns a required boolean value from the command line </s>
funcom_train/5338709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int address, int value) { if (readOnly) { return; } address *= numberOfBytes; int result = 0; for (int i = numberOfBytes - 1; i >= 0; i--) { memory[address + i] = (byte) (value & 0xff); value >>= 8; } } COM: <s> set the value of the addressable unit at the given address </s>
funcom_train/48630659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVilleArrivee() { System.out.println("setVilleArrivee"); String val = ""; Itineraire instance = new Itineraire(); instance.setVilleArrivee(val); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set ville arrivee method of class itineraire </s>
funcom_train/12305251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readLine(InputStream in) throws IOException { StringBuffer buf = new StringBuffer(); int c, length = 0; while(true) { c = in.read(); if (c == -1 || c == '\n' || length > 512) { charsRead++; break; } else if (c == '\r') { in.read(); charsRead+=2; break; } else { buf.append((char)c); length++; } } charsRead += length; return buf.toString(); } COM: <s> read a line of text from the given stream and return it </s>
funcom_train/22187256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPicture(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2) { backbuffer.drawPicture(source, dx, dy, cx1, cy1, cx2, cy2); } COM: <s> draw an unscaled image onto the backbuffer where </s>
funcom_train/21996427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tune getTune(int index) { if (m_tunes == null || index >= m_tunes.size()) { log.warn("getTune: unable to get index " + index ); return new FtuneRec(); } log.debug("getTune for index=" + index); return(Tune)m_tunes.get(index); } COM: <s> get a particular tune from the tunes based on index </s>
funcom_train/10211804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printVal(PrintWriter os, String space, boolean print_decl_p) { if (print_decl_p) { printDecl(os, space, false); os.println(" = " + val + ";"); } else os.print(val); } COM: <s> prints the value of the variable with its declaration </s>
funcom_train/7422645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String writeWebServiceGatewayFactsTypeToYAWL(String s) { if(!codelet.isEmpty()) s += String.format("\t\t\t<codelet>%s</codelet>\n", codelet); s += String.format("\t\t\t<externalInteraction>%s</externalInteraction>\n", externalInteraction.toString().toLowerCase(Locale.ENGLISH)); return s; } COM: <s> serializes the web service information of the decomposition to xml </s>
funcom_train/28887223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteSelectedNode(ActionEvent event) { // can't delete the root node; this check is a failsafe in case // the delete method is somehow activated despite the button being // disabled if (this.selectedNodeObject != null && !this.selectedNodeObject.getText().equals(ROOT_NODE_TEXT)) { this.selectedNodeObject.deleteNode(event); this.selectedNodeObject = null; } } COM: <s> deletes the selected tree node </s>
funcom_train/3405279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder buf = new StringBuilder(); for (Namespace ns : namespaces.values()) { if(buf.length()>0) buf.append(','); buf.append(ns.uri).append('=').append(ns); } return super.toString()+'['+buf+']'; } COM: <s> debug information of whats in this </s>
funcom_train/13561571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ExportStopList(String filename, String systemName) throws IOException{ BufferedWriter writer = new BufferedWriter(new FileWriter(filename)); writer.write(systemName + " LIST OF STOPS"); writer.newLine(); writer.newLine(); ArrayList<String> stops = new ArrayList<String>(); for (ScheduledRoute r:this.routes){ for (String s:r.getStopSequence()){ if (!(stops.contains(s))) stops.add(s); } } for (String s:stops){ writer.write(s); writer.newLine(); } writer.close(); } COM: <s> a function for exporting a master list of stops for all routes </s>
funcom_train/3888168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRestrictionTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RestrictionType_restrictionType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RestrictionType_restrictionType_feature", "_UI_RestrictionType_type"), ImsldV1p0Package.Literals.RESTRICTION_TYPE__RESTRICTION_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the restriction type feature </s>
funcom_train/42508455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBottomRightPointAt(float x, float y, float margin) { float [][] points = getPoints(); return Math.abs(x - points[2][0]) <= margin && Math.abs(y - points[2][1]) <= margin; } COM: <s> returns code true code if the bottom right point of this piece is </s>
funcom_train/17385042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAllDiskImages() { try { if (writer != null ) IndexReader.unlock(writer.getDirectory()); IndexReader reader = IndexReader.open(indexDir); TermEnum termEnum = reader.terms(); while (termEnum.next()) { Term term = termEnum.term(); if (term.field().equals("diskName")) { reader.deleteDocuments(term); } else break; } reader.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> removes all images from the index </s>
funcom_train/16354951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringWriter merge(String templateFile, VelocityContext context, StringWriter sw) { Template template = null; try { if (sw == null) { sw = new StringWriter(); } template = Velocity.getTemplate(templateFile); template.merge(context, sw); return sw; } catch (ResourceNotFoundException e) { throw new RuntimeException(e); } catch (ParseErrorException e) { throw new RuntimeException(e); } catch (MethodInvocationException e) { throw new RuntimeException(e); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> merges velocity template output with the specified string buffer </s>
funcom_train/30187092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getConfigurationFiles(File defaultConfig) { File configDir = defaultConfig.getParentFile(); File [] chainConfigs = configDir.listFiles(new ChainConfigFileFilter(defaultConfig)); if (chainConfigs==null) { log.error("No chain configs defined."); return new ArrayList(); } log.debug("Found config files " + Arrays.asList(chainConfigs)); return Arrays.asList(chainConfigs); } COM: <s> method get configuration files </s>
funcom_train/15420088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publish(LogRecord record) { if (!isLoggable(record)) { return; } String msg; try { msg = getFormatter().format(record); } catch (Exception ex) { reportError(null, ex, ErrorManager.FORMAT_FAILURE); return; } switch (mode) { case MODE_OUT: outWriter.write(msg); break; case MODE_ERR: errWriter.write(msg); break; case MODE_BOTH: boolean isErr = record.getLevel().intValue() > Level.INFO.intValue(); if (isErr) { errWriter.write(msg); } else { outWriter.write(msg); } break; default: throw new RuntimeException("Incorrect mode " + mode); } } COM: <s> publish a message to the appropriate writer </s>
funcom_train/3416459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scanner useRadix(int radix) { if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) throw new IllegalArgumentException("radix:"+radix); if (this.defaultRadix == radix) return this; this.defaultRadix = radix; // Force rebuilding and recompilation of radix dependent patterns integerPattern = null; return this; } COM: <s> sets this scanners default radix to the specified radix </s>
funcom_train/13380195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String concatWords(String token, String nextToken) { String dashed = token.concat(nextToken); String withoutDash = token.substring(0, token.length() - 1); withoutDash = withoutDash.concat(nextToken); if (ratingMap.containsKey(dashed.toLowerCase())) { return dashed; } return withoutDash; } COM: <s> produce both dashed and non dashed versions of the string in case </s>
funcom_train/18485542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AdapterNode newAdapterNode(AdapterNode parent, Node node) { AdapterNode newNode = null; if (node != null && parent != null) { newNode = new AdapterNode(this, parent, node); newNode.addAdapterNodeListener(docAdapterListener); } return newNode; } //}}} //{{{ getText() COM: <s> factory method that creates a new adapter node object wrapping the node </s>
funcom_train/1060037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPresentationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SemanticModelBridge_presentation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SemanticModelBridge_presentation_feature", "_UI_SemanticModelBridge_type"), Di2Package.Literals.SEMANTIC_MODEL_BRIDGE__PRESENTATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the presentation feature </s>
funcom_train/44450344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SrcMLElement getReturnStructure() { SrcMLElement parent = getSParent(); while (parent != null) { if (parent instanceof de.srcml.dom.Method) { return parent; } parent = parent.getSParent(); } logger.warning("Illegal Return node: Missing Method parent node!"); return null; } COM: <s> find out which structure this return refers to </s>
funcom_train/51299562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ActionedTreeNode aChild, int typeId) { for (int i = 0; i < getChildCount(); ++i) { TypedActionedTreeNode child = (TypedActionedTreeNode) getChildAt(i); if (child.getType().getId() == typeId) { child.add(aChild); break; } } } COM: <s> add to children node </s>
funcom_train/43852787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Literal parseLiteral() throws ParseException { final byte delim = next(); tok.reset(); while(!curr(0) && !curr(delim)) tok.add(next()); if(!consume(delim)) error(QUOTECLOSE); return new Literal(tok.finish()); } COM: <s> parses a literal and expects the first character to be a quote </s>
funcom_train/10858585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParameters() throws Exception { Similarity sim = getSimilarity("text_params"); assertEquals(LMJelinekMercerSimilarity.class, sim.getClass()); LMJelinekMercerSimilarity lm = (LMJelinekMercerSimilarity) sim; assertEquals(0.4f, lm.getLambda(), 0.01f); } COM: <s> jelinek mercer with parameters </s>
funcom_train/4465043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOntology(URI uri) { OWLOntology onto = getOntology(uri); this.selectedOntology = null; if(onto != null) { ontologies.remove(uri); clearCaches(onto); this.changesCache.removeOntology(onto); notifyListeners(new ModelChangeEvent(this, ModelChangeEvent.ONTOLOGY_REMOVED, uri)); } this.clearSelections(); } COM: <s> remove an ontology from the swoop model given its uri </s>
funcom_train/28123598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Shell createEditorSession(java.io.File BaseDirectory, Model m) { Shell theShell = new Shell(theLibrary, m); theShell.setBaseDirectory(BaseDirectory); theShell.setName(m.getName()); theShell.setIDE(ide()); ide().getEditor().addTab(theShell); return theShell; } COM: <s> create an editor session </s>
funcom_train/23046889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PaletteContainer createCondition2Group() { PaletteDrawer paletteContainer = new PaletteDrawer( Messages.Condition2Group_title); paletteContainer.setDescription(Messages.Condition2Group_desc); paletteContainer.add(createOrOperator1CreationTool()); paletteContainer.add(createAndOperator2CreationTool()); paletteContainer.add(createExpansion3CreationTool()); paletteContainer.add(createConclusion4CreationTool()); paletteContainer.add(createConditionUsage5CreationTool()); paletteContainer.add(createCondition6CreationTool()); paletteContainer.add(createLink7CreationTool()); return paletteContainer; } COM: <s> creates condition palette tool group </s>
funcom_train/43664047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addServicesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BPackage_services_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BPackage_services_feature", "_UI_BPackage_type"), XmdlboPackage.Literals.BPACKAGE__SERVICES, true, false, false, null, getString("_UI_BusinessModelPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the services feature </s>
funcom_train/22000397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildDateTimePresentQuery(TradingDateTime dateTime) { if (DatabaseStart.getDatabaseManager().getSoftware() == HSQLDB_SOFTWARE) return new String("SELECT TOP 1 " + DATETIME.name + " FROM " + _SHARE_TABLE + " WHERE " + DATETIME.name + " = '" + dateTime.getTimeInMillis() + "' "); else return new String("SELECT " + DATETIME.name + " FROM " + _SHARE_TABLE + " WHERE " + DATETIME.name + " = '" + dateTime.getTimeInMillis() + "' LIMIT 1"); } COM: <s> return the sql clause for detecting whether the given date appears in the </s>
funcom_train/44449991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object convertObjectByString(Class f_type, Object f_value) throws InstantiationException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (f_value instanceof String) { Constructor c = f_type.getConstructor(String.class); return c.newInstance((String)f_value); } return null; } COM: <s> converts an object to a given class type if possible </s>
funcom_train/45623255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEmbedResourcesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ALType_embedResources_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ALType_embedResources_feature", "_UI_ALType_type"), MSBPackage.eINSTANCE.getALType_EmbedResources(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the embed resources feature </s>
funcom_train/51604796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJList() { if (jList == null) { jList = new JList(vector); jList.setPreferredSize(new Dimension(250, 52)); jList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { SwingUtilities.invokeLater(new Runnable(){ public void run() { elementShow(); };}); } }); } return jList; } COM: <s> this method initializes j list </s>
funcom_train/35184680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FixedStreamTokenizer (InputStream I) { input = I; buf = new char[20]; byte ct[] = ctype; int i; wordChars('a', 'z'); wordChars('A', 'Z'); wordChars(128 + 32, 255); whitespaceChars(0, ' '); commentChar('/'); quoteChar('"'); quoteChar('\''); parseNumbers(); // we shouldn't use the normal interfaces, so we can // add protection against user hacking there. ctype [UNPEEKED] = CT_WHITESPACE; } COM: <s> creates a stream tokenizer that parses the specified input </s>
funcom_train/41506841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyTextDelta(InputStream base, OutputStream target, boolean computeCheksum) { reset(); MessageDigest digest = null; try { digest = computeCheksum ? MessageDigest.getInstance("MD5") : null; } catch (NoSuchAlgorithmException e1) { } base = base == null ? SVNFileUtil.DUMMY_IN : base; myApplyBaton = SVNDiffWindowApplyBaton.create(base, target, digest); } COM: <s> starts processing deltas given a base file stream and an output stream </s>
funcom_train/11348871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFactory() { ensureValidity(); m_metadata = generateComponentMetadata(); try { m_factory = new CompositeFactory(m_context, m_metadata); m_factory.start(); } catch (ConfigurationException e) { throw new IllegalStateException("An exception occurs during factory initialization : " + e.getMessage()); } } COM: <s> creates the component factory </s>
funcom_train/5703784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceObjectReferences(String code, String id) throws CompilerException { JavaParser p = new JavaParser(new StringReader(code + ";")); p.Expression(); SimpleNode node = p.popNode(); scanNode(node, id); return node.getText(); } COM: <s> replaces all references to the variable object with the actual object id </s>
funcom_train/15918415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Stmt label(Stmt stmt, boolean labeled) { if (!labeled) return stmt; if (!labelInfo.get(labelInfo.size()-1).oldLabelUsed) return stmt; return(syn.createLabeledStmt(stmt.position(), labelInfo.get(labelInfo.size()-1).oldLabel, stmt)); } COM: <s> prefix a list of labels to a statement </s>
funcom_train/12128143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Edge findInEdgeByKey(Node tail, String key) { if(tail == null || key == null || inEdges == null) { return null; } Edge edge = null; for(int i = 0; i < inEdges.size(); i++) { edge = (Edge)(inEdges.elementAt(i)); if(tail == edge.getTail() && key.equals(edge.getKey())) { return edge; } } return null; } COM: <s> find an inbound edge given its tail and key </s>
funcom_train/3146076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(java.io.PrintStream s) { synchronized(s){ if (realException!=null){ s.println("++++"); super.printStackTrace(s); realException.printStackTrace(s); s.println("----"); } else super.printStackTrace(s); } } COM: <s> prints the stack trace of this format exception to the specified print stream </s>
funcom_train/24941457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Latency getLatency() { // return getMainExit().getLatency(); Exit doneExit = getExit(Exit.DONE); if (_lim.db) { if (doneExit.equals(null)) { _lim.ln("NO EXITS ON " + this + " RETURNING LATENCY.ZERO"); } } return doneExit != null ? doneExit.getLatency() : Latency.ZERO; // return getExit(Exit.DONE).getLatency(); } COM: <s> gets the latency of this component </s>
funcom_train/31626828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean stateAllowed(final String newState, final ExpressoRequest myRequest) throws ControllerException { for (int i = 0; i < PUBLIC_METHODS.length; i++) { String s = PUBLIC_METHODS[i]; if (s.equals(newState)) { return true; } } return super.stateAllowed(newState, myRequest); } /* stateAllowed(String) */ COM: <s> for database controllers we check if the new state is allowed </s>
funcom_train/44283944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupDanishDrvrPanel(JPanel parentPanel, Patch patch) { addWidget(parentPanel,new KnobWidget("Distortion", patch, 0, 127,0,new ScaledParamModel(patch, 53 + pgmDumpheaderSize, 127, 127),new CCSender(55)),6,0,1,1,44); } COM: <s> sets up the danish driver effects panel </s>
funcom_train/4640963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMirrorShader(Color color) { // save internal status this.color = color; type = SHADER_MIRROR; // save name for use with primitives currentName = defaultName + nameID++; // set parameter sunflow.parameter("color", colorSpace, color.getRed()/(float)255, color.getGreen()/(float)255, color.getBlue()/(float)255); // set shader sunflow.shader(currentName, SHADER_MIRROR); } COM: <s> sets mirror shader </s>
funcom_train/39104129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeCharacter(char c) { if (-1 == sValue.indexOf(c)) { return sValue; } StringBuffer result = new StringBuffer(); for (int i = 0; i < sValue.length(); ++i) { char sc = sValue.charAt(i); if (sc != c) { result.append(sc); } } sValue = result.toString(); return sValue; } COM: <s> any occurence of character c is removed from the string </s>
funcom_train/9701151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasTypeSize(String type){ if (type.startsWith("VARCHAR2") || type.startsWith("NVARCHAR2") || type.startsWith("VARCHAR") || type.startsWith("CHAR") || type.startsWith("NCHAR") || type.startsWith("NUMBER") || type.startsWith("TIMESTAMP")){ return true; } else { return false; } } COM: <s> check if the type has any size property </s>
funcom_train/18328410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cut(Node node) { NodeSelection contents = new NodeSelection(node); ClipboardManager.getClipboard().setContents(contents, contents); int[] nodeLocation = DOMHelper.getNodeLocation(node); Node elementClone = node.cloneNode(true); DOMHelper.removeNode(node); undoManager.addEdit(new DOMUndoableEdit(elementClone, nodeLocation, null, DOMUndoableEdit.REMOVE_ELEMENT)); domTree.updateUI(); mqatDocWrapper.setDirty(true); clearDetailPanel(); } COM: <s> performs the cut operation </s>
funcom_train/43910884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDefaultUser() { String name = (geoServer == null ? "admin" : geoServer.getAdminUserName()); String passwd = (geoServer == null ? "geoserver" : geoServer.getAdminPassword()); myDetailStorage.put(name, new User(name, passwd, true, true, true, true, new GrantedAuthority[]{ new GrantedAuthorityImpl("ROLE_ADMINISTRATOR") } )); } COM: <s> generate the default geoserver administrator user </s>
funcom_train/34595323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean immobilises(Pokemon poke) { BattleField field = poke.getField(); if (field.getRandom().nextDouble() <= 0.25) { field.showMessage(poke.getName() + " is paralysed! It can't move!"); return true; } return false; } COM: <s> paralysis has a 25 chance of immobolising the afflicted pokemon </s>
funcom_train/3389132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vset clearVar(int varNumber) { if (x == fullX) { return this; } long bit = (1L << varNumber); if (varNumber >= VBITS) { int i = (varNumber / VBITS - 1) * 2; if (i >= x.length) { return this; } x[i] &=~ bit; if (i+1 < x.length) { x[i+1] &=~ bit; } } else { vset &=~ bit; uset &=~ bit; } return this; } COM: <s> retract any assertion about the var </s>
funcom_train/24625807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SuitE getPurity() { SuitE result = SuitE.INVALID; for(Tile t: this){ if(result == SuitE.INVALID){ result = t.getSuit(); }else /* dragon & wind are considered as same purity */ if(!(result.isHonour() && t.getSuit().isHonour())){ if(result != t.getSuit()){ result = SuitE.INVALID; break; } } } return result; } COM: <s> if all the tiles are of the same suit return this suit </s>
funcom_train/28127329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean logonUser(String username, String password, Map tokens) { Integer handle = authenticateUser(username, password, getDomain(tokens)); log.debug("Authenticated handle is " + String.valueOf(handle)); if (handle!=null) { tokens.put("Win32UserTokenHandle", handle); return true; } else { return false; } } COM: <s> log a user onto the system </s>
funcom_train/4014124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValid(AbsolutePanel panel, boolean fireValueChanged){ boolean valid = true; for(int index=0; index<panel.getWidgetCount(); index++){ RuntimeWidgetWrapper widget = (RuntimeWidgetWrapper)panel.getWidget(index); if(!widget.isValid()){ valid = false; if(firstInvalidWidget == null && widget.isFocusable()) firstInvalidWidget = widget.getInvalidWidget(); } if(fireValueChanged && widget.getQuestionDef() != null) onValueChanged(widget); } return valid; } COM: <s> checks if widgets on a panel or page have validation errors </s>
funcom_train/31208452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDriverVersion() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); checkClosed(); String line=jdbcDriver.MAJOR_VERSION+"."+jdbcDriver.MINOR_VERSION; if(Trace.isEnabled()) Trace.traceResultQuote(line); return line; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the version number of the driver </s>
funcom_train/11647283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String encodeInCDATA(String bodyContent) { StringBuffer buffer = new StringBuffer(bodyContent); buffer.ensureCapacity(12); XMLUtils.escapeCDATAContent(buffer); return buffer.insert(0, "<![CDATA[").append("]]>").toString(); } COM: <s> wraps the given content into a cdata section </s>
funcom_train/25877415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateObject(Identifier id, File f, Acl acl, MetadataList metadata) { // Open the file and call the streaming version InputStream in; try { in = new FileInputStream(f); } catch (FileNotFoundException e) { throw new EsuException("Could not open input file", e); } totalBytes = f.length(); updateObject(id, in, acl, metadata, true); } COM: <s> updates an existing object with the contents of the given file acl and </s>
funcom_train/12912311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int addRadioButtons(List<XMLNode> children, JPanel rbp, ButtonGroup bg) { int count = 0; for (XMLNode node : children) { if (node instanceof ElementType) { count += addRadioButton((ElementType)node, rbp, bg); } } return count; } COM: <s> add radio buttons to the display </s>
funcom_train/17944860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColumnsWidths() { int iColumnIndex = 0; while(iColumnIndex < alarmTableModel.getColumnCount()-1) { alarmTable.getColumnModel().getColumn(iColumnIndex).setPreferredWidth(alarmTableModel.getColumWidth(iColumnIndex)); iColumnIndex++; } } COM: <s> set columns widths </s>
funcom_train/49509526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExtraAttributes(org.apache.axiom.om.OMAttribute param) { if (localExtraAttributes == null) { localExtraAttributes = new org.apache.axiom.om.OMAttribute[] {}; } List list = org.apache.axis2.databinding.utils.ConverterUtil .toList(localExtraAttributes); list.add(param); this.localExtraAttributes = (org.apache.axiom.om.OMAttribute[]) list .toArray(new org.apache.axiom.om.OMAttribute[list.size()]); } COM: <s> auto generated add method for the array for convenience </s>
funcom_train/20843853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getBindings(QName portType) { if (portType == null || bindings == null) { return EmptyStructures.EMPTY_ITERATOR; } List l = new ArrayList(); for (Iterator it = bindings.values().iterator(); it.hasNext();) { WSDLBinding binding = (WSDLBinding) it.next(); if (portType.equals(binding.getTypeName())) { l.add(binding); } } return new ReadOnlyIterator(l); } COM: <s> returns an iterator over all bindings for the port type with the given </s>
funcom_train/22743733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerIcons(File directory) { File icons[]=directory.listFiles(); if(icons==null) return; for (int i = 0; i < icons.length; i++) { if(icons[i].isDirectory()) { registerIcons(icons[i]); continue; } ImageIcon icon = new ImageIcon(icons[i].getAbsolutePath()); String name = icons[i].getName().substring(0,icons[i].getName().indexOf('.')); RepastBS.icons.put(name,icon); } } COM: <s> load and register icons from </s>
funcom_train/21940563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field36 getField36() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("36"); if (t == null) { log.fine("field 36 not found"); return null; } else { return new Field36(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 36 </s>
funcom_train/38905370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextFieldZadani2() { if (textFieldZadani2 == null) {//GEN-END:|55-getter|0|55-preInit // write pre-init user code here textFieldZadani2 = new TextField("", null, 32, TextField.ANY);//GEN-LINE:|55-getter|1|55-postInit // write post-init user code here }//GEN-BEGIN:|55-getter|2| return textFieldZadani2; } COM: <s> returns an initiliazed instance of text field zadani2 component </s>
funcom_train/33968404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String appendFMLParametersUri() { if (mFMLSettings == null) { mFMLSettings = new StringBuffer(); mFMLSettings.append(sDEVELOPER_KEY); } StringBuffer parameter; parameter = new StringBuffer(); parameter.append(mFMLSettings); parameter.append(cLANGUAGE); parameter.append(mAppController.getContext().getString( R.string.language_short)); if (isLoggedIn()) { parameter.append("&token="); parameter.append(mUser.getUserToken()); } return parameter.toString(); } COM: <s> helper to build the url containing the language the developer key and </s>
funcom_train/43094078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object searchPackageInModel(String name) { if ("".equals(getPackageName(name))) { return Model.getFacade().lookupIn(model, name); } Object owner = searchPackageInModel(getPackageName(name)); return owner == null ? null : Model.getFacade().lookupIn(owner, getRelativePackageName(name)); } COM: <s> search recursivly for nested packages in the model </s>
funcom_train/45249984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(boolean changed) { tbMgr.update(changed); // Force a resize tbMgr.getControl().pack(); Point size = tbMgr.getControl().getSize(); //tbMgr.getControl().setBounds(0, 0, size.x, size.y); Point ps = ci.computeSize (size.x, size.y); ci.setPreferredSize (ps); ci.setSize(ps); cb.pack(); cb.update(); LayoutUtil.resize(getControl()); } COM: <s> force the toobar to re synch to the model </s>
funcom_train/47867398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelStatus() { if (panelStatus == null) { labelStatus = new JLabel(); labelStatus.setText("For help, press F1"); panelStatus = new JPanel(); panelStatus.setLayout(new BoxLayout(getPanelStatus(), BoxLayout.X_AXIS)); panelStatus.setPreferredSize(new Dimension(0, 24)); panelStatus.setBorder(new SoftBevelBorder(BevelBorder.RAISED)); panelStatus.add(labelStatus, null); } return panelStatus; } COM: <s> this method initializes panel status </s>
funcom_train/3898076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getNotesFile() throws FileNotFoundException { if(_notesFile == null) { // File from ID _notesFile = new File(((ResourcesIndex)getDataModel()).getResourcesFolder(), getIdentifierRef() + ".notes"); } return _notesFile; } COM: <s> get the notes backing file </s>
funcom_train/2558249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Initializer getInitializer(Context context, Criteria criteria) throws Exception { Initializer result = primary; double max = 0.0; for(Initializer initializer : list) { double score = initializer.getScore(context, criteria); if(score > max) { result = initializer; max = score; } } return result; } COM: <s> this is used to acquire an code initializer code which is used </s>
funcom_train/42005415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void timeout(Object data_){ if ( data_ instanceof DiffTimer ) { DiffTimer d = (DiffTimer)data_ ; int type = d.EVT_Type ; switch ( type ) { case DiffTimer.TIMEOUT_SEND_HEARTBEAT : if(getTime()-microLearner.lastSourceParticipation>HEART_BEAT_INTERVAL) microLearner.handleSensorEvent(ConstructSensingEvent(null)); setTimeout(d, HEART_BEAT_INTERVAL); break ; } } super.timeout(data_); } */ COM: <s> handles a timeout event </s>
funcom_train/5662645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProvincePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CanadianAddress_province_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CanadianAddress_province_feature", "_UI_CanadianAddress_type"), DirectoryPackage.eINSTANCE.getCanadianAddress_Province(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the province feature </s>
funcom_train/37203726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String newName) { if (this.model == null) { return; } try { model.locateProcessor(newName); return; } catch (UnknownProcessorException upe) { // No existing processor with this name if (name.equals("")) { return; } if (Pattern.matches("\\w++", newName) == false) { return; } String oldName = name; name = newName; fireModelEvent(new ScuflModelRenameEvent(this, oldName)); } } COM: <s> set the name providing that names doesnt exist within the current </s>
funcom_train/51502442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButton2() { if (rbMi == null) { rbMi = new JRadioButton(); rbMi.setText("Mittwoch"); rbMi.setActionCommand("Mi"); rbMi.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); rbMi.setPreferredSize(new java.awt.Dimension(68,14)); } return rbMi; } COM: <s> this method initializes j radio button2 </s>
funcom_train/27827320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBindingPatternAllowed(Predicate predicate,boolean[] boundValues) { String predicateFullName=predicate.getFullName(); if ("IsResource/1".equals(predicateFullName) || "IsLiteral/1".equals(predicateFullName) || "IsVisible/1".equals(predicateFullName)) return boundValues.length==1 && boundValues[0]; else return true; } COM: <s> determines whether given binding pattern is allowed for given predicate </s>
funcom_train/8649389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterStatement() { if ( isAggressiveRelease() ) { if ( isFlushing ) { log.debug( "skipping aggressive-release due to flush cycle" ); } else if ( batcher.hasOpenResources() ) { log.debug( "skipping aggresive-release due to open resources on batcher" ); } else if ( borrowedConnection != null ) { log.debug( "skipping aggresive-release due to borrowed connection" ); } else { aggressiveRelease(); } } } COM: <s> to be called after execution of each jdbc statement </s>
funcom_train/11373346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flushInternal() throws IOException { long toWaitFor; synchronized (this) { dfsClient.checkOpen(); isClosed(); // // If there is data in the current buffer, send it across // queueCurrentPacket(); toWaitFor = lastQueuedSeqno; } waitForAckedSeqno(toWaitFor); } COM: <s> waits till all existing data is flushed and confirmations </s>
funcom_train/51245810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem createNewSqlPropertiesFileMenuItem(final SqlProperties file) { JMenuItem fileMenuItem = new JMenuItem(file.getPropName()); fileMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { file.openDbSession(context); } }); return fileMenuItem; } COM: <s> creates a new sql property option in the file menu </s>
funcom_train/9234771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean wantsHelp(final String[] args) { if (helpParam == null) { return false; } for (String arg : args) { if (arg.length() > 1 && arg.charAt(0) == '-') { final String name = arg.substring(1); if (name.equals("-")) { return false; } else { final CLIParam param = getParam(name); if (param == helpParam) { return true; } } } } return false; } COM: <s> check if the help parameter has been passed to the cli </s>
funcom_train/23991744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OWLDataProperty addDataProperty(String name, OWLOntology ont) { //Create "Question" Individual and set the class IRI iri = IRI.create(ont.getOntologyID().getOntologyIRI() + "#" + name); OWLDataProperty prop = df.getOWLDataProperty(iri); manager.addAxiom(ont, df.getOWLDeclarationAxiom(prop)); return prop; } COM: <s> create anew property declaration </s>
funcom_train/44458127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractCAPI createCapi() throws Exception { Descriptor descriptor = createDescriptor(); // Creates the CAPI (Client API) based on the class provided to the service interface. Constructor constCAPI = getServiceInterface().getConstructor(new Class[] {Descriptor.class}); AbstractCAPI capi = (AbstractCAPI) constCAPI.newInstance(new Object[]{descriptor}); return capi; } COM: <s> creates the capi to call the api </s>
funcom_train/9442499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addCandidate(WnnWord word) { if (word.candidate == null || mCandTable.containsKey(word.candidate) || word.candidate.length() > MAX_OUTPUT_LENGTH) { return false; } if (mFilter != null && !mFilter.isAllowed(word)) { return false; } mCandTable.put(word.candidate, word); mConvResult.add(word); return true; } COM: <s> add a candidate to the conversion result buffer </s>
funcom_train/3814190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GMMDiag getGauss(int i) { GMMDiag res = new GMMDiag(1, getNcoefs()); System.arraycopy(means[i], 0, res.means[0], 0, getNcoefs()); System.arraycopy(covar[i], 0, res.covar[0], 0, getNcoefs()); res.setWeight(0, 1); res.precomputeDistance(); return res; } COM: <s> extracts one gaussian from the gmm </s>
funcom_train/29849460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Iterator getPredecessors(Node node) { LinkedList result = new LinkedList(); for (Iterator neighbors = node.getNeighborsIterator(); neighbors.hasNext();) { Node neighbor = (Node) neighbors.next(); if (((Integer) bfsNum.get(node)).intValue() > ((Integer) bfsNum.get(neighbor)).intValue()) { result.add(neighbor); } } return result.iterator(); } COM: <s> get the predecessors of the given node </s>
funcom_train/16491338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon getIcon() { if (this.slider.getOrientation() == JSlider.HORIZONTAL) { if (this.slider.getPaintTicks() || this.slider.getPaintLabels()) return this.horizontalIcon; else return this.roundIcon; } else { if (this.slider.getPaintTicks() || this.slider.getPaintLabels()) return this.verticalIcon; else return this.roundIcon; } } COM: <s> returns the thumb icon for the associated slider </s>
funcom_train/10516592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullArgs() { try { FILE_UTILS.normalize(null); fail("successfully normalized a null-file"); } catch (NullPointerException npe) { // Expected exception caught } File f = FILE_UTILS.resolveFile(null, "a"); assertEquals(f, new File("a").getAbsoluteFile()); } COM: <s> test handling of null arguments </s>
funcom_train/43097933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllSurroundingNamespaces(Object ns) { if (!(ns instanceof MNamespace)) { throw new IllegalArgumentException(); } Set set = new HashSet(); set.add(ns); MNamespace namespace = ((MNamespace) ns); if (namespace.getNamespace() != null) { set.addAll(getAllSurroundingNamespaces(namespace.getNamespace())); } return set; } COM: <s> returns all surrounding namespaces of some namespace ns </s>
funcom_train/24570276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(MenuSet menuSet) { if (menuSet == null) return; // keep a reference to the menuSet for later use if (!menuSets.contains(menuSet)) menuSets.add(menuSet); // Add all JMenus in the menu set to this menuBar. JMenu[] menus = menuSet.getMenuSet(); for (int i = 0; i < menus.length; i++) { this.add(menus[i]); } } COM: <s> append the given menus to this menu bar </s>
funcom_train/9993309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRowExpanded(String id) { Element row = DOM.getElementById(addIdPrefix(id)); if (row == null) return false; String state = DOM.getElementProperty(row, "state"); return state != null && state.equalsIgnoreCase(BaseTreeTableRow.STATE_OPEN); } COM: <s> determines whether a row is currently expanded </s>