text stringlengths 14 410k | label int32 0 9 |
|---|---|
public int getIndex(String opCode) {
for (int i = 0; i < size; i++) {
if (tuples[i].getValue() != null) {
if (tuples[i].getValue().equals(opCode)) {
return i;
}
}
}
return -1;
} | 3 |
private void writeArray(List<Byte> ret, Object[] val) throws EncodingException, NotImplementedException
{
writeInt(ret, (val.length << 1) | 1);
ret.add((byte)0x01);
for (Object obj : val)
encode(ret, obj);
} | 1 |
private boolean r_combo_suffix() {
int among_var;
int v_1;
// test, line 91
v_1 = limit - cursor;
// (, line 91
// [, line 92
ket = cursor;
// substring, line 92
... | 9 |
public static void main(String[] args) {
ExecutorService exec = Executors.newCachedThreadPool();
for (int i = 0; i < 5; i++)
exec.execute(new LiftOff());
exec.shutdown();
System.out.println("Waiting for LiftOff");
} | 1 |
private void init()
{
this.clock.add(DAWN);
for(int i = 0; i < MAX_CLOCK_SIZE-1; i++)
{
this.clock.add(NIGHT);
}
this.shuffle(this.clock);
for(int i = 0; i < 5; i++)
{
this.library.add(NIGHT);
}
for(int i = 0; i < 18; i++)
{
this.library.add(RUMOR);
}
for(int i = 0; i < 15; i+... | 5 |
public static boolean sleepClauseActive(Pokemon[] p, int pokemonAvailable)
{
for(int i=0; i<pokemonAvailable; i++)
{
if(p[i].status==Pokemon.Status.SLP)
return true;
}
return false;
} | 2 |
@Override
public boolean numericalCheck() {
//
// over all time steps.
//
for (int f = 0; f < this.data.framewidth; f++) {
//
// for all cells.
//
for (int j = 0; j < this.structure.cellsnum; j++) {
if (!check(this.data.... | 8 |
public boolean updatePosListaPrecioCeroA(final PosListaPrecio itemOracle){
Session hbSessionOracle = getSession(); // SESSION MYSQL
Transaction tsOracle = hbSessionOracle.beginTransaction();
boolean successOracle = false;
try {
getHibernateTemplate().execute(new HibernateCallback() {
@Override
... | 2 |
private void OpenButtonDialogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OpenButtonDialogActionPerformed
this.OpenDialog.setVisible(false);
try {
System.out.println(this.FileChooser.getSelectedFile().getName());
String name = StringTools.getNameWithoutExten... | 2 |
public void callFunc(final int startIndex, final int endIndex, MInteger outBegIdx, MInteger outNbElement)
throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
int count = 0;
for (Object item : callInputParams) {
if (PriceInputParameter.class.isAs... | 8 |
private DateTime getADate(String s) {
DateTime retDT = null;
try {
retDT = new DateTime(s, DateTimeZone.UTC);
} catch (IllegalArgumentException pe) {
pe.printStackTrace();
}
return retDT;
} | 1 |
private void moveTo(Point point) {
Point nextLocation = getLocation();
if (point.x > nextLocation.x) {
nextLocation.x++;
}
if (point.x < nextLocation.x) {
nextLocation.x--;
}
if (point.y > nextLocation.y) {
nextLocation.y++;
}
if (point.y < nextLocation.y) {
next... | 4 |
@Override
public void run()
{
double distance = Math.abs((endPoint - startPoint) / numberOfProbes);
double[] evaluationPoints = getEvaluationPoints(startPoint, distance, numberOfProbes);
List<Double> startingPointsToCheck = findRangesWhereSignsChange(f, evaluationPoints, numberOfProbes);
/*
* For eac... | 7 |
public void setId(Integer id) {
this.id = id;
} | 0 |
public Decision decide(RobotView controlledRobot, RobotEnvironmentView environmentView) {
// okreslamy czy robot ma cos w kieszeni
if (controlledRobot.getCache().isEmpty()) {
// kieszen jest pusta
logger.level2("Kieszen pusta");
// sprawdzamy czyjakis student czegos nie potrzebuje
// przegladamy wsz... | 8 |
@Override
public void run()
{
while(!end)
{
try
{
Thread.sleep(10);
}
catch (InterruptedException e) {}
repaint();
}
} | 2 |
private boolean jj_3_40() {
if (jj_3R_59()) return true;
return false;
} | 1 |
public boolean correctCombination(AnswerCombination answerCombination) {
if (answerCombination.getBlackCount() == 5) {
return true;
}
else {
return false;
}
} | 1 |
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
{
switch (npc.getNpcId())
{
case Lilith:
if (getQuestTimer("spawn_exitgk_lilith", null, null) == null)
startQuestTimer("spawn_exitgk_lilith", 10000, null, null, 0);
break;
case Anakim:
if (getQuestTimer("spawn... | 4 |
private Set<String> placeFigureAtPositionOnBoard(char figure, int position, String board) {
int dimension = (int) Math.sqrt(board.length()) + 1;
isBoardLegal(board, dimension);
Set<String> setOfPossibleBoards = new HashSet<>((int) IntStream
... | 2 |
public void expandNode(final Node n) {
new Thread() {
@Override
public void run() {
synchronized (LocalityUtils.this) {
if (!locality.getCompleteEltSet().contains(n))
return;
manager.stopDamper();
for (int i = 0; i < n.edgeCount(); i++) {
Node newNode = n.edgeAt(i).getOtherEndpt(n... | 7 |
public void updateRaws(String cookieName) {
ArrayList<String> materials = getIng(cookieName);
for (int i = 0; i < materials.size(); i++) {
ResultSet rs1 = null;
ResultSet rs2 = null;
String materialType = materials.get(i);
int amountInStock = 0;
int amountNeeded = 0;
String sql1 = "select amountNe... | 6 |
public static Mascota crearMascota(int tipo, String nombre){
Mascota mascota = null;
if(tipo == 1){
mascota = new Perro(nombre);
}else if(tipo == 2){
mascota = new Gato(nombre);
}else if(tipo == 3){
mascota = new Ave();
}
... | 3 |
private int getVillagerCount() {
int count = 0;
for (Player player : players.getPlayers()) {
if (player.getRole().equals(Role.Villager.toString())) count++;
}
return count;
} | 2 |
public void putField(Reference ref, Object obj, Object value)
throws InterpreterException {
Field f;
try {
Class clazz = TypeSignature.getClass(ref.getClazz());
try {
f = clazz.getField(ref.getName());
} catch (NoSuchFieldException ex) {
f = clazz.getDeclaredField(ref.getName());
}
} catch ... | 5 |
private void parseDocument() {
// get the root elememt
Element docEle = dom.getDocumentElement();
// get a nodelist of <employee> elements
NodeList shapeNodeList = docEle.getElementsByTagName("Shape");
if (shapeNodeList != null && shapeNodeList.getLength() > 0) {
for (int i = 0; i < shapeNodeList.getLengt... | 9 |
private Connection getConnection() {
try {
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
Utilities.outputError("Could not find sqlite drivers");
return null;
}
try {
return DriverManager.getConnection("jdbc:sqlite:" + m_databaseFile.getAbsolutePath());
} catch (SQLEx... | 2 |
public void setSerialNo(String value) {
this.serialNo = value;
} | 0 |
@Override
public void parseArgs(String[] args) {
this.args = args;
int i = 0;
if (args[0].equals("-v")) {
verbose = true;
i++;
}
if ((args.length - i) != 2) usage(null);
numSplits = Gpr.parseIntSafe(args[i++]);
fastqFile = args[i++];
if (numSplits <= 1) usage("Number of splits should be more t... | 3 |
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int plots = 24;
int rounds;
int players;
System.out.println("'Welcome to Monopoly Board Game'");
System.out.println();
System.out.print("Please enter number o... | 6 |
public static byte[] readStream(InputStream fin) throws IOException {
byte[][] bufs = new byte[8][];
int bufsize = 4096;
for (int i = 0; i < 8; ++i) {
bufs[i] = new byte[bufsize];
int size = 0;
int len = 0;
do {
len = fin.read(bufs... | 4 |
public boolean info(CommandSender sender, String[] args)
{
String name;
if (args.length > 1) { //Player specified a name
name = args[1];
} else {
name = sender.getName();
}
Resident resident = em.find(Resident.class, name);
if (residen... | 5 |
public void run() {
try {
while(s.isConnected() && out != null) {
try {
Thread.sleep(400);
} catch (InterruptedException e) {}
out.flush();
out.reset();
System.out.println("Sent an update!");
... | 7 |
public static TrafficStatusEnum fromValue(String v) {
for (TrafficStatusEnum c: TrafficStatusEnum.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
} | 2 |
public String execute() {
Map<String, Object> session = ActionContext.getContext().getSession();
User user = (User) session.get("USER");
list = null;
String actionResult = "";
reportBusinesService = new ReportBusinesService();
log.info(user.getFname() + startDate + end... | 7 |
public void kaynnista() {
while (true) {
System.out.print("Anna lauseke (tyhja lopettaa): ");
String syote = lukija.nextLine();
if (syote.equals("")) {
break;
}
try {
MerkkijononKasitte... | 3 |
@Override
public void update(Observable o, Object arg) {
if(this.model.getCurrentPlayer() == this.player &&
this.model.getGameState() == GameState.DURING) {
ArrayList<Piece> validMoves = this.model.getBoard()
.getValidMoves(this.player.getColor());
if(validMoves.size() > 0) {... | 3 |
private void submitExpression(boolean showErrors) {
Expression.setEnteredExpression(expression.getText());
if (expression.getText().equals("")) {
makeTableDisplay();
} else {
try {
if (Expression.validate()) {
makeTableDisplay();
}
} catch (ValidationException ex) {
// if the function ca... | 4 |
public void setRepita(List<?> list)
{
for(PComando e : this._repita_)
{
e.parent(null);
}
this._repita_.clear();
for(Object obj_e : list)
{
PComando e = (PComando) obj_e;
if(e.parent() != null)
{
e.paren... | 4 |
public void doStep() {
anz = 0;
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
newCells[i][j] = 0;
}
}
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
switch (calcNeighborsPeriodic(i, j)) {
case 0:
case 1:
newCells[i][j] = 0; // dies
break;... | 9 |
public String getValue() {
try {
return readValue();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
... | 3 |
public Object[] subarray_as_Object(int start, int end){
if(end>=this.length)throw new IllegalArgumentException("end, " + end + ", is greater than the highest index, " + (this.length-1));
Object[] arrayo= new Object[end-start+1];
for(int i=start; i<=end; i++)arrayo[i-start] = this.array.get(i);
... | 2 |
public void finjectInpPayload (Circuit c, byte[] info, boolean alice_inputs) {
int i, j, k, line_num, consumed_bytes ;
for (i = k = 0; i < FMT.size(); i++) {
IO io = FMT.elementAt(i);
// Verify it's a relevant i/o object
if (!io.isInput()) continue;
if (... | 4 |
public void print(){
for (int i = 0; i < FIELD_SIZE; i++){
for (int j = 0; j < FIELD_SIZE; j++){
System.out.print(points[i][j].getLetter() + " ");
}
System.out.println("");
}
} | 2 |
private synchronized HttpClient getHttpClient() {
if (client == null) {
// #ifdef DEBUG
log.info("Creating HttpClient instance"); //$NON-NLS-1$
// #endif
client = new HttpClient(aditoHostname, aditoPort, isSecure);
client.setAuthenticationPrompt(defaultAuthenticationPrompt != null ? defaultAuthenticati... | 9 |
public void run() //listening
{
Server.print("running function: run()");
boolean isOK = true;
while (isOK)
{
try
{
String in = input.readUTF();
if (in.equals("#move"))//new move
{
int bX = i... | 8 |
@Basic
@Column(name = "FUN_USUARIO")
public String getFunUsuario() {
return funUsuario;
} | 0 |
public List<String> readCaptionRow() {
List<String> captions = new ArrayList<String>();
HSSFSheet sheet = wb.getSheetAt(0);
Iterator<Row> rowIt = sheet.iterator();
Row row = rowIt.next();
for (Cell cell : row) {
captions.add(cell.getStringCellValue());
}
... | 1 |
public void registerName (String name) {
// Do nothing if the player already registered a name.
if (this.name != null) return;
// Do nothing if the name is invalid.
if (name == null) return;
name = name.trim();
if (name.length() == 0) return;
// Store the player's name.
this.name = name;
// A... | 5 |
public Construct getParentForBinding(EInterfaceAction binding) {
switch(binding) {
case Bind_InsertAfter:
case Bind_InsertBefore:
case Bind_InsertReplace:
case Bind_DuplicateToAdjacent:
case Bind_InsertPaste:
return parent;
case Bind_InsertChild:
return this;
default:
br... | 6 |
@Override
public void caseAAvalieComando(AAvalieComando node)
{
inAAvalieComando(node);
if(node.getPadrao() != null)
{
node.getPadrao().apply(this);
}
{
List<PCasoOpcao> copy = new ArrayList<PCasoOpcao>(node.getCasoOpcao());
Collections... | 3 |
public String toString(){
return typeOf;
} | 0 |
public void enterFromRail(Color player, Integer dest) {
if ((player == this.getPlayer1()
&& dest < 7)
|| (player == this.getPlayer2()
&& dest > 18)) {
// make sure it's in the correct quadrant
Integer dist = 0; // if this doesn't get changed below, something seriously bad is hapened
if (player == ... | 8 |
public boolean isTuringMachine()
{
/*
* Sorry about this pretty cheap method.
*/
return simulator instanceof TMSimulator;
} | 0 |
public static void main(String[] args) {
String filename = args[0];
String separator = args[1];
In in = new In(filename);
ST<String, Queue<String>> st = new ST<String, Queue<String>>();
ST<String, Queue<String>> ts = new ST<String, Queue<String>>();
while (in.hasNextLine()) {
String line = in.readLine(... | 9 |
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 static Entity getBiomeTree(Biome biome) {
switch (biome) {
case FOREST:
//return new TreeCarniferous(new Point());
case DESERT:
return null;
}
return null;
} | 2 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
if(commands.size()<2)
{
mob.tell(L("You must specify who or what to cast this on, and what you want said."));
return false;
}
final Physical target=mob.location().fetchFromRoomFavorItems(n... | 7 |
private void renderTopRow(Graphics2D g) {
List<List<Card>> topRow = game.getTopRow();
double x = X_BOARD_OFFSET;
double y = CARD_Y_NO_OVERLAP;
for (List<Card> cards : topRow) {
if (cards.size() > 0) {
Card toRender = cards.get(cards.size() - 1);
... | 4 |
public static void reduce(String str) {
char[] buff = str.toCharArray();
boolean keepGoing = true;
while (keepGoing) {
keepGoing = false;
int start = -1;
int end = -1;
for (int i = 0; i < buff.length; i++) {
if (buff[i] == 0)
continue;
if (start == -1) {
start = i;
continue;
... | 8 |
public static void corner(Component comp, final byte CORNER)
{
screenOffset();
Rectangle DEST;
switch (CORNER)
{
default:
case TOP_LEFT:
DEST = new Rectangle(offset,
0,
(int) comp.getSize().getWidth(),
... | 8 |
private boolean r_Step_3() {
int among_var;
// (, line 81
// [, line 82
ket = cursor;
// substring, line 82
among_var = find_among_b(a_4, 7);
if (among_var == 0)
{
... | 6 |
private void operation() {
User attacker = getRandomUser();
if (attacker == null) {
System.out.println("NULL PTR ECPT!");
return;
}
int attackerDBID = galaxyIDToDBID.get(attacker.getGid());
int targetGalaxyID = attacker.getRandomTargetGID(1, 4);
int targetDBID = galaxyIDToDBID.get(targetGalaxyID);
... | 6 |
public void readExternal(ObjectInput paramObjectInput)
throws ClassNotFoundException, IOException
{
super.readExternalWithoutImages(paramObjectInput);
this.state = paramObjectInput.readInt();
this.frame = paramObjectInput.readInt();
this.victim = ((Robot)paramObjectInput.readObject());
this.vi... | 3 |
@Override
public boolean isVisible() {
if (!getTab().isOpen()) {
return false;
}
final WidgetChild list = Widgets.get(EMOTE_WIDGET, EMOTE_LIST);
if (list == null || !list.validate()) {
return false;
}
final WidgetChild emote = list.getChild(childId);
return emote.visible() && list.getBoundingRectan... | 4 |
private DockLayout pushDown() {
DockLayout layout = new DockLayout();
layout.mParent = this;
for (int i = 0; i < mChildren.length; i++) {
if (mChildren[i] instanceof DockLayout) {
((DockLayout) mChildren[i]).mParent = layout;
}
layout.mChildren[i] = mChildren[i];
}
layout.mHorizontal = mHorizonta... | 2 |
private boolean decode5(ByteArrayOutputStream baos)
throws PDFParseException {
// stream ends in ~>
int[] five = new int[5];
int i;
for (i = 0; i < 5; i++) {
five[i] = nextChar();
if (five[i] == '~') {
if (nextChar() == '>') {
... | 9 |
public static void comButtons() {
for (int i = 0; i < intrfce.Menu.BUTTONS.length; i++) {
if (r.intersects(intrfce.Menu.BUTTONS[i].r)) {
if (isPressed) {
intrfce.Menu.BUTTONS[i].isClicked = true;
intrfce.Menu.BUTTONS[i].isHoveredOver = false;
} else {
intrfce.Menu.BUTTONS[i].isClicked = fals... | 6 |
public void run ()
{
while (dir != null) {
// No matter how we learn that something may have
// changed, we do the same thing to figure out
// exactly what changed: scan usbdevfs
while (scan ())
continue;
// FIXME: add native support to poll() on
// /proc/bus/usb/devices ...
try { Thread.... | 3 |
public synchronized int[] aaNumber2Pos() {
if (aa2pos != null) return aa2pos;
calcCdsStartEnd();
aa2pos = new int[protein().length()];
for (int i = 0; i < aa2pos.length; i++)
aa2pos[i] = -1;
int cdsMin = Math.min(cdsStart, cdsEnd);
int cdsMax = Math.max(cdsStart, cdsEnd);
// For each exon, add CDS ... | 9 |
private void connectVoice() {
RtmpReader reader = null;
RtmpWriter writer = null;
if (audioFilename != null && audioFilename.length() > 0) {
if (sendAudio) {
try {
reader = new FlvReader(audioFilename);
} catch (Exception e) {
e.printStackTrace();
log.error("Can't create a FlvReader inst... | 9 |
private void notifyObservers(Roll roll) {
for (Observer o : observers) {
o.updateObserver(this, roll);
}
} | 1 |
public void reset() {
this.state = State.DEFAULT;
} | 0 |
public static String humanReadableBytes(long bytes, boolean si)
{
// This algorithm doesn't like negatives
boolean positive = true;
if(bytes < 0)
{
bytes = -bytes;
positive = false;
}
// Figure out if we're using powers of 2 (non-SI) or 10 (SI)
int unit = si ? 1000 : 1024;
if(bytes < unit)
{
... | 7 |
public void ron(String[] split, String command)
{
if (split.length != 6)
{
PrintMessage("Syntax:!ron [game] [winner] [hou] [han|y|dy] [loser]");
return;
}
TournyGame m = (TournyGame) games.get(split[1]);
if (m == null)
{
PrintMessage(split[1] + " is not a valid game");
return;
}
String p =... | 6 |
public void rotACW()
{
forme.rotACW();
} | 0 |
private float[] toCmyk(float[] colorvalue) {
float y = colorvalue[0], cb = colorvalue[1], cr = colorvalue[2], k = colorvalue[3];
float[] cmyk = new float[4];
float v;
v = (float) (1.0 - (y + 1.402 * (cr - 0.5)));
cmyk[0] = v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v);
v = (flo... | 6 |
public static void inicializar(String repositoryType){
switch(repositoryType){
case "array":
compras = new ManagerCompras(comprasArray);
contas = new ManagerConta(contasArray);
servicos = new ManagerServico(servicosArray);
break;
case "arquivo":
String pathname = "planilha.xls"; //Guarda o caminho ... | 9 |
public void saveProjectFile(String statFilePath) {
Element stat = new Element("stat");
Document statDoc = new Document(stat);
//load meta-data elements
Element metaDataElement = new Element("metadata");
for (String attrib : METADATA_ATTRIBS) {
String value = metaDat... | 9 |
private static void drawRightToLeft(Graphics g, LivingEntity e, int x, int y, int size) {
float ratio = tex.bar[0].getWidth() / (float)e.getMaxHP();
int sizeX = tex.frame[0].getWidth() * size;
g.drawImage(tex.frame[3], x - sizeX, y, sizeX, tex.frame[0].getHeight() * size, null);
int colo... | 5 |
private void asignarFitness() {
//Marcar la poblacion como no dominada
for (Individuo ind : poblacion) {
ind.setDominado(false);
}
int frentes = 0; // cuenta de frentes
double df = (double) qap.getN(); // dummyFitness para la poblacion inicial
List<Individuo... | 9 |
public static Map<String, Class<?>> propertyMap(Class<?> baseClass) {
Map<String, Class<?>> map = new HashMap<String, Class<?>>();
Method[] methods = baseClass.getMethods();
for (Method method : methods) {
String name = method.getName();
if (name.startsWith("get")) {
... | 8 |
public ArrayList<Integer> AllEmpIDInFranchise(int FranID)
throws UnauthorizedUserException, BadConnectionException, DoubleEntryException
{
/* Variable Section Start */
/* Database and Query Preperation */
PreparedStatement statment = null;
ResultSet results = ... | 8 |
public static void main(String[] args) throws D2S_ModuleException, D2S_ModuleParameterException {
if (args.length < 3) {
System.out
.println("\nModuleWrapper\n" +
"Please use the following arguments: \n" +
"[1] - The Java Class that is your module (use the full package path)" +
"[2] - ... | 2 |
public void make_pivot_hier(node head){
// stop if so less than OUTLIERS_SIZE objects present
if(head.list_objects.size() < PIVOT_SIZE_TOTAL){
//add all children to the children and return
for(finger_print f: head.list_objects){
head.children.add(new node(f));
}
//System.out.println("XX "+head.li... | 7 |
private void connectVerbInstanceBaseToFeatures() {
for (int CA = 0; CA < getSize() / vInstCASize; CA++) {
for (int baseNeuron = 0; baseNeuron < 40; baseNeuron++) {
for (int feature = 0; feature < 13; feature++) {
int fromNeuron = baseNeuron + (CA * vInstCASize);
for (int synapse = ... | 9 |
public boolean isBestMovebidiDLS(Site node, Site target, int depth) {
if(depth >= 0) {
boolean worked = true;
for(Site tChild: graph.neighbors(target)) //base case
worked = worked && graph.neighbors(node).contains(tChild);
if(worked) return worked;
... | 8 |
private boolean jj_3_80() {
if (jj_scan_token(NO)) return true;
return false;
} | 1 |
public static int characterSize(int character) throws JSONException {
if (character < 0 || character > 0x10FFFF) {
throw new JSONException("Bad character " + character);
}
return character <= 0x7F ? 1 : character <= 0x3FFF ? 2 : 3;
} | 4 |
@Override
public void analysis() {
int halfOfWidth = this.currentWidth / 2;
/*if (controlPoints.get(currentControlPointToReach).getY() < currentCoord.getY()) {
System.out.println("jumping");
setHeroOwnVerticalSpeed(-OWN_VERTICAL_SPEED);
}*/
if ((controlPoints.... | 7 |
private int sweep() {
int nDeallocated = 0;
long pos;
gcDone = true;
for (int i = dbFirstUserId, j = committedIndexSize; i < j; i++) {
pos = getGCPos(i);
if (pos != 0
&& ((int) pos & (dbPageObjectFlag | dbFreeHandleFlag)) == 0) {
int bit = (int) (pos >>> dbAllocationQuantumBits);
if ((blac... | 9 |
protected void addWallObject(int x, int y, int z, int drawHeight,
int orientation, int orientation2, int uid, Animable renderable,
Animable renderable2, byte objConf) {
if (renderable == null && renderable2 == null)
return;
WallObject wallObject = new WallObject();
wallObject.uid = uid;
wallObject.objC... | 4 |
public ArrayList<Double> barHeight() {
ArrayList<Double> values;
values = A;
ArrayList<Double> barDimen = new ArrayList<Double>(); //Convert to ArrayList
double numBars = n;
double sum = 0; //Sum of values
//double classNum = 0; //Number of classes: sum of values divided... | 8 |
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MongoCredential that = (MongoCredential) o;
if (mechanism != null ? !mechanism.equals(that.mechan... | 9 |
public void mouseEntered(MouseEvent e) {
if (!b.isEnabled()) return;
if (b instanceof javax.swing.JToggleButton && b.isSelected())
return;
b.setBorder(raised);
b.setBorderPainted(true);
} | 3 |
public boolean rmNode(final Node n) {
synchronized (nodes) {
if (nodes.containsKey(n.getRemoteAddress())) {
nodes.remove(n.getRemoteAddress());
addresses.remove(n.getRemoteAddress());
if (nodes.size() == 0 && closeIfEmpty) {
close();
}
return true;
} else {
return false;
}
}... | 3 |
public int searchEdgesToSetNull(Edge[] list, Vertex in, Vertex out, int index){
int edgePos = -1;
for(int i = 0;i < numEdges; i++){
if(list[i]!=null && list[i].inVertex != null && list[i].outVertex != null){
//checking for exact match with an edge
//System.out.println("***** List[i]:: "+list[i].inV... | 9 |
private static byte[] encode3to4(byte[] source, int srcOffset,
int numSigBytes, byte[] destination, int destOffset, byte[] alphabet) {
// 1 2 3
// 01234567890123456789012345678901 Bit position
// --------000000001111111122222222 Arra... | 6 |
public static void main(String[] args) {
if (args.length < 2) {
System.out.println("Usage:\njava TestRegularExpression "
+ "characterSequence regularExpression+");
System.exit(0);
}
System.out.println("Input: \"" + args[0] + "\"");
for (String arg : args) {
System.out.println("Regular expression: ... | 3 |
public String getName() {
return name;
} | 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.