text stringlengths 14 410k | label int32 0 9 |
|---|---|
public Description getFunctional()
{
Description tRequirements = new Description();
for(Property tProp : this) {
if(tProp != null) {
if(!(tProp instanceof NonFunctionalRequirementsProperty)) {
tRequirements.set(tProp);
}
}
}
return tRequirements;
} | 3 |
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
if(button.getText().equals("Stop Play Record")){
player.stopThread();
interf.deleteMyWindowListener();
button.setText("Start Play Record");
if(Optiums.DISABLES_BUTTONS)
buttonRecorder.setEnabled(true);
}e... | 7 |
public Object[] compileToClassFiles(String source,
String sourceLocation,
int lineno,
String mainClassName)
{
Parser p = new Parser(compilerEnv, compilerEnv.getErrorReporter());
Sc... | 9 |
public DataTag load()
{
DataTag tag = null;
try
{
final ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
tag = (DataTag) in.readObject();
in.close();
}
catch (final Exception i)
{
if (!i.getClass().equals(EOFException.class))
{
System.err.println("Exception: " + i... | 3 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
MerchantsFollowed other = (MerchantsFollowed) obj;
if (merId != other.merId)
return false;
if (mfId != other.mfId)
return false;
if (uI... | 6 |
public LinkedList<Video> searchVideos(LinkedList<Pair<String, String>> whereClauses,
LinkedList<String> whereConjunctions, char order) throws SQLException {
LinkedList<String> select = new LinkedList<String>();
select.add("*");
LinkedList<String> from =... | 2 |
@Test
public void test_mult_skalar() {
int a = 2;
int b = 3;
int skalar = -4;
Matrix m1 = new MatrixArray(a,b);
Matrix m2 = new MatrixArray(a,b);
for(int i = 1; i <= a; i++){
for(int j = 1; j <= b; j++)
m1.insert(i, j, (double)(2*i-j));
}
for(int i = 1; i <= a; i++){
for(int j = 1; j <=... | 4 |
private JPanel custtab() {
JPanel cust = new JPanel();
cust.setLayout(null);
JButton newcust, edcust, delcust, viewcust;
newcust = new JButton("New Customer");
edcust = new JButton("Edit Customer");
delcust = new JButton("Delete Customer");
viewcust = new JButton("View all Customers");
newcust.setBound... | 9 |
@Override
public boolean getIsUniqueAttribute() {
return false;
} | 0 |
private void parseModuleConfig(String index, Element el)
{
NodeList nl = el.getElementsByTagName("Config");
Map<String,String> map = new HashMap<String,String>();
if(nl != null && nl.getLength() > 0)
{
for(int i = 0; i < nl.getLength(); i++)
{
... | 4 |
public void methode1()
{
} | 0 |
@Override
protected void setPanelPerson(User u, boolean newUser) {
super.setPanelPerson(u, newUser);
btnSave.setEnabled(false);
if (newUser || u == null) {
// we don't want any rows selected
ListSelectionModel m = table.getSelectionModel();
m.clearSelection();
return;
}
tableModel.setR... | 2 |
@Override
public void addProperRoom(Room R)
{
if(R==null)
return;
if(!CMLib.flags().isSavable(this))
CMLib.flags().setSavable(R,false);
if(R.getArea()!=this)
{
R.setArea(this);
return;
}
synchronized(myRooms)
{
if(!myRooms.contains(R))
{
addProperRoomnumber(R.roomID());
Room R2... | 7 |
private static ParameterCode getParameterCode(String s) {
ParameterCode[] codes = ParameterCode.values();
for (ParameterCode c : codes) {
if (s.compareTo(c.toString()) == 0)
return c;
}
return ParameterCode.NO_CODE;
} | 2 |
public static void main(String[] args) {
int i = 0;
while( i <= 100 ) {
System.out.println("i = " + i);
i+=2; //i=i+2;
}
///////////////////////////////////////////////
i = 0;
while( i <= 100 ) {
if( i%2 == 0 )
System.out.println("i = " + i);
i++;
}
/////////////////////////... | 6 |
private static boolean checkSignature(byte[] buffer) {
for(int i=0 ; i<SIGNATURE.length ; i++) {
if(buffer[i] != SIGNATURE[i]) {
return false;
}
}
return true;
} | 2 |
private HashMap<String,String> readQueryFromTable(HashMap<String,String> propertiesMap) {
List<HashMap<String,String>> propertiesMapList = transactionQueryHistoryDao.getTableProperties();
for(HashMap<String,String> map : propertiesMapList) {
QueryType queryType = QueryType.valueOf(map.g... | 8 |
protected void enableGUI() {
buildFieldRef();
for (JComponent elem : editableElements) {
if (elem != null) {
elem.setEnabled(true);
}
}
for (JTextComponent elem : editableTextFields) {
if (elem != null) {
elem.setEditable(true);
}
}
} | 4 |
private boolean edgeAndScheduleSelection(EvolvingGraph graph, Vector<Integer> tLBD){
Vector<Integer> arrivalTime = new Vector<Integer>();
boolean improved = false;
eMin = new Vector<Edge>(graph.getNumOfNodes());
tMin = new Vector<Integer>(graph.getNumOfNodes());
for (int i = 0; i < graph.getNumOfNodes()... | 6 |
public static double countAdjacents(Board b)
{
int counter = 0;
for (int i = 0; i < 4; i++){
for (int j = 0; j < 4; j++){
if ( j < 3 && Board.canCombine(b.boardState[i][j], b.boardState[i][j+1])) {
counter++;
}
if ( i < 3 && Board.canCombine(b.boardState[i][j], b.boardState[i+1][j])) {
cou... | 6 |
public boolean Apagar(T obj) {
try {
manager.remove(manager.merge(obj));
return true;
} catch (Exception ex) {
return false;
}
} | 1 |
public String readUntil(String pattern) throws InterruptedException, IOException {
cnt=0;
char lastChar = pattern.charAt(pattern.length() - 1);
StringBuffer buffer = new StringBuffer();
char ch = (char) dataIn.read();
String msg;
String broken[];
while (runner==1) {
... | 9 |
public RayIntersect fireRay(double x, double z, double angle){
double tan = math.tan(angle);
int MAX_LOOPS = (int)(Math.ceil(raycaster.getCamera().getViewDistance()) + 1);
RayIntersect vert = fireVerticleRay(x, z, angle, tan, MAX_LOOPS);
RayIntersect horiz = fireHorizontalRay(x, z, an... | 4 |
private static Node merge(Node odd, Node even) {
// Sentinel Node
Node list = new Node(0, null);
Node start = list;
while (odd != null || even != null) {
if (odd != null && even != null) {
if ((int)odd.getData() < (int)even.getData()) {
list.setNext(odd);
odd = odd.getNext();
list = list.g... | 8 |
private void setupChoosableFontProperties() {
// Load fonts and add them to the combobox 'cbFonts'
String[] fontNames = parent.getParentView().getAvailableFonts();
for (String font : fontNames) {
this.cbFonts.addItem(font);
}
this.cbFonts.setSelectedItem(this.dss.get... | 5 |
void processAnnotations(Annotation[] annotations)
{
int sourceLoaderCount = 0;
int sourceCount = 0;
int prefixCount = 0;
int postfixCount = 0;
try
{
for (final Annotation annotation : annotations)
{
if (annotation instanceof AutoConfigLoader)
{
AutoConfigLoader annotation2 = (AutoConfig... | 5 |
public void setDisplayMode(int displaymode) {
this.pconnect.setDisplayMode(displaymode);
} | 0 |
public void run(String[] args) {
//---------------------------------------------------------------
// Parse arguments.
//---------------------------------------------------------------
CommandArgs cmd = new CommandArgs
(args, // arguments to parse
... | 8 |
private String spaceString(int n) {
StringBuffer sbuf = new StringBuffer(n);
for (int i = 0; i < n; i++) {
sbuf.append(' ');
}
return sbuf.toString();
} | 1 |
public SimulatorView getSimulatorView()
{
return view;
} | 0 |
@Override
public void onMouseClicked(int x, int y, int button)
{
if(button == 0 && this.x <= x && x <= this.x+this.width && this.y <= y && y <= this.y+this.height)
this.clicks++;
super.onMouseClicked(x, y, button);
} | 5 |
public boolean findBid(Object objet, User seller){
Bid b = new Bid(new Date(), objet, seller, 0, 0);
if(bidList.indexOf(b) == -1)
return false;
else
return true;
} | 1 |
@Override
public int check(DiceSet diceSet) {
int points = 0;
Map<Integer, Integer> vals = new HashMap<Integer, Integer>();
for (int i = 0; i < diceSet.SIZE; ++i) {
int key = diceSet.getValue(i);
if (!vals.containsKey(key)) {
vals.put(key, 1);
... | 5 |
@Test
public void test() {
byte[] data = new ProtoBuilder().array("foo", new String[]{"a", "b", "c"}, "bar").build();
Object result = new ProtoParser().parse(data).result();
if (result instanceof Object[]) {
for (Object obj :(Object[]) result) {
if (obj instanceof Object[]) {
for (Object d :(Object[]... | 4 |
static public void writeLinesToFile(String filename, ArrayList<String> lines) {
File file = null;
try {
file = new File(filename);
file.createNewFile();
} catch (Exception e) {
e.printStackTrace();
}
try {
FileWriter writer = new FileWriter(file);
for (String line : lines)
wr... | 3 |
public static String readLine() {
Scanner input = new Scanner(System.in);
String line = "";
if(input.hasNextLine()) {
line = input.nextLine();
} return line;
} | 1 |
public String toString() {
return "Person[name=" + ((name == null) ? "null" : name.toString()) +
", birth=" + ((birth == null) ? "null" : birth.toString()) + "]";
} | 2 |
private void validateBudgetChoice(String budget_choice) throws InvalidBudgetTypeException {
if(budget_choice != ANNUAL_BUDGET && budget_choice != MONTHLY_BUDGET) {
throw new InvalidBudgetTypeException("Invalid Budget Type.");
}
} | 2 |
public void addToLines(PathItem l) {
lines.add(l);
} | 0 |
public void specialAttack2() {
skill2.attack(this.getAgility(), this.getLuck());
} | 0 |
public void formTourList(SessionRequestContent request) throws ServletLogicException {
Criteria criteria = new Criteria();
criteria.addParam(DAO_ID_DIRECTION, request.getAttribute(JSP_ID_DIRECTION));
User user = (User) request.getSessionAttribute(JSP_USER);
if (user != null) {
... | 6 |
private boolean jj_3_69() {
if (jj_scan_token(SMALLER)) return true;
return false;
} | 1 |
private void updateStateTellNumOfSteps(List<Keyword> keywords, List<String> terms) {
//We should have come here by a keyword jump and the recipe shouldve been passed or set
if (keywords != null && !keywords.isEmpty()) {
for (Keyword kw : keywords) {
if (kw.getKeywordData().getType() == KeywordType.RECIPE) {
... | 9 |
public String toString(String format, NumberFormat nf) throws IllegalArgumentException {
if(nf == null || format == null || format.isEmpty()){
throw new IllegalArgumentException("NumberFormat and String arguments"
+ "must not be null or empty.");
}
return String.f... | 3 |
private void setArgPosition() {
int xPos;
for (xPos=pos; xPos<fmt.length(); xPos++) {
if (!Character.isDigit(fmt.charAt(xPos)))
break;
}
if (xPos>pos && xPos<fmt.length()) {
if (fmt.charAt(xPos)=='$') {
positionalSpecification = true;
argumentPositio... | 5 |
public void delete(Key key) {
if(key == null) {
throw new NullPointerException("Key may not be null");
}
if(!membershipTest(key)) {
throw new IllegalArgumentException("Key is not a member");
}
int[] h = hash.hash(key);
hash.clear();
for(int i = 0; i < nbHash; i++) {
... | 9 |
public void setNewTheme(String newTheme)
{
themeName = newTheme;
} | 0 |
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Venda other = (Venda) obj;
if (this.codigo != other.codigo) {
return false;
}
... | 7 |
public static void parseToMe (LinkedList<String[]> programArray, Hashtable<String, Integer> labelsHash, String name) throws IOException{
BufferedReader file = new BufferedReader(new FileReader(name));
String line;
int pc = 0;
Pattern comline = Pattern.compile("(\\b[a-zA-Z]*\\b:\\s*)?(\\b[a-zA-Z]{2,4}\\b)[... | 8 |
private void sieve(int[] p){
for (int i=2;i<1e6;i++){
if (p[i] == 1){
for (int j=i+i;j<1e6;j+=i){
p[j]=0;
}
}
}
} | 3 |
@Override
public void executeMsg(final Environmental myHost, final CMMsg msg)
{
super.executeMsg(myHost,msg);
if((affected!=null)
&&(affected instanceof MOB)
&&(msg.amISource((MOB)affected)
||msg.amISource(((MOB)affected).amFollowing())
||(msg.source()==invoker()))
&&(msg.sourceMinor()==CMMsg.TYP_QUIT... | 7 |
@Override
public void onEnable() {
config = getConfig();
config.options().copyDefaults(true);
saveConfig();
cfile = new File(getDataFolder(), "config.yml");
instance = this;
getServer().getPluginManager().registerEvents(this, this);
this.saveDefaultConfig();
if (setupEconomy()) {
FreeForAll.instance... | 9 |
private static void displayMostUsefulReviews(BufferedReader reader, VideoStore videoStore) {
try {
System.out.println("Please enter the title of the video you want to get reviews for:");
String isbn = getISBNFromTitle(reader, videoStore, reader.readLine());
System.out.printl... | 1 |
private void startAnnouncer() {
if(announcerId != -1) {
// Stop previous announcer
plugin.getServer().getScheduler().cancelTask(announcerId);
}
if(!announcerUse || announcements.isEmpty()) {
return;
}
final int delay = announcerInterval * minut... | 4 |
public Object nextValue() throws JSONException {
char c = this.nextClean();
String string;
switch (c) {
case '"':
case '\'':
return this.nextString(c);
case '{':
this.back();
return new JSONObject(this);
... | 7 |
public static void main(String[] args) {
//9 different table sizes are considered, and there are 169 equivalence classes of paired cards
double[][][] suited = new double[9][13][13];
double[][][] unSuited = new double[9][13][13];
for(int playerCount = 2; playerCount <= 10; playerCount++){
System.out.println("... | 9 |
public String parseExprContent(String rawContent) {
StringBuilder sb = new StringBuilder();
String s = "";
for (int i = 0; i < rawContent.length(); i++) {
char c = rawContent.charAt(i);
if(Character.isLetter(c)){ // When we find a letter, do a while till you cant find more digits
s += c;
i++;
... | 6 |
@Override
public void getTokenEmissionWeights(SequenceInput input, int idxTknTrain,
double[] weights) {
// Clear weights array.
Arrays.fill(weights, 0d);
/*
* Index of the given sequence within the training dataset, if it is
* part of one.
*/
int idxSeqTrain = input.getTrainingIndex();
if (!dis... | 9 |
public void render()
{
BufferStrategy bs = this.getBufferStrategy();
if(bs == null)
{
createBufferStrategy(3);
return;
}
Graphics g = bs.getDrawGraphics();
//Render Here
map.render(g);
gui.render(g);
paths.render(g);
... | 2 |
@Override
public String describeValue(final boolean[] data, final int requestedNameLength)
{
long val = 0;
for(int i = 0; i < data.length; i++)
{
if(true == data[i])
{
val = val + (1 <<((numBits-1) -i));
}
// else 0 * someth... | 4 |
private void OKButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OKButtonActionPerformed
int tempX, tempY, tempMines;
try {
tempX = Integer.parseInt(numX.getText());
tempY = Integer.parseInt(numY.getText());
tempMines = Integer.parseInt(numMines... | 6 |
private void reduce() {
int[] primes = getPrimeNumbers();
for (int divisor : primes) {
if(numerator < divisor) break;
if(denominator < divisor) break;
divide(divisor);
}
} | 3 |
public void setHmac(Key key){
Mac hmac = null;
try {
hmac = Mac.getInstance("HmacSHA256");
} catch (NoSuchAlgorithmException e) {
System.err.println("NoSuchAlgorithmException (HmacSHA256 not valid): " + e.getMessage());
}
try {
hmac.init(key);
} catch (InvalidKeyException e) {
System.err.println... | 3 |
@Override
public boolean okMessage(final Environmental myHost, final CMMsg msg)
{
if(!super.okMessage(myHost,msg))
return false;
if(((msg.sourceMinor()==CMMsg.TYP_TELL)
||(msg.othersMajor(CMMsg.MASK_CHANNEL)))
&&((msg.source()==affected)
||((msg.source().location()==CMLib.map().roomLocation(affected)... | 7 |
String fetch_m3u(String m3u) {
InputStream pstream = null;
if (m3u.startsWith("http://")) {
try {
URL url;
if (running_as_applet) {
url = new URL(getCodeBase(), m3u);
} else {
url = new URL(m3u);
... | 9 |
@Override
public int getFirstSlotLocationX() {
return isNotPlayerInventory() ? centerX-54 :centerX - 44;
} | 1 |
public void affichageTableur(String pretexte, ArrayList<ArrayList<Character>> al)
{
System.out.println(pretexte);
System.out.println("[");
for(ArrayList<Character> mot : al)
System.out.println("\tPosition : " + al.indexOf(mot) +"(" + tableurNonTrie.indexOf(mot) + ")\t" + mot);... | 1 |
public static List<CharacterObject> GetConnectedPlayers(short x_centr_cell, short y_centr_cell, short dist_radius)
{
List<CharacterObject> list = new ArrayList<CharacterObject>();
for(int ix = x_centr_cell - dist_radius; ix < x_centr_cell + dist_radius; ix++)
for(int iy = y_centr_cell -... | 5 |
protected void genWeapon(MOB mob, Race E, int showNumber, int showFlag)
throws IOException
{
if((showFlag>0)&&(showFlag!=showNumber))
return;
final StringBuffer parts=new StringBuffer("");
Item I=CMClass.getItem(E.getStat("WEAPONCLASS"));
if(I!=null)
{
I.setMiscText(E.getStat("WEAPONXML"));
I.reco... | 8 |
private void jBtnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnLoginActionPerformed
// TODO add your handling code here:
String username = this.jTxtFldUsername.getText();
String password = this.jTxtFldPassword.getText();
Connection conn = Conexion.G... | 5 |
public static void main(String[] args) {
ParamsParse params = null;
/**
* Тут в зависимости от параметров мы либо делаем xml файл со структурой базы,
* либо сравниваем существующий xml файл с тем что есть в базе
*/
// Проверим число параметров. В качестве параметра д... | 6 |
public Prime(int n) {
max = n;
bitSet = new BitSet(max + 1);
if (max > 1){
bitSet.set(0, 2, false);
bitSet.set(2, max + 1, true);
for (long i = 2; i * i <= max; ++i) {
if (isPrime((int) i)) {
for (long j = i * i; j <= max; j += i) {
bitSet.se... | 4 |
public static void main(String[] args)
{
Bank b = new Bank(NACCOUNTS, INITIAL_BALANCE);
int i;
for (i = 0; i < NACCOUNTS; i++)
{
TransferRunnable r = new TransferRunnable(b, i, INITIAL_BALANCE);
Thread t = new Thread(r);
t.start();
}
} | 1 |
int checkID(String id) {
int errorNumber = 0;
char[] idCharArray = id.toCharArray();
if (id.length() == 18) {
char lastChar = idCharArray[17];
for (int i = 0; i < idCharArray.length - 1; i++) {
if ((int) idCharArray[i] >= (int) '0' && (int) idCharArray[i]... | 7 |
public Inventory(int size)
{
this.size = size;
itemList = new Item[size];
x = 50;
y = 470;
w = 176;
h = 40;
int n = 100001 + (int)(Math.floor(Math.random() * 8));
addItem(n);
n = 110001 + (int)(Math.floor(Math.random() * 7));
addItem(n)... | 0 |
private static String getKeepAliveMsg(Neighbor from) {
StringBuilder result = new StringBuilder();
result.append("From:");
result.append(Setup.ROUTER_NAME);
result.append("\n");
result.append("Type:KeepAlive\n");
return result.toString();
} | 0 |
void makeOLSAveragesTable( double[][] D, double[][] A )
{
edge e,f,g,h;
edge exclude;
e = f = null;
e = depthFirstTraverse(e);
while ( null != e )
{
f = e;
exclude = e.tail.parentEdge;
/* we want to calculate A[e.head][f.head] for all edges
except those edges which a... | 8 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
private boolean saveGame(File fout){
DataOutputStream file;
try{
file = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fout)));
}catch(FileNotFoundException ex){
return false;
}
try{
//write status
file.writeInt(score1);
file.writeInt(score2);
file.writeInt(level);
... | 7 |
public Exception getException() {
return exception;
} | 0 |
private String writeDropForeignKeys() {
StringBuilder sb = new StringBuilder();
Table fromTable;
ForeignNode node;
for ( int keyNum = 0; keyNum < foreignNodeList.size(); keyNum++ ) {
node = foreignNodeList.get( keyNum );
fromTable = tableMap.get( node.getFromTabl... | 1 |
public static void main(String[] args){
Deck d;
decks = new DeckList();
try {
FileInputStream fileStream = new FileInputStream("Deck.ser");
ObjectInputStream os = new ObjectInputStream(fileStream);
Object deckList = os.readObject();
decks = (DeckList) deckList ;
os.close();
} catch (Exce... | 5 |
@SuppressWarnings("unchecked") // FIXME in Java7
private void filterDestinations() {
DefaultListModel model = (DefaultListModel) destinationList.getModel();
Object selected = destinationList.getSelectedValue();
model.clear();
for (Destination d : destinations) {
if (showO... | 7 |
public void addBomber(IBomber b){
bombers.add(b);
} | 0 |
public static Graph FechoTransitivo(Graph grafo) {
Graph resultado = new Graph(grafo.getNlc());
resultado.setMatriz(grafo.getMatriz());
for (int i = 0; i < resultado.getNlc(); i++)
for (int j = 0; j < resultado.getNlc(); j++) {
for (int k = 0; k < resultado.getNlc(); k++) {
//Se existe caminho de j... | 5 |
public void rimuovi(T x) {
AlberoBin<T> curr = cercaNodo(x);
if (curr == null || !curr.val().equals(x)) return;
AlberoBin<T> padre; int pos;
if (curr.sin() == null || curr.des() == null) {
pos = curr.pos();
padre = curr.padreBin();
rimuoviNodo(curr);
} else {
AlberoBin<T> curr2 = max(curr.sin());
... | 4 |
private void pop(char c) throws JSONException {
if (this.top <= 0) {
throw new JSONException("Nesting error.");
}
char m = this.stack[this.top - 1] == null ? 'a' : 'k';
if (m != c) {
throw new JSONException("Nesting error.");
}
this.top -= 1;
... | 5 |
private ConfigurationArea handleObject(ConfigurationArea configurationArea, final Set<SystemObject> objects, final SystemObject systemObject, final SystemObject dynamicObject) {
// alle SystemObjekte werden hier betrachtet (Konfigurations-Objekte und dynamische Objekte)
// Attribute, ObjectSet, AttributeGroupUsage ... | 7 |
private static String parseEscapedSequence(StringCharacterIterator iterator) throws UnsupportedEncodingException {
char c = iterator.next();
if (c == '\\') {
return new String(new byte[]{0, '\\'}, "UTF-8");
} else if (c == '"') {
return new String(new byte[]{0, '\"'}, "UT... | 8 |
@Override
public int hashCode() {
int hash = 3;
hash = 97 * hash + (this.mapID != null ? this.mapID.hashCode() : 0);
hash = 97 * hash + (this.map != null ? this.map.hashCode() : 0);
hash = 97 * hash + (this.cell != null ? this.cell.hashCode() : 0);
return hash;
} | 3 |
@Override
public void keyPressed(KeyEvent e) {
// Synchronise the registeredListeningObjects
synchronized (registeredListeningObjects) {
for (IKeyboardEventable keyListener : registeredListeningObjects) {
synchronized (waitingEventLists) {
waitingEventLists.get(KeyEventType.KEY_PRESSED).add(new EventHo... | 2 |
public List getTags() {
clearResultMetaInformation();
List tags = new ArrayList();
StringBuffer result = new StringBuffer();
GetMethod get = new GetMethod(apiEndpoint + DeliciousConstants.TAGS_GET);
get.setDoAuthentication(true);
try {
httpResult = httpClien... | 7 |
public int getEffectTextWidth(String text) {
if (text == null)
return 0;
int width = 0;
for (int index = 0; index < text.length(); index++) {
if (text.charAt(index) == '@' && index + 4 < text.length() && text.charAt(index + 4) == '@') {
index += 4;
} else {
width += characterScreenWidth[text.char... | 5 |
public boolean isDirected() {
return directed;
} | 0 |
@Override
protected final void onButtonClick(Button button) {
if (!frozen) {
if (button.active) {
if (loaded && button.id < 5) {
this.openLevel(button.id);
}
// if (finished || loaded && var1.id == 5) {
// froze... | 7 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
okButton = new javax.swing.JButton();
cancelButton = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
titleTextField = new javax.s... | 2 |
public static void main(String[] args) {
//Fail
ResourceBundle res = ResourceBundle.getBundle("GlobalRes");
String msg;
if(args.length > 0){
msg = res.getString(GlobalRes.GOODBYE);
}
else{
msg = res.getString(GlobalRes.HELLO);
}
System.out.println(msg);
//Fail
ResourceBundle res1 = Resource... | 3 |
private static void sendRefuseOfferPackages(String buyer, String service,
List<String> usersToRefuse) {
SerializableRefuseOffer refuseOffer;
SelectionKey key;
for (String refusedSeller : usersToRefuse) {
refuseOffer = new SerializableRefuseOffer();
refuseOffer.userName = buyer;
refuseOffer.serviceNam... | 2 |
public void setFesEstado(String fesEstado) {
this.fesEstado = fesEstado;
} | 0 |
@Override
public String getTitle() {
return "Java Blocks Game";
} | 0 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.