text stringlengths 14 410k | label int32 0 9 |
|---|---|
public IconKeyListener() {
super();
} | 0 |
public boolean hasNext() {
if(map.root == null)
return false;
if(current != null && current.getNext() == null)
return false;
return true;
} | 3 |
@SuppressForbidden(reason = "System.out required: command line tool")
static IndexUpgrader parseArgs(String[] args) throws IOException {
String path = null;
boolean deletePriorCommits = false;
InfoStream out = null;
String dirImpl = null;
int i = 0;
while (i<args.length) {
String arg = a... | 8 |
public UnconditionalFlowInfo mitigateNullInfoOf(FlowInfo flowInfo) {
if ((this.tagBits & NULL_FLAG_MASK) == 0) {
return flowInfo.unconditionalInits();
}
long m, m1, nm1, m2, nm2, m3, a2, a3, a4, s1, s2, ns2, s3, ns3, s4, ns4;
boolean newCopy = false;
UnconditionalFlowInfo source = flowInfo.unconditionalInits();
... | 8 |
public static int numberOfFrames() {
return environmentToFrame.size();
} | 0 |
@Override
public void onPrivmsg(String connectionName, String host, Message m) {
if(m.getContent().toLowerCase().contains("$"+connection.getNick())) {
String mess = m.getContent();
System.out.println("mess:"+mess);
if(mess.toLowerCase().contains(":")) {
mess = mess.substring(mess.indexOf(" ")+1, mess.le... | 8 |
public PaintSurface(Canvas paintCanvas, Text statusText, Color fillColor) {
this.paintCanvas = paintCanvas;
this.statusText = statusText;
clearStatus();
/* Set up the drawing surface */
Rectangle displayRect = paintCanvas.getDisplay().getClientArea();
imageWidth = displayRect.width;
imageHeight = display... | 9 |
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof Block))
return false;
Block other = (Block) obj;
if (data == null) {
if (other.data != null)
return false;
} else if (!data.equals(other.data))
return false;
... | 8 |
@SuppressWarnings("unchecked")
private void loadCollection(Object obj, XmlParserContext context, Field field) throws XMLStreamException, IllegalArgumentException, IllegalAccessException, InstantiationException {
Object collection = null;
String marker = getMarker();
String tag;
while ((tag = nextTag(marker)) !... | 9 |
protected void execute() {
double left = Robot.oi.getLeftDrive(),
right = Robot.oi.getRightDrive();
// SmartDashboard.putNumber("Left", left);
// SmartDashboard.putNumber("Right", right);
Robot.driveTrain.tankDrive(left,right);
} | 0 |
public static void main(String[] args) {
try {
if (args.length != 2) {
System.out.println("useage: java -jar TouchToggle.jar server_ip_address server_port");
System.exit(0);
}
Socket sock = new Socket(args[0], Integer.parseInt(args[1]));
... | 7 |
public RQIterator() {
this.i = next - 1;
this.ar = a;
if (i > 0)
new Shuffle().shuffle(ar, 0, i - 1);
} | 1 |
private boolean directLineTo(Graphics2D g, Connector c, Point ep) {
Point p = c.getDirectP();
Point tp;
if (c.isVertical())
tp = new Point(p.x, ep.y);
else
tp = new Point(ep.x, p.y);
if (eFrom.intersects(tp, p) || eTo.intersects(tp, p)
|| eFrom.intersects(tp, ep) || eTo.intersects(tp, ep))
retur... | 5 |
private void checkInput(long elapsedTime) {
if (exit.isPressed()) {
stop();
}
Player player = (Player)map.getPlayer();
if (player.isAlive()) {
float velocityX = 0;
if (moveLeft.isPressed()) {
velocityX-=player.getMaxSp... | 5 |
@Override
public int getxattrsize(String path, String name, FuseSizeSetter sizeSetter)
throws FuseException {
try {
ExtendedAttribute attribute = fileSystem.getExtendedAttribute(path, name);
sizeSetter.setSize(attribute.getContent().length);
return 0;
} catch (PathNotFoundException e) {
return Errno... | 7 |
public static boolean containsElement(Object[] array, Object element) {
if (array == null) {
return false;
}
for (Object arrayEle : array) {
if (nullSafeEquals(arrayEle, element)) {
return true;
}
}
return false;
} | 3 |
private Note readNoteFromFile( final long id, final File noteFile ) {
if( !noteFile.exists() || !noteFile.canRead() ) {
return null;
}
BufferedReader r = null;
try {
r = FileHelper.getBufferedUtf8FileReader( noteFile );
return readNoteFromReader( r );
}
catch( final IOException e ) {
throw new... | 3 |
@Override
public boolean equals(Object obj) {
if (null == obj) {
return false;
}
if (this == obj) {
return true;
}
if (obj instanceof PostParameter) {
PostParameter that = (PostParameter) obj;
if (file != null ? !file.equals... | 6 |
public void drawTrees(Graphics g, Player p){
if(p.getCurrentCity() == 1){
if(p.getInside()){
}else{
int s = p.getCurrentSec()-1;
for(int i = 0; i < 1200; i++){
if(s>5)
g.drawImage(city1Tree[s][i].getImage(), city1Blocks[i].x, city1Blocks[i].y, null);
}
}
}
} | 4 |
@Override
public void buildRoad(IPresenter presenter, EdgeLocation roadLocation) {
MoveResponse response = presenter.getProxy().buildRoad(presenter.getPlayerInfo().getIndex(), roadLocation, false, presenter.getCookie());
if(response != null && response.isSuccessful()) {
presenter.updateServerModel(response.getG... | 2 |
public final void setPos(int x, int y, boolean teleported) {
if (animation != -1
&& AnimationSequence.animations[animation].precedenceWalking == 1)
animation = -1;
if (!teleported) {
int distanceX = x - waypointX[0];
int distanceY = y - waypointY[0];
if (distanceX >= -8 && distanceX <= 8 && distance... | 9 |
@Override
public void execute(CommandSender sender, String Command, List<String> list) {
this.sender = sender;
if (Command.equals("save")) {
this.getConfigHandler().save();
this.reply("Saved the data to config file");
}
if (Command.equals("reload")) {
this.getConfigHandler().load();
this.reply("Fil... | 4 |
public void execute() {
for (int i = 0; i < commands.length; i++) {
commands[i].execute();
}
} | 1 |
public void addAlerts(Collection<Alerts> newAlerts) {
if (newAlerts == null) {
return;
}
if (alerts == null) {
alerts = new ArrayList<Alerts>(newAlerts);
return;
}
for (Alerts alert : newAlerts) {
if (!alerts.contains(alert)) {
alerts.add(alert);
}
}
} | 4 |
public static String unorthodoxFrac(int num, int den){
double ans = (double)num/(double)den;
if((double)(num%10)/(double)(den%10)==ans && num/10==den/10) return String.valueOf(num) + " / " + String.valueOf(den);
else if((double)(num%10)/(double)(den/10)==ans && num/10==den%10) return String.valueOf(num) + " / ... | 8 |
public static void main(String[] args)
{
Deck deck = new Deck();
Hand ourHands[] = new Hand[5];
for (int i=0; i<5; i++)
{
ourHands[i] = new Hand(deck);
ourHands[i].evaluateHand();
ourHands[i].display(); //show the summary of the hand, e... | 6 |
public String getType(){
return type;
} | 0 |
private void setUp(Image im, String t) {
setTitle(t);
// Build box buttonBox of buttons.
// First compute largest button size.
int msize = 0;
for (int i=0; i < buttonLabelList.length; i= i+1) {
if (msize < buttonLabelList[i].length()) {
msize = buttonLabelList[i].length();
}
} ... | 4 |
@Override
public boolean containsKey(Object key) {
if (!(key instanceof Binary))
return false;
final Binary bKey = (Binary) key;
final byte[] keyData = bKey.getValue();
final int keySize = keyData.length;
final int hash = Math.abs(hashFunction.ap... | 7 |
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
resp.setContentType("text/plain");
String queueName = AnalysisUtility.extractParameterOrThrow(req,
AnalysisConstants.QUEUE_NAME_PARAM);
String bigqueryProjectId = AnalysisUtility.extractParameterOrThrow(req,
AnalysisConstants.BIGQUERY_... | 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 |
public void setBaseSalary(double salary) {
baseSalary = (salary < 0.0) ? 0.0 : salary;
} | 1 |
public Point(double x, double y)
{ this.X = x; this.Y = y; } | 0 |
public Rectangle getRect(){
return new Rectangle(x,y,w,h);
} | 0 |
public static void SwapPrepareTask(String typeId, String flowID, boolean up, boolean top, boolean bottom) {
TaskInfoStorage tis = ThreadWorkerDispatcher.taskInfoStorageMap.get(typeId);
if (tis != null) {
LinkedHashMap<String, TaskThread> perparing = tis.PREPARING_TASK;
for (Entry<String, TaskThread> taskThrea... | 9 |
public static final int StateUpdateRep(int index)
{
return index < 7 ? 8 : 11;
} | 1 |
private void lazyInstantiation() {
if (isInitialized) {
return;
}
chooser = new OutlinerFileChooser(null);
isInitialized = true;
} | 1 |
public DFA(String pattern, int R) {
this.pattern = pattern;
this.R = R;
int M = pattern.length();
// initialize
dfa = new int[R][];
for (int r = 0; r < R; r++)
dfa[r] = new int[M];
dfa[pattern.charAt(0)][0] = 1;
// build DFA
for (int X = 0, j = 1; j < M; j++) {
// mismatch
for (int c ... | 3 |
public String toString()
{
String out = "";
for(int i = 0; i < compounds.length; i++)
out += " + "+compounds[i];
out = out.substring(3);
return out;
} | 1 |
private SplayTreeNode zag(SplayTreeNode node) {
SplayTreeNode k1 = new SplayTreeNode(node.parent);
SplayTreeNode k1Parent = k1.parent;
SplayTreeNode a = new SplayTreeNode(node.parent.left);
if (a.isNull())
a.parent = k1;
SplayTreeNode k2 = new SplayTreeNode(node);
... | 4 |
@Override
public void actionPerformed(ActionEvent event)
{
JButton source = (JButton) event.getSource();
if(owner != null && source.equals(buttons[0])) // button object for restart
{
owner.restart();
}
else if(ownerGame != null && source.equals(buttons[1]))
{
... | 4 |
public void writeEncodedAttribute(String attribute) {
int length = attribute.length();
for (int i = 0; i < length; i++) {
char ch = attribute.charAt(i);
if (ch == '<') {
print(LESS_THAN_ENTITY);
} else if (ch == '>') {
print(GREATER_THAN_ENTITY);
} else if (ch == '&') {
print(AMPERSAND_ENT... | 8 |
public void logout(ServerThread client){
currentClients.remove(client);
boolean userNameStillUsed = false;
for(ServerThread thread : currentClients){
if (thread.getUserName().equals(client.getUserName())){
userNameStillUsed = true;
}
}
//Client was only one using the username
if(!userNameStillUsed... | 5 |
public static boolean equals(String s, String s1) {
if (s.length() != s1.length()) {
return false;
}
char c[] = s.toCharArray();
char c1[] = s1.toCharArray();
for (int i = 0; i < s.length(); i++) {
if (c[i] != c1[i]) {
return false;
}
}
return true;
} | 3 |
public int getShort() { // readSignedWord
offset += 2;
int v = ((payload[offset - 2] & 0xff) << 8) + (payload[offset - 1] & 0xff);
if (v > 32767) {
v -= 0x10000;
}
return v;
} | 1 |
private void parse(boolean target, boolean debug) throws IOException{
System.out.println("stage: parser");
PrintWriter pw = null;
if (target){
outFile = new File(this.name + ".parse");
outFile.createNewFile();
pw = new PrintWriter(new FileWriter(outFile));
if (debug)
System.out.println("Se creo el... | 4 |
private void buildTable(String button) {
URL[] urls;
switch (button) {
case "all":
urls = xml.getURLs();
break;
case "page":
urls = xml.getURLsOfType(URLType.Page);
break;
case "document":
... | 3 |
@Override
public void run() {
for (Actor element: myUniverse.getShapeList()) {
element.onTick();
}
} | 1 |
public static String parseAndRep(String[] args)
{
try
{
String str = args[0];
int iter = Integer.parseInt(args[1]);
if (iter <= 0) throw new NumberFormatException();
String ret = "";
for (int i=0;i<iter;i++)
{
ret += str;
if (i < iter-1) ret += " ... | 5 |
public String logout() {
loginDelegate.logout();
return "/index.xhtml?faces-redirect=true";
} | 0 |
public void setNeighbors( int[] truckdrivin){
for(int g = 0; g <= truckdrivin.length-1; g++){
switch(inmode){
case 0: neighborstate[g] = 0; break;
case 1: if(truckdrivin[g] > 0){neighborstate[g] = 1;}
else{neighborstate[g] = 0;} break;
case 2: neighborstate[g] = truckdrivin[g]; break;
default:... | 5 |
public int getColumnIndex(final String colName) {
int idx = -1;
if (columnIndex != null) {
final Integer i = columnIndex.get(colName);
if (i != null) {
idx = i.intValue();
}
}
return idx;
} | 2 |
public void testCycFormula() {
System.out.println("\n*** testCycFormula ***");
final CycFormulaSentence isaXThing = CycFormulaSentence.makeCycFormulaSentence(ISA, VAR_X, THING);
assertEquals(isaXThing.getFirstArgPositionForTerm(isaXThing), ArgPosition.TOP);
final Set<CycConstant> gatheredConstants = isa... | 3 |
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
Image image = Constanten.MARKERING_PATTERN.getImage();
int iw = image.getWidth(this);
int ih = image.getHeight(this);
if (iw > 0 && ih > 0) {
for (int x = 0; x < getWidth(); x += iw) {
... | 4 |
public ArrayList ListaKorpi() throws Exception{
ArrayList korpe=new ArrayList();
try{
stmt=con.createStatement();
String query1 = "SELECT * FROM potrosackakorpa WHERE status = "+0;
RS=stmt.executeQuery(query1);
while(RS.next()){
Korp... | 4 |
FetchPoint[] fetch(FetchRequest request) throws IOException, RrdException {
if(request.getFilter() != null) {
throw new RrdException("fetch() method does not support filtered datasources." +
" Use fetchData() to get filtered fetch data.");
}
long arcStep = getArcStep();
long fetchStart = Util.normalize(r... | 6 |
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 |
public void mouseDragged(MouseEvent e) {
Graphics2D g = image.createGraphics();
D.x = e.getX() / (int) scale;
D.y = e.getY() / (int) scale;
T.y = Math.min(D.y, S.y);
T.x = Math.min(D.x, S.x);
// drag = true;
setColor(g, false);
switch (TabbedPanel.TOOL) {
case SELECT:
this.repaint();
... | 7 |
public CheckResultMessage check17(int day) {
int r1 = get(33, 5);
int c1 = get(34, 5);
int r2 = get(39, 5);
int c2 = get(40, 5);
BigDecimal b = new BigDecimal(0);
if (checkVersion(file).equals("2003")) {
try {
in = new FileInputStream(file);
hWorkbook = new HSSFWorkbook(in);
b = getValue(r1, ... | 5 |
public Date getMinDate(){
Date ret = null;
for (Integer key: colMinDates.keySet()) {
Date d = colMinDates.get(key);
if (ret == null || ret.after(d)){
ret = d;
}
}
return ret;
} | 3 |
@Test
public void testAggregateOnInterface() throws Exception
{
int sum = (200 * 199) / 2;
int min = 0;
int max = 199;
double avg = 199.0 / 2.0;
// create a database connection
PersistenceManager pm = new PersistenceManager(driver, database, login, password);
// drop all tables
pm.dropTable(Object.c... | 3 |
void shellSort(int factor) {
int j, offset = 1;
boolean exchange;
while (offset <= points.length()-1) {
offset *= factor;
offset--;
}
while (offset > 1) { // offset-reduction-loop
offset++;
offset /= factor; // reduce offset
do {
exchange = false;
for (j = points.length()-1; j > offs... | 5 |
private void nextPermutation(Node list, Node permutationStart, Node permutationEnd, PermutationHandler handler) {
if (list == null) {
buildPermutation(permutationStart, handler);
return;
}
Node current = list;
Node previous = null;
Node next = null;
... | 7 |
public void filterPage(HTMLPage thePage, WebResponse theResult) throws Exception {
String contentAsString = theResult.getContentAsString();
if (!(contentAsString.indexOf("$Id") > -1) &&
!(contentAsString.indexOf("$Source") > -1) &&
!(contentAsString.indexOf("$Version") > -1)) {
throw new RuntimeExceptio... | 3 |
@Override
public void logic()
{
if(!isAlive())
{
return;
}
Vector dis = getLoc().sub(getCenter());
if(dis.mag() < 200 || (health < 3 && !Frame.easyMode))//chase if close
{
dx += 0.2 * dis.x/dis.mag();
dy += 0.2 * dis.y/dis.mag();
sprite.animation = 1;
}
else
{
if(Math.hypot(dx, dy) =... | 9 |
private boolean zzRefill() throws java.io.IOException {
/* first: make room (if you can) */
if (zzStartRead > 0) {
System.arraycopy(zzBuffer, zzStartRead,
zzBuffer, 0,
zzEndRead-zzStartRead);
/* translate stored positions */
zzEndRead-= zzStartRe... | 5 |
public void test_DateTime_parse_Gaza() {
try {
new DateTime("2007-04-01T00:00", MOCK_GAZA);
fail();
} catch (IllegalInstantException ex) {
assertEquals(true, ex.getMessage().indexOf("Illegal instant due to time zone offset transition") >= 0);
}
} | 1 |
@Override
/** Handler for mouse releases */
public void mouseReleased(int key, int mx, int my) {
if (!isVisible) return;
if (key == input.MOUSE_LEFT) {
int mouseUpState = getMouseState(mx, my);
if (mouseUpState == mouseDownState){
switch (mouseUpState){
case TOP:
if (currentAircraft.getAlti... | 8 |
protected void drawBaseNoShadow(Graphics2D g2d, int x, int y, int colWidth, int row, int site, Sequence seq) {
if (site>=seq.length())
base[0] = ' ';
else
base[0] = seq.at(site);
if (letterMode == NO_LETTERS) {
return;
}
if (letterMode == DIF_LETTERS) {
if (referenceSeq == null)
referenceSe... | 7 |
@Override
public void fire() {
if(salud > 0){
int value = Velocidad.MEDIA.VALUE;
if(municion > 0){
disparar(-value,"laserRojo");
}
municion = (municion--<=0)? 0 : municion;
}
} | 3 |
private static URL __getWsdlLocation() {
if (HELLOWWORLDIMPLSERVICE_EXCEPTION!= null) {
throw HELLOWWORLDIMPLSERVICE_EXCEPTION;
}
return HELLOWWORLDIMPLSERVICE_WSDL_LOCATION;
} | 1 |
public static void main(String[] args) {
// TODO Auto-generated method stub
ArrayList<String[]> str1= new ArrayList<>();
ArrayList<String[]> str= new ArrayList<>();
str=solveNQueens(4);
for(int i=0;i<str.size();i++)
{
for(int j=0;j<str.get(i).length;j++)
System.out.println("Row " + j + ":"+ str.get(i... | 2 |
public void disableTag(Tag t){
if(t == null)
this.disableTag.clear();
this.disableTag.add( t );
} | 1 |
public List<Token> parse(String input) {
List<Token> tokens = new ArrayList<Token>();
if (input == null || input.length() == 0) {
return tokens;
}
char[] array = getArray(input);
int length = array.length;
for (int i = 0; i < length; i++) {
Token token = getToken(array, i, tokens);
if (token != n... | 4 |
public void renderSprite(int xp, int yp, Sprite sprite, boolean fixed){
if(fixed){
xp -= xOffset;
yp -= yOffset;
}
for(int y = 0; y < sprite.getHeight(); y++){
int ya = y + yp;
for(int x = 0; x < sprite.getWidth(); x++){
int xa = x + xp;
if(xa < 0 || xa >= width || ya < 0 || ya >= height) cont... | 7 |
public boolean checkPassword(String passwordClear) {
return BCrypt.checkpw(passwordClear, this.passwordHashed);
} | 0 |
public boolean act( Agent agent, Action action ){
if( energy_level <= 0 ){
agent.die();
updateViews(msg);
return false;
}
boolean flag = (action != null);
if( flag ){
SimulatedAgent a = (SimulatedAgent) agent;
int x = ( (Integer) a.getAttribute(X)).intValue();
int y =... | 6 |
public void visitFlowGraph(final FlowGraph cfg) {
cfg.source().visit(this);
final Iterator e = cfg.trace().iterator();
while (e.hasNext()) {
final Block block = (Block) e.next();
block.visit(this);
}
cfg.sink().visit(this);
this.out.flush();
} | 1 |
private int jjMoveStringLiteralDfa2_8(long old0, long active0) {
if (((active0 &= old0)) == 0L)
return 2;
try {
curChar = input_stream.readChar();
} catch (java.io.IOException e) {
return 2;
}
switch (curChar) {
case 93:
if ((active0 & 0x1000000L) != 0L)
return jjStopAtPos(2, 24);
break;
... | 4 |
protected SurfaceSelection getNextRootRange(SurfaceSelection selection) {
Node base = selection.getSelection().getRange().getCommonAncestorContainer();
Element ancestor;
if (base.getNodeType() == Node.TEXT_NODE) {
ancestor = base.getParentElement();
} else {
ancestor = (Element) base;
}
if (ancestor ... | 7 |
public static void main(String args[]) {
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
... | 6 |
private void progress(State s, StateBuffer nextBuffer, StateBuffer goalBuffer) {
curGb.restore(s);
int textSpeed = curGb.readMemory(curGb.pokemon.optionsAddress) & curGb.pokemon.optionsTextSpeedMask;
int[] allowedMoves = new int[(textSpeed <= 1 ? 1 : 0) + (textSpeed >= 1 ? 1 : 0)];
if (textSpeed <= 1)
... | 7 |
@RequestMapping(value = "/login", method = RequestMethod.POST)
public ModelAndView login(
@RequestParam String email,
@RequestParam String password) throws ApplicationException {
ModelAndView model = new ModelAndView();
if (null == email || null == password || "".equalsIgno... | 6 |
@Override
public void run () {
logger.entering(loggerName, "run");
while (true) {
try {
//QueueElement qe = docq.poll();
WebQueueElement qe = (WebQueueElement) docq.poll();
if (qe == null) {
Thread.currentThread().sleep... | 6 |
public T get(int x) {
if (this.length != 0 && x < this.length) {
Node<T> ele = _head;
for (int i = 0; i < x; i++)
ele = ele.getNext();
return ele.getData();
}
return null;
} | 3 |
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==this.botaoAddCupom){
this.agente.addCupomDesejado(textoCupomNome.getText(),Double.parseDouble(textoCupomPreco.getText()));
JOptionPane.showMessageDialog(null,agente.getQuantidadeDeCuponsDesejados());
} else if(e.getSourc... | 3 |
public static String invalidAttackReason(AIUnit aiUnit, Player other) {
final Unit unit = aiUnit.getUnit();
final Player player = unit.getOwner();
return (player == other)
? Mission.TARGETOWNERSHIP
: (player.isIndian()
&& player.getTension(other).getLevel(... | 7 |
private static String[] ProcessMSG(String msg){
String processedMSG[] = new String[3];
boolean goodRead = true;
for (int i = 0; i < processedMSG.length; i++)
processedMSG[i] = "";
// msg format should be #checksum{data}
// process msg
processedMSG[0... | 8 |
private boolean testArray(int[] ary) {
int[] aryCopy = ary.clone();
// 1. Auf CLOSETIME prüfen und positive Werte
for (int elem : aryCopy) {
if (elem < 0 || elem >= Timer.CLOSETIME)
return false;
}
// 2. Intervalle prüfen
if (aryCopy[0] >= ... | 7 |
public void Collision()
{
Actor collision1 = getOneIntersectingObject(Spikyball2.class);
Actor collision2 = getOneIntersectingObject(Spikyball3.class);
Actor collision3 = getOneIntersectingObject(Ghost.class);
if(collision1 != null)//if you have not run into it
{
... | 6 |
public void removeCard(String ID) {
for (Component c : table.getComponents()) {
if ((c.getClass().equals(TCard.class)
|| c.getClass().equals(Token.class))
&& ((TCard) c).getID().equals(ID)) {
table.remove(c);
table.repaint();
... | 4 |
public static VirtualMachine createVirtualMachine(VirtualMachineConfiguration cfg) throws VirtualMachineInstantiationException, SecurityException {
try {
File java = new File(System.getProperty("java.home"), "bin" + File.separator + "java");
String program;
if (cfg.getMainCla... | 8 |
public String getString () {
return string;
} | 0 |
public void syncFileContent(String fileName, FileOperation fileOperation) {
byte operation = fileOperation.operation;
long fileLastModifiedTime = fileOperation.file.lastModified();
FileInputStream is = null;
try {
writeHasNextFileFlag(true);
if(operation == Dropbo... | 5 |
public boolean skipPast(String to) throws JSONException {
boolean b;
char c;
int i;
int j;
int offset = 0;
int length = to.length();
char[] circle = new char[length];
/*
* First fill the circle buffer with as many characters as are in the... | 9 |
public static final int paethPredictor(int a, int b, int c)
{
int p = a + b - c;
int pa = abs(p - a);
int pb = abs(p - b);
int pc = abs(p - c);
if ((pa <= pb) && (pa <= pc))
{
return a;
}
else if (pb <= pc)
{
return b;
}
else
{
return c;
}
} | 3 |
@Override
public void initialize(InputSplit split, TaskAttemptContext context)
throws IOException, InterruptedException {
Configuration conf = context.getConfiguration();
// determine if any locations are local
ArrayList<String> sortedLocations = new ArrayList<String>();
ArrayList<String> localLocations ... | 8 |
public void setFilter(String filter) {
if (captor != null)
try {
captor.setFilter(filter, true);
} catch (IOException e) {
e.printStackTrace();
}
} | 2 |
public static StringWrapper cppTranslateArrayType(ParametricTypeSpecifier arraytype) {
{ List dimensions = ParametricTypeSpecifier.arrayTypeDimensions(arraytype);
StandardObject elementtype = StandardObject.extractParameterType(arraytype, Stella.SYM_STELLA_ANY_VALUE, new Object[1]);
String translatedtyp... | 6 |
public boolean onCommand(CommandSender sender, Command cmd,
String commandLabel, String[] args) {
Player victim;
String mod;
String reason;
int display = 0;
if (commandLabel.equalsIgnoreCase("kick")) {
if (sender.hasPermission(SeruBans.KICKPERM) || sender... | 7 |
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.