text stringlengths 14 410k | label int32 0 9 |
|---|---|
protected void buildLeavesMiddleOut(BallNode node) throws Exception {
if(node.m_Left!=null && node.m_Right!=null) { //if an internal node
buildLeavesMiddleOut(node.m_Left);
buildLeavesMiddleOut(node.m_Right);
}
else if(node.m_Left!=null || node.m_Right!=null) {
throw new Exception("Invalid... | 8 |
public float getTweenedValue(float time, float start, float change, float duration) {
switch(this) {
case IN:
return MathUtils.easeIn(time, start, change, duration);
case OUT:
return MathUtils.easeOut(time, start, change, duration);
case IN_OUT:
return MathUtils.easeInOut(time, start, change, duration)... | 4 |
private boolean jj_3_60() {
if (jj_scan_token(PLUS)) return true;
return false;
} | 1 |
public static void getUserTests(JComboBox testIdComboBox, JPanel mainPanel, CloudPanel cloudPanel, String userKey) {
if (userKey == null || userKey.isEmpty()) {
JOptionPane.showMessageDialog(mainPanel, "Please enter user key", "No user key", JOptionPane.ERROR_MESSAGE);
return;
}
... | 2 |
public void keyTyped(KeyEvent e) {
} | 0 |
public void setExpLogica(PExpLogica node)
{
if(this._expLogica_ != null)
{
this._expLogica_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.par... | 3 |
@Override
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("setCardText"))
{
String s = new CardTextDialog(property.getValue()).showInputDialog();
if (s == null) { s = property.getValue(); }
if (s != null && s.isEmpty()) { s = null; }
property.value = s;
frame.reRenderCar... | 9 |
public static <T extends CsvBean> String getFieldValue(T bean, String title) throws CsvWriteException {
try {
Field[] fields = bean.getClass().getDeclaredFields();
for (Field field : fields) {
String fieldTitle = getFieldCaption(field);
if (fieldTitle == null || fieldTitle.equals(title) ... | 6 |
public ServerT(MyConnection c, MyConnection headx){
head = headx;
conn = c;
gameState = 0;
flag = 0;
try{
loadFromFile();
}catch(Exception e){
System.out.println("Error from loading the file.");
}
} | 1 |
void calculerHoraires(){
etat = EtatItineraire.PRET;
int idxPlageCourante = this.getIdxProchainePlageHoraireNonVide(-1);
if(idxPlageCourante != -1){
Calendar heureLivraison = (Calendar) this.plagesHoraire.get(idxPlageCourante).getHeureDebut().clone();
//L'entrepot prend l'heure tel que la 1�re livraison... | 6 |
@Override
public ParseResult<T, List<A>> parse(LList<T> tokens) {
List<A> results = new ArrayList<A>();
ParseResult<T, A> r;
LList<T> restTokens = tokens;
while(true) {
r = this.parser.parse(restTokens);
if(r.isSuccess()) {
results.add(r.getValue());
restTokens = r.getRestTokens();
} else {
... | 2 |
public void deleteNode(T deleteItem){
LinkedListNode<T> current;
LinkedListNode<T> trailCurrent;
boolean found;
if ( first == null) //the list is empty
System.err.println("Cannot delete from an empty "
+ "list.");
else{
i... | 8 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Node other = (Node) obj;
if (guid == null) {
if (other.guid != null)
return false;
} else if (!guid.equals(other.guid))
return false;... | 9 |
private void add()
{
String key;
List<String> keys = new ArrayList<String>();
for (int i = 0; i < listGauche.getSize(); i++) {
if (gauche.isSelectedIndex(i)) {
keys.add(listGauche.getKey(i));
data.setUse(data.getID(i), true ) ; // ... | 3 |
private Model method206(int i, int j)
{
Model model = (Model) aMRUNodes_264.insertFromCache((i << 16) + j);
if(model != null)
return model;
if(i == 1)
model = Model.method462(j);
if(i == 2)
model = EntityDef.forID(j).method160();
if(i == 3)
model = client.myPlayer.method453();
if(i == 4)
mod... | 7 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, SQLException, ClassNotFoundException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String user = request.getPa... | 6 |
@Override
public Vector3f getFarthestPointInDirection(Vector3f direction) {
Vector3f max = polygons.get(0).verticies.get(0).coord;
float maxDotProduct = max.dotProduct(direction);
// Loop though all of our polygons
for(Polygon p : polygons){
// And all of the vertices in... | 3 |
public Object get(String key) throws JSONException {
if (key == null) {
throw new JSONException("Null key.");
}
Object object = this.opt(key);
if (object == null) {
throw new JSONException("JSONObject[" + quote(key) +
"] not found.");
}... | 2 |
@Override
public void run() {
while(true){
long start = System.currentTimeMillis();
logic();
long cost = System.currentTimeMillis() - start;
repaint();
// System.out.println("[ͻ]ʱ: "+cost);
}
} | 1 |
public String getNickname(String id) throws Exception{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
String nickname = "";
try{
conn = getConnection();
sql = "select nickname from member where id=?";
pstmt = conn.prepareStatement(sql);
pstmt.setStr... | 8 |
public void visit_saload(final Instruction inst) {
stackHeight -= 2;
if (stackHeight < minStackHeight) {
minStackHeight = stackHeight;
}
stackHeight += 1;
} | 1 |
private void trickleUp(int index) {
int parent = (index - 1) / 2;
BTPosition<T> bottom = heap.get(index);
while (index > 0
&& comp.compare(heap.get(parent).element(), bottom.element()) < 0) {
heap.set(index, heap.get(parent));
index = parent;
parent = (parent - 1) / 2;
}
heap.set(index, bottom)... | 2 |
public void place()
{
Territory deployTerrit = null;
Continent[] conts = game.getMap().getContinents();
Continent targetCont = null;
int max = Integer.MIN_VALUE;
for (Continent cont : conts)
{
if (cont.getBonus() > 0)
{
int score = cont.getBonus() * (2 * cont.getFriendlyTerritories(this).length -... | 8 |
private static boolean checkAtleastTwoAreTrue(boolean a, boolean b, boolean c)
{
return a ? (b || c ) : ( b && c);
} | 3 |
public static Path findRoomToRoomPath(Set<Door> startDoors,
Set<Door> endDoors) {
// Get identifiers for end doors:
if(endDoors.isEmpty() || startDoors.isEmpty()) {
CASi.SIM_LOG.warning("No doors in start or end room");
return null;
}
Set<Integer> identifiers = new HashSet<Integer>();
for (Door d : e... | 8 |
@Override
protected void buildTopPanel() {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout(10, 10));
// this does not need to be referenced else where, only for layout
JPanel rightPane = new JPanel();
BoxLayout b = new BoxLayout(rightPane, BoxLayout.Y_AXIS);
btnSave.setPreferredSize(btnPick... | 2 |
public double getLeftSpeed(){
return _left.get();
} | 0 |
BlogSearchResponse(JSONObject jsonObject) {
super(jsonObject);
if (this.Count > 0) {
JSONArray results = (JSONArray) jsonObject.get("results");
@SuppressWarnings("unchecked") Iterator<JSONObject> iterator = results.iterator();
while (iterator.hasNext()) {
Results.add(new BlogResult(iterator.next()))... | 2 |
protected void collapseZeros(Node n) {
ArrayList<Node> kids = new ArrayList<Node>();
for(Node kid : n.getOffspring())
kids.add(kid);
boolean movedANode = false;
for(int i=0; i<kids.size(); i++) {
if (kids.get(i).getDistToParent()==0) {
if (n.getParent()==null) {
System.err.println("Uh-oh, null p... | 8 |
public void printScores(List<String> terms, List<String> poss, int sentiment) {
Set<String> negationTerms = new HashSet<String>();
negationTerms.add("not");
negationTerms.add("n't");
negationTerms.add("never");
for (int i = 0; i < terms.size(); i++) {
String pos = poss.get(i);
pos = pos.substring(0, M... | 5 |
private static void getClosest(String documentName) {
Document target = getDoc(documentName);
if(target == null){
System.out.println("no such document");
return;
}
Map<Document, Double> documentDistances = new HashMap<Document, Double>();
for(Document doc : library){
documentDistances.put(doc, target... | 6 |
public void setServerData()
{
int i = 0;
for (i = 0; i < mRows; i++)
{
mServerData[i][0] = "Ford";
mServerData[i][1] = "Fiesta";
mServerData[i][2] = mColours[i];
}
for (i = 0; i < mRows; i++)
{
mServerData[i + mRows][0] = "BMW";
mServerData[i + mRows][1] = "520i";
mServerData[i + mRows]... | 4 |
public boolean checkCell(int dir){
int[][] gameBoard= game.getBoard();
try {
if (dir == 0)
return (gameBoard[this.x][this.y-1] != 0);
else if (dir == 1)
return (gameBoard[this.x-1][this.y] != 0);
else if (dir == 2)
return (gameBoard[this.x][this.y+1] != 0);
else
return (gameBoard[this.x+1][this.... | 4 |
public int getMdLen(){
int len = 0;
for( int gr = 0; gr < MAXGR; gr++ )
for (int ch = 0; ch < CHANNELS; ch++) {
len += si.gr[gr].ch[ch].get_part2_3_length();
}
if (len % 8 != 0)
len = len / 8 + 1;
else len /= 8;
return len;
} | 3 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Publisher other = (Publisher) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
ret... | 6 |
private int[][] checkType(String type) {
switch (type) {
case "grid":
return grid;
case "solution":
return solution;
default:
System.out.println("ERROR: Invalid type sent to writeBoard: " + type + " recieved.");
... | 2 |
public void render(Graphics g) {
if (image != null) {
int xPos = pixelizeManager.mapToPanelX((int) mapX);
int yPos = pixelizeManager.mapToPanelY((int) mapY);
//flip the yPos since drawing happens top down versus bottom up
yPos = pixelizeManager.getPHeight() - yPo... | 1 |
public void buildTree(Instances data, SimpleLinearRegression[][] higherRegressions,
double totalInstanceWeight, double higherNumParameters) throws Exception{
//save some stuff
m_totalInstanceWeight = totalInstanceWeight;
m_train = new Instances(data);
m_isLeaf = true;
m_sons = null;
m_numInstances = m_... | 8 |
public void testMove() {
TimeServer ts = new TimeServerLinked();
Road r = new Road();
Car c1 = new Car(ts, r);
r.accept(c1);
c1.run();
Assert.assertTrue(c1.getPosition() > 0);
double c1Orig = c1.getPosition();
Car c2 = new Car(ts, r);
r.accept(c2);
c2.run();
for (int i =0;i... | 2 |
synchronized private void addMessage(LogEntry entry, Document d) {
SimpleAttributeSet color = null;
switch (entry.level) {
case ERROR:
color = RED;
break;
case WARN:
color = YELLOW;
case INFO:
break;
case DEBUG:
... | 6 |
public String toString() {
String objectString = "";
objectString += "States: ";
//Step through the list of states, adding each one to the output string
for (State state: states) {
objectString += state.getNonTerminal();
if (!(states.indexOf(state) == (states.size()-1))) {
objectString += ", ";
... | 7 |
public void saveUniforms(String fileName) {
String[] shader_data = app.loadStrings(fileName);
for(int i=0;i<shader_data.length;i++) {
if(shader_data[i].contains("{"))
break;
boolean isUniform = shader_data[i].contains("uniform") && !shader_data[i].contains("textureSampler") &&
!shader_data[i].con... | 8 |
public double[][][] getGridD2ydx2dx3(){
double[][][] ret = new double[this.lPoints][this.mPoints][this.nPoints];
for(int i=0; i<this.lPoints; i++){
for(int j=0; j<this.mPoints; j++){
for(int k=0; k<this.nPoints; k++){
ret[this.x1indices... | 3 |
public void end(boolean death){
String stageName = null;
stageName = stageChanger.getNextStage(currentStage, totalStages);
if (death == true){
gameOver = true;
if(gameEnd){
gameEnd =false;
player.deathCount += 1;
}
playerSaver.playerSaver(player);
mainWindow.endGame(death);
}
else if (s... | 5 |
public final void mecca() throws RecognitionException, TokenStreamException {
try { // for error handling
{
_loop285:
do {
if ((_tokenSet_0.member(LA(1)))) {
instruction();
}
else {
break _loop285;
}
} while (true);
}
configuration();
{
_loop287:
do... | 7 |
protected <H extends Transformer<?>> Event<?> createEventFor(
final Class<H> transformerType, final Object result) {
try {
if (transformerType == SchlegelTransformer.class) {
// cast is safe if properly called.
SchlegelCompound sc = (SchlegelCompound) result;
return ... | 6 |
public void setPublic(final boolean flag) {
if (this.isDeleted) {
final String s = "Cannot change a field once it has been marked "
+ "for deletion";
throw new IllegalStateException(s);
}
int mod = methodInfo.modifiers();
if (flag) {
mod |= Modifiers.PUBLIC;
} else {
mod &= ~Modifiers.PUBLI... | 2 |
public void createShopItem(Node item) {
String name = null;
String description = null;
String sprite = null;
int cost = 0;
ShopEvent event = null;
Node attr = item.getFirstChild();
while(attr != null) {
if(attr.getNodeType() == Node.ELEMENT_NO... | 7 |
private static String addBodyMethod(CtClassType clazz,
ClassFile classfile,
CtMethod src)
throws BadBytecode, CannotCompileException
{
Hashtable bodies = clazz.getHiddenMethods();
String bodyname = (String)bodies... | 3 |
private static ArrayList<String> findTwo(String schars, int begin, int end) {
ArrayList<String> ret = new ArrayList<String>();
for(int i=begin;i<=end-1;i++){
String first = schars.substring(begin,i+1);
String second = schars.substring(i+1,end+1);
if((first.charAt(0) ... | 9 |
private void initColumnSizes(JTable table) {
TableColumn column = null;
for (int i = 0; i < 3; i++) {
column = table.getColumnModel().getColumn(i);
if (i == 0 || i == 2) {
column.setPreferredWidth(30);
} else {
column.setPreferredWidth(... | 3 |
@Override
public void documentAdded(DocumentRepositoryEvent e) {} | 0 |
void checkEndMethod() {
if (endMethod) {
throw new IllegalStateException(
"Cannot visit elements after visitEnd has been called.");
}
} | 1 |
public void listen() {
listen = new Thread("Listen") {
public void run() {
while (running) {
String message = client.receive();
if (message.startsWith("/c/")) {
// Removing /c/ and /e/ from the string.
message = message.split("/c/|/e/")[1];
client.setID(Integer.parseInt(messag... | 4 |
@Test
public void stackReturnsValuesInCorrectOrder() {
int[] expected = new int[100];
for (int i = 0; i < expected.length; i++) {
expected[99-i] = i;
s.push(i);
}
int[] actual = new int[100];
for (int i = 0; i < actual.length; i++) {
actual... | 2 |
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 fe... | 3 |
public Builder setRolls(IRollFactory factory_roll, int nrolls) {
for (int i = 0; i < nrolls; i++) {
rolls_list.add(factory_roll.createNormalRoll());
}
return this;
} | 1 |
@Override
public void run() {
kernel = CommandKernel.getInstance();
// Runtime r = Runtime.getRuntime();
CompileUnit c = null;
while (runnable) {
try {
if (next == null) {
getCommand();
}
c = next;
next = null;
if (c != null) {
writeCmd(c.getCommand());
Process p = builde... | 8 |
public static DataInputStream getMainInputStream(String fileName) throws ClassFileLoaderException
{
File file = new File(fileName);
if (!file.exists())
throw new ClassFileLoaderException("Файл \"" + fileName + "\" не найден.");
if (file.isDirectory())
... | 4 |
@Override
public boolean isEmpty() {
for (int i = 0; i < buffer.length; ++i) {
if (buffer[i] != null) {
return false;
}
}
return true;
} | 2 |
int push(int item) {
push(new Integer(item));
return item;
} | 0 |
static public RaceT resolvePandarenFaction(long bits) {
boolean a = PANDAREN_A.isMemberOf(bits);
boolean h = PANDAREN_H.isMemberOf(bits);
boolean n = PANDAREN_N.isMemberOf(bits);
if (a && !h && !n) {
return PANDAREN_A;
} else if (!a && h && !n) {
r... | 9 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
OptimusInstanceID other = (OptimusInstanceID) obj;
if (id != other.id)
return false;
return true;
} | 4 |
public boolean registerOriginalFile(FileAttribute fAttr, int sourceID)
{
if (fAttr == null || sourceID == -1) {
return false;
}
ArrayList list = (ArrayList) catalogueHash_.get( fAttr.getName() );
if (list != null) {
list.add( new Integer(sourceID) );
... | 3 |
public void setOutputParamInteger(final int paramIndex, Object array) throws IllegalArgumentException, NullPointerException, ClassCastException {
if (array==null) throw new NullPointerException(ARRAY_IS_NULL);
OutputParameterInfo param = getOutputParameterInfo(paramIndex);
if ((param==null)||(pa... | 5 |
public Object decodeSignature(byte[] k) {
// magic
if (k[0] != Registry.MAGIC_RAW_RSA_PSS_SIGNATURE[0]
|| k[1] != Registry.MAGIC_RAW_RSA_PSS_SIGNATURE[1]
|| k[2] != Registry.MAGIC_RAW_RSA_PSS_SIGNATURE[2]
|| k[3] != Registry.MAGIC_RAW_RSA_PSS_SIGNATURE[3]) {
thro... | 5 |
public List<String> createAllKUniversals() {
List<String> kUniversal = new ArrayList<String>();
double pow = Math.pow(2, k);
for (int i = 0; i < pow; i++) {
kUniversal.add("");
}
for (int j = k; j > 0; j--) {
double alternate = Math.pow(2, j - 1);
... | 6 |
private void intGUI() {
//set window size/scale
StdDraw.setScale(-25.0, 125.0);
//draw the grid
for (int x = 0; x <= 10; x++) {
StdDraw.line(0.0, 10 * x, 100.0, 10 * x);
}
for (int y = 0; y <= 10; y++) {
StdDraw.line(10 * y, 0.0, 10 * y, 100.0);
}
//add all the text (numbers) around the grid
for... | 6 |
protected mxRectangle computeAspect(mxCellState state, mxRectangle bounds,
String direction)
{
double x0 = bounds.getX();
double y0 = bounds.getY();
double sx = bounds.getWidth() / w0;
double sy = bounds.getHeight() / h0;
boolean inverse = (direction != null && (direction.equals("north") || direction
... | 5 |
public void calcuateTFIDF(BufferedReader oBufferedReader)
throws IOException {
Hashtable<String, Integer> oTermVsTF = new Hashtable<String, Integer>();
String strLine = null;
while ((strLine = oBufferedReader.readLine()) != null) {
if (strLine.trim().startsWith("<top>"))
totalDocs++;
if (strLine.star... | 9 |
public MessageShower(String message,IOnStringInput onStringInput) {
this.message = message;
this.onStringInput = onStringInput;
} | 0 |
private String jobManager(String str) {
String stringToReturn = "";
if (ListUtil.isAList(str) == true) {
String[] linesArray = arrayOfBloks(str);
for (int i = 0; i < linesArray.length; i++) {
if (ListUtil.isAList(linesArray[i]) == true) {
strin... | 5 |
public synchronized boolean leave(int clientID) {
if (_clients.get(clientID) == null) {
return false;
}
if (clientID == 0) {
_isOpen = false;
ArrayList<ClientThread> clients = new ArrayList<>(_clients.values());
for (ClientThread client : ... | 6 |
public static Team getTeamWithLessPlayers() throws NullPointerException {
if(bluePlayers==0){
SurvivalWars.log.info("blue");
bluePlayers++;
return Team.blue;
}
if ((bluePlayers < (redPlayers & yellowPlayers & purplePlayers))) {
//Hier voeg je de ... | 5 |
@Override
public void setSootOptions(Options options) {
// explicitly include packages for shorter runtime:
List<String> includeList = new LinkedList<String>();
includeList.add("java.lang.");
includeList.add("java.util.");
includeList.add("java.io.");
includeList.add("sun.misc.");
includeList.add("androi... | 0 |
@Consume()
public void validateOAuth(@Properties Map<?, ?> properties, @Headers Map<?, ?> headers) throws HrSecurityException {
AccessTokenDetails tokenDetails = null;
try {
tokenDetails = getTokenFromUaa((String) properties.get("AuthorizationToken"));
} catch (ClientProtocolException e) {
throw new HrSec... | 7 |
public ArrayWorld(Cell[][] cells) {
this.cells = cells;
for (int i = 0; i < this.cells.length; i++) {
for (int j = 0; j < this.cells[i].length; j++) {
this.cells[i][j] = this.cells[i][j] == null ? Cell.DEAD : this.cells[i][j];
}
}
} | 3 |
protected void onSetNoExternalMessages(String channel, String sourceNick, String sourceLogin, String sourceHostname) {} | 0 |
private int getBlockOnScreen(int var1, int var2) {
for(int var3 = 0; var3 < SessionData.allowedBlocks.size(); ++var3) {
int var4 = this.width / 2 + var3 % 9 * 24 + -108 - 3;
int var5 = this.height / 2 + var3 / 9 * 24 + -60 + 3;
if(var1 >= var4 && var1 <= var4 + 24 && var2 >= var5 - 12 &... | 5 |
protected static void read(SkinPropertiesVO props, Path source) throws IOException {
assert (props != null) && FileUtil.control(source);
readImages(source, props);
readLayoutSettings(source, props);
props.setChangestatus(false);
} | 1 |
public Row solveThisRow(final BigInteger useModulus)
{
// Determine non-zero column:
Integer nonZeroColumn = null;
for (int col = 1, n = cols.length; col < n; col++)
{
if (! this.isColumnZero(col))
{
if (nonZeroC... | 8 |
private void update() {
serverReset();
repaint();
revalidate();
repaint();
if (MODE == USERNAME) {
status.setText("Enter a Username");
status2.setText("");
serverChange.setVisible(false);
serverChange.setEnabled(false);
serverJoin.setEnabled(false);
serverScan.setEnabled(false);
serverCr... | 6 |
private void updateAnimationsImpl(long timeDelta) {
if(timeDelta == 0 || this.renderLists == null)
return;
for(ArrayList<Renderable> r : this.renderLists)
for(Renderable rr : r)
rr.updateAnimation(timeDelta);
this.timeDeltaAnimations = 0;
} | 4 |
private void stackToOneCol (double[][] src, double [][] dst, int width, int height) {
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
dst[x * height + y][0] = src[y][x];
}
}
} | 2 |
public void renderBar(int xp, int yp, double WIDTH, Sprite sprite) {
for (int y = 0; y < sprite.HEIGHT; y++) {
int ya = y + yp;
for (int x = 0; x < WIDTH; x++) {
int xa = x + xp;
if (xa < -16 || xa >= width || ya < 0 || ya >= height) break;
if (xa < 0) xa = 0;
int col = sprite.pixels[x + y * spr... | 8 |
public void setAccounts(List<Account> accounts) {
this.accounts = accounts;
} | 0 |
public int dup_x1s(final LocalExpr expr) {
int toReturn = 0;
final UseInformation UI = (UseInformation) useInfoMap.get(expr);
if (UI == null) {
if (StackOptimizer.DEBUG) {
System.err
.println("Error in StackOptimizer.dup_x1s: parameter not found in useInfoMap");
}
return toReturn;
}
toRe... | 6 |
protected static String fieldNameToPath(String fieldName) {
char[] chars = fieldName.toCharArray();
if (chars.length == 0) {
throw new IllegalArgumentException("Empty string is not a valid field name!");
}
StringBuilder path = new StringBuilder().append(Character.toLowerCase... | 3 |
public Date getDataNascita() {
return dataNascita;
} | 0 |
public void tick() {
Collections.sort(area.entities, new EntityComparator());
for(int i = 0; i < area.entities.size(); i++) {
area.entities.get(i).tick();
if(area.entities.get(i) instanceof Incomplete) {
if(((Incomplete)area.entities.get(i)).progress >= 4000) {
area.entities.add(new LumberPost(area.e... | 7 |
*/
private void instChange(boolean isChange) {
// Cookie情報用リスト
ArrayList<String> valueList = new ArrayList<String>();
if (isInstCheck.size() == 0) {
return;
}
for (Iterator i=isInstCheck.keySet().iterator(); i.hasNext(); ) {
String key = (String)i.next();
boolean before = (boolean... | 6 |
private void doMain() throws IOException, SAXParseException {
out = new PrintWriter(new FileWriter(placesOut));
if (gedcomIn.isDirectory()) {
for (File file : gedcomIn.listFiles()) {
processGedcom(file);
}
}
else if (gedcomIn.isFile()) {
processGedcom(gedco... | 3 |
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if(cmd.getName().equalsIgnoreCase("town")) {
if(sender instanceof Player)
{
//a player has typed /town - we'll be doing stuff here!
//check if no options were passed after the town command.
if(arg... | 5 |
public Type unionTypes(final Collection types) {
if (types.size() <= 0) {
return (Type.OBJECT);
}
final Iterator ts = types.iterator();
Type type = (Type) ts.next();
while (ts.hasNext()) {
type = this.unionType(type, (Type) ts.next());
}
return (type);
} | 2 |
@Override
public void stop() throws Exception {
super.stop();
} | 0 |
public GUI(){
UIManager.put("Slider.paintValue", false);
//All this because of the reflection needed for the silly slider.
try {
startGUI();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Class... | 7 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Customer other = (Customer) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;... | 6 |
public void hit(Card nextCard) {
handValue += nextCard.getCardValue();
if (nextCard.getValue() == 1) {
aceCount++;
}
while (handValue > 21 && aceCount > 0) {
handValue = handValue - 10;
aceCount--;
}
} | 3 |
public void removeField(CtField f) throws NotFoundException {
checkModify();
FieldInfo fi = f.getFieldInfo2();
ClassFile cf = getClassFile2();
if (cf.getFields().remove(fi)) {
getMembers().remove(f);
gcConstPool = true;
}
else
throw new... | 1 |
protected int findStartOfExpression(Vector expression) {
int startIndex = 0;
while (startIndex < expression.size()) {
JavaToken test = (JavaToken) expression.elementAt(startIndex);
if (((test instanceof JavaKeyword) && test.value.equals("return"))
|| ((test instanceof JavaIdentifier) && test.value.equals(... | 9 |
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.