rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public synchronized void setPaintEnabled(boolean enabled) {
public void setPaintEnabled(boolean enabled) {
public synchronized void setPaintEnabled(boolean enabled) { paintEnabled = enabled; }
public synchronized void setRadarColor(Color color) {
public void setRadarColor(Color color) {
public synchronized void setRadarColor(Color color) { radarColor = color; }
public synchronized void setSGPaintEnabled(boolean enabled) {
public void setSGPaintEnabled(boolean enabled) {
public synchronized void setSGPaintEnabled(boolean enabled) { sgPaintEnabled = enabled; }
public synchronized void setScanColor(Color color) {
public void setScanColor(Color color) {
public synchronized void setScanColor(Color color) { scanColor = color; }
public synchronized void setSkippedTurns(int newSkippedTurns) {
public void setSkippedTurns(int newSkippedTurns) {
public synchronized void setSkippedTurns(int newSkippedTurns) { skippedTurns = newSkippedTurns; }
public synchronized void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) {
public void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) {
public synchronized void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) { statistics = newStatistics; }
if (energy != 0) {
if (energy > 0) {
public synchronized final void setTurnChassis(double radians) { if (energy != 0) { turnRemaining = radians; } }
public synchronized void setWinner(boolean newWinner) {
public void setWinner(boolean newWinner) {
public synchronized void setWinner(boolean newWinner) { isWinner = newWinner; if (isWinner) { out.println("SYSTEM: " + getName() + " wins the round."); eventManager.add(new WinEvent()); } }
} else if (isWinner()) {
} else if (isWinner) {
public final void tick() { if (newBullet != null) { battle.addBullet(newBullet); newBullet = null; } // Entering tick if (Thread.currentThread() != robotThreadManager.getRunThread()) { throw new RobotException("You cannot take action in this thread!"); } if (testingCondition) { throw new RobotException( ...
private void updateHeading() {
public void updateHeading() {
private void updateHeading() { boolean normalizeHeading = true; double turnRate = min(maxTurnRate, (0.4 + 0.6 * (1 - (abs(velocity) / Rules.MAX_VELOCITY))) * Rules.MAX_TURN_RATE_RADIANS); if (turnRemaining > 0) { if (turnRemaining < turnRate) { heading += turnRemaining; gunHeading += turnRemaining; r...
double turnRate = min(maxTurnRate, (0.4 + 0.6 * (1 - (abs(velocity) / Rules.MAX_VELOCITY))) * Rules.MAX_TURN_RATE_RADIANS);
turnRate = min(maxTurnRate, (.4 + .6 * (1 - (abs(velocity) / Rules.MAX_VELOCITY))) * Rules.MAX_TURN_RATE_RADIANS);
private void updateHeading() { boolean normalizeHeading = true; double turnRate = min(maxTurnRate, (0.4 + 0.6 * (1 - (abs(velocity) / Rules.MAX_VELOCITY))) * Rules.MAX_TURN_RATE_RADIANS); if (turnRemaining > 0) { if (turnRemaining < turnRate) { heading += turnRemaining; gunHeading += turnRemaining; r...
if (adjustRadarForBodyTurn) {
if (isAdjustRadarForBodyTurn) {
private void updateHeading() { boolean normalizeHeading = true; double turnRate = min(maxTurnRate, (0.4 + 0.6 * (1 - (abs(velocity) / Rules.MAX_VELOCITY))) * Rules.MAX_TURN_RATE_RADIANS); if (turnRemaining > 0) { if (turnRemaining < turnRate) { heading += turnRemaining; gunHeading += turnRemaining; r...
;
private void updateMovement() { if (distanceRemaining == 0 && velocity == 0) { return; } lastX = x; lastY = y; if (!slowingDown) { // Set moveDir and slow down for move(0) if (moveDirection == 0) { // On move(0), we're always slowing down. slowingDown = true; // Pretend we were moving in the d...
isDead = true;
setDead(true);
public synchronized void zap(double zapAmount) { if (energy == 0) { isDead = true; return; } energy -= abs(zapAmount); if (energy < 0.1) { energy = 0; distanceRemaining = 0; turnRemaining = 0; } }
if (energy < 0.1) {
if (energy < .1) {
public synchronized void zap(double zapAmount) { if (energy == 0) { isDead = true; return; } energy -= abs(zapAmount); if (energy < 0.1) { energy = 0; distanceRemaining = 0; turnRemaining = 0; } }
if(start < 1 || start > this.end || end < 1 || end > this.end || start > end) { throw new IndexOutOfBoundsException(); } return AbstractSymbolList.this.subStr(start + this.start, end + this.start); }
if(start < 1 || start > this.end || end < 1 || end > this.end || start > end) { throw new IndexOutOfBoundsException(); } return AbstractSymbolList.this.subStr(start + this.start - 1, end + this.start - 1); }
public String subStr(int start, int end) throws IndexOutOfBoundsException { if(start < 1 || start > this.end || end < 1 || end > this.end || start > end) { throw new IndexOutOfBoundsException(); } return AbstractSymbolList.this.subStr(start + this.start, end + this.start); }
return super.resolveBindings(scope, bindings, allowBinding, requireExactType);
return resolveBindingsOriginal(scope, bindings, allowBinding, requireExactType);
public TypePattern resolveBindings( IScope scope, Bindings bindings, boolean allowBinding, boolean requireExactType) { // If there is no pointcut scope, resolve with the super if (! (scope instanceof CaesarPointcutScope)) { return super.resolveBindings(scope, bindings, allowBinding, requireExactType); }...
pnlLinkToAlbumIndex.setPreferredSize(new java.awt.Dimension(285, 35));
pnlLinkToAlbumIndex.setPreferredSize(new java.awt.Dimension(340, 35));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
System.out.println(result);
public void test() { System.out.println("-------> VCTest 39: Wrapper test: start"); ClassB b = new ClassB(); ModelD d = new ModelD(); ModelD.RoleB db = d.RoleB(b); String result = db.getId() + "; " + db.getA().getId(); System.out.println("-------> VCTest 39: end"); }
PreparedStatement create_dummy = conn.prepareStatement("insert into dummy " + " (bioentry_id, seq_version, molecule, length) " +
PreparedStatement create_dummy = conn.prepareStatement("insert into biosequence " + " (bioentry_id, seq_version, molecule, seq_length) " +
private void _createDummySequence(String id, Alphabet seqAlpha, int length) throws IllegalIDException, ChangeVetoException, BioException { int version = 1; Connection conn = null; try { conn = pool.takeConnection(); conn.setAutoCommit(false); ResultSet rs; PreparedStateme...
int dummy_id = getDBHelper().getInsertID(conn, "dummy", "dummy_id");
int dummy_id = getDBHelper().getInsertID(conn, "biosequence", "biosequence_id");
private void _createDummySequence(String id, Alphabet seqAlpha, int length) throws IllegalIDException, ChangeVetoException, BioException { int version = 1; Connection conn = null; try { conn = pool.takeConnection(); conn.setAutoCommit(false); ResultSet rs; PreparedStateme...
PreparedStatement delete_biosequence = conn.prepareStatement("delete from biosequence where biosequence_id = ?");
PreparedStatement delete_taxa = conn.prepareStatement("delete from bioentry_taxa where bioentry_id = ?"); delete_taxa.setInt(1, bioentry_id); delete_taxa.executeUpdate(); delete_taxa.close(); PreparedStatement delete_reference = conn.prepareStatement("delete from bioentry_reference where bioentry_id = ?"); delete_refe...
private void _removeSequence(String id) throws BioException, IllegalIDException, ChangeVetoException { Sequence seq = (Sequence) outstandingSequences.get(id); if (seq != null) { seq = null; // Don't want to be holding the reference ourselves! try { Thread.sleep(100L); System.gc(); } catch ...
PreparedStatement get_biosequence = conn.prepareStatement("select biosequence_id, molecule " +
PreparedStatement get_biosequence = conn.prepareStatement("select biosequence_id, molecule, seq_length " +
public Sequence getSequence(String id) throws BioException, IllegalIDException { Sequence seq = (Sequence) outstandingSequences.get(id); if (seq != null) { return seq; } try { Connection conn = pool.takeConnection(); PreparedStatement get_bioentry = conn.prepareStatement("select bioentry.bioen...
seq = BioSQLSequence.reflectBiosequence(this, id, bioentry_id, biosequence_id, molecule);
int length = rs.getInt(3); if (rs.wasNull()) { length = -1; } seq = new BioSQLSequence(this, id, bioentry_id, biosequence_id, molecule, length);
public Sequence getSequence(String id) throws BioException, IllegalIDException { Sequence seq = (Sequence) outstandingSequences.get(id); if (seq != null) { return seq; } try { Connection conn = pool.takeConnection(); PreparedStatement get_bioentry = conn.prepareStatement("select bioentry.bioen...
if (seq == null && isDummySupported()) { PreparedStatement get_dummy = conn.prepareStatement("select dummy_id, molecule, length " + " from dummy " + " where bioentry_id = ?"); get_dummy.setInt(1, bioentry_id); rs = get_dummy.executeQuery(); if (rs.next()) { int dummy_id = rs.getInt(1); String molecule = rs.getString(2...
public Sequence getSequence(String id) throws BioException, IllegalIDException { Sequence seq = (Sequence) outstandingSequences.get(id); if (seq != null) { return seq; } try { Connection conn = pool.takeConnection(); PreparedStatement get_bioentry = conn.prepareStatement("select bioentry.bioen...
if (! (f instanceof ComponentFeature) ) {
if (! (f instanceof ComponentFeature) && !(f.getType().equals("similarity")) ) {
void persistFeatures(Connection conn, int bioentry_id, FeatureHolder features, int parent) throws BioException, SQLException { for (Iterator fi = features.features(); fi.hasNext(); ) { Feature f = (Feature) fi.next(); if (! (f instanceof ComponentFeature) /* && !(f.getType().equals("similarit...
if (length() < 100000) {
if (length() < 5000000) {
private RealizingFeatureHolder getFeatures() { if (features == null) { if (length() < 100000) { features = new BioSQLAllFeatures(this, seqDB, bioentry_id); } else { features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 50000); } } return features; }
features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 50000);
features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 5000000);
private RealizingFeatureHolder getFeatures() { if (features == null) { if (length() < 100000) { features = new BioSQLAllFeatures(this, seqDB, bioentry_id); } else { features = new BioSQLTiledFeatures(this, seqDB, bioentry_id, 50000); } } return features; }
jmsHeaders.remove(HJBServletConstants.DELIVERY_MODE); jmsHeaders.remove(HJBServletConstants.TIME_TO_LIVE); jmsHeaders.remove(HJBServletConstants.DESTINATION_URL); jmsHeaders.remove(HJBServletConstants.PRIORITY);
public HJBMessage findHJBMessage(Map decodedParameters) { String messageAsText = findHJBMessageAsText(decodedParameters); Map jmsHeaders = new HashMap(decodedParameters); jmsHeaders.remove(HJBServletConstants.MESSAGE_TO_SEND); return new HJBMessage(jmsHeaders, messageAsText); }
public List getAttachments(int postId, int forumId) throws Exception
public List getAttachments(int postId, int forumId)
public List getAttachments(int postId, int forumId) throws Exception { if (!SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_DOWNLOAD) && !SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_ENABLED, Integer.toString(forumId))) { return new ArrayList(); } return this.am.selec...
public boolean isPhysicalDownloadMode(int extensionGroupId) throws Exception
public boolean isPhysicalDownloadMode(int extensionGroupId)
public boolean isPhysicalDownloadMode(int extensionGroupId) throws Exception { return this.am.isPhysicalDownloadMode(extensionGroupId); }
String expectedOutput = "/testProvider/testFactory/connection-10/session-1" + CR + "/testProvider/testFactory/connection-10/session-0" + CR;
String expectedOutput = "/testProvider/testFactory/connection-10:" + CR + "total 2" + CR + "session-1" + CR + "\tacknowledgement-mode=(int 1), " + HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + ", transacted=(boolean false)" + CR + "session-0" + CR + "\tacknowledgement-mode=(int 1), " + HJBCons...
protected String createSomeSessions() { testConnection.createSession(true, Session.AUTO_ACKNOWLEDGE); testConnection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE); String expectedOutput = "/testProvider/testFactory/connection-10/session-1" + CR + "/testProvider/testFactory/co...
new ConnectionListing(testConnection).getListing("/testProvider/testFactory/connection-10"));
new ConnectionListing(testConnection).getListing("/testProvider/testFactory"));
public void testGetListingIncludesAllConnections() { String expectedOutput = createSomeSessions(); assertEquals(expectedOutput, new ConnectionListing(testConnection).getListing("/testProvider/testFactory/connection-10")); }
expectedOutput = expectedOutput + CR + "/testProvider/testFactory/connection-10/session-1" + CR + "acknowledgement-mode=(int 1)" + CR + HJBConstants.CREATION_TIME + "="
expectedOutput = expectedOutput + CR + CR + "/testProvider/testFactory/connection-10/session-1:" + CR + "total 0" + CR + CR + "/testProvider/testFactory/connection-10/session-0:" + CR + "total 1" + CR + "browser-0[(source mockQueue)]" + CR + '\t' + HJBConstants.CREATION_TIME + "="
public void testRecurseListingAddsSessionListings() { StringWriter sw = new StringWriter(); String expectedOutput = createSomeSessions(); addDefaultTestBrowser(); expectedOutput = expectedOutput + CR + "/testProvider/testFactory/connection-10/session-1" ...
+ CR + "transacted=(boolean false)" + CR + CR + "/testProvider/testFactory/connection-10/session-0" + CR + "acknowledgement-mode=(int 1)" + CR + HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + CR + "transacted=(boolean false)" + CR + "/testProvider/testFactory/connection-10/session-0/browser-0[(...
+ ", message-selector=testSelector";
public void testRecurseListingAddsSessionListings() { StringWriter sw = new StringWriter(); String expectedOutput = createSomeSessions(); addDefaultTestBrowser(); expectedOutput = expectedOutput + CR + "/testProvider/testFactory/connection-10/session-1" ...
"/testProvider/testFactory/connection-10",
"/testProvider/testFactory",
public void testRecurseListingAddsSessionListings() { StringWriter sw = new StringWriter(); String expectedOutput = createSomeSessions(); addDefaultTestBrowser(); expectedOutput = expectedOutput + CR + "/testProvider/testFactory/connection-10/session-1" ...
"/testProvider/testFactory/connection-10",
"/testProvider/testFactory",
public void testWriteListingIncludesAllConnections() { StringWriter sw = new StringWriter(); String expectedOutput = createSomeSessions(); new ConnectionListing(testConnection).writeListing(sw, "/testProvider/testFactory/connection-10", ...
public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception
public List selectAllByForumByLimit(int forumId, int startFrom, int count)
public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception { return super.selectAllByForumByLimit(forumId, startFrom, startFrom + count); }
Cache cache = stack.getExecutionContext().getTree().getCache(); if (cache.isCached(key)) { returnCachedArguments(stack, (Arguments) cache.getCachedValue(key)); complete(stack); return; } synchronized (instances) { List inst = (List) instances.get(key); if (inst == null) { inst = new LinkedList(); instances.put(key, ins...
Cache cache = getCache(stack); synchronized (cache) { if (cache.isCached(key)) { returnCachedArguments(stack, (Arguments) cache.getCachedValue(key)); complete(stack); return;
protected void cpre(Object key, VariableStack stack) throws ExecutionException { stack.setVar(KEY, key); Cache cache = stack.getExecutionContext().getTree().getCache(); if (cache.isCached(key)) { returnCachedArguments(stack, (Arguments) cache.getCachedValue(key)); complete(stack); return; } synchronized (in...
else { inst.add(stack); return;
synchronized (instances) { List inst = (List) instances.get(key); if (inst == null) { inst = new LinkedList(); instances.put(key, inst); } else { inst.add(stack); return; }
protected void cpre(Object key, VariableStack stack) throws ExecutionException { stack.setVar(KEY, key); Cache cache = stack.getExecutionContext().getTree().getCache(); if (cache.isCached(key)) { returnCachedArguments(stack, (Arguments) cache.getCachedValue(key)); complete(stack); return; } synchronized (in...
Cache cache = stack.getExecutionContext().getTree().getCache(); cache.addValue(key, ret);
Cache cache = getCache(stack); synchronized (cache) { cache.addValue(key, ret);
public void post(VariableStack stack) throws ExecutionException { Arguments ret = getTrackingArguments(stack); Object key = stack.currentFrame().getVar(KEY); Cache cache = stack.getExecutionContext().getTree().getCache(); cache.addValue(key, ret); synchronized (instances) { if (instances.containsKey(key)) { ...
synchronized (instances) { if (instances.containsKey(key)) { List l = (List) instances.get(key); while (l.size() > 0) { VariableStack st = (VariableStack) l.remove(0); returnCachedArguments(st, ret); complete(st);
synchronized (instances) { if (instances.containsKey(key)) { List l = (List) instances.get(key); while (l.size() > 0) { VariableStack st = (VariableStack) l.remove(0); returnCachedArguments(st, ret); complete(st); } instances.remove(key);
public void post(VariableStack stack) throws ExecutionException { Arguments ret = getTrackingArguments(stack); Object key = stack.currentFrame().getVar(KEY); Cache cache = stack.getExecutionContext().getTree().getCache(); cache.addValue(key, ret); synchronized (instances) { if (instances.containsKey(key)) { ...
instances.remove(key);
public void post(VariableStack stack) throws ExecutionException { Arguments ret = getTrackingArguments(stack); Object key = stack.currentFrame().getVar(KEY); Cache cache = stack.getExecutionContext().getTree().getCache(); cache.addValue(key, ret); synchronized (instances) { if (instances.containsKey(key)) { ...
aWriter.print(sessionPrefix);
protected void writeDescriptions(JMSObjectDescription[] descriptions, PrintWriter aWriter, String sessionPrefix, boolean useLongDescription) { for (int i = 0; i < descriptions.length; i++) { ...
String prefixEndingInSlash,
String sessionPrefix,
protected void writeJMSObjects(PrintWriter aWriter, String prefixEndingInSlash, boolean recurse) { String sessionPrefix = prefixEndingInSlash + PathNaming.SESSION + "-" + getSessionIndex() + "/"; writeConsumers(aWriter,...
String sessionPrefix = prefixEndingInSlash + PathNaming.SESSION + "-" + getSessionIndex() + "/";
protected void writeJMSObjects(PrintWriter aWriter, String prefixEndingInSlash, boolean recurse) { String sessionPrefix = prefixEndingInSlash + PathNaming.SESSION + "-" + getSessionIndex() + "/"; writeConsumers(aWriter,...
writeJMSObjects(pw, prefixEndingInSlash, recurse);
String sessionPrefix = prefixEndingInSlash + PathNaming.SESSION + "-" + getSessionIndex() + "/"; String totalLine = strings().getString(HJBStrings.LISTING_TOTAL, new Integer(getListingTotal())); pw.println(prefixEndingInSlash + d + ':'); pw.println(totalLine); writeJMSObjects(pw, sessionPrefix, recurse);
public void writeListing(Writer aWriter, String prefix, boolean recurse) { PrintWriter pw = new PrintWriter(aWriter); String prefixEndingInSlash = prefix.endsWith("/") ? prefix : prefix + "/"; writeJMSObjects(pw, prefixEndingInSlash, recurse); }
entry = dialog.getSelectedEntry();
if (dialog.getReturnCode() == Window.OK) entry = dialog.getSelectedEntry();
public void run() { try { String symbol = SchemeTextUtilities.findSymbolAroundPoint(mEditor.getDocument(), mEditor.getPoint()); if (symbol == null) return; ISymbolDictionary dictionary = mEditor.getSymbolDictionary(); if (dictionary == null) ...
if(r instanceof MagicalState)
if(r == MagicalState.MAGICAL_RESIDUE)
public double getWeight(Residue r) throws IllegalResidueException { if(r instanceof MagicalState) return Double.NEGATIVE_INFINITY; alphabet().validate(r); return scores[DNATools.index(r)]; }
if(r instanceof MagicalState)
if(r == MagicalState.MAGICAL_RESIDUE)
public void setWeight(Residue r, double score) throws IllegalResidueException { if(r instanceof MagicalState) return; alphabet().validate(r); scores[DNATools.index(r)] = score; }
if ( WAGON_VERSION == null )
if ( wagonVersion == null )
public WebDavWagon() { if ( WAGON_VERSION == null ) { URL pomUrl = this.getClass() .getResource( "/META-INF/maven/org.apache.maven.wagon/wagon-webdav/pom.properties" ); if ( pomUrl == null ) { WAGON_VERSION = ""; } ...
WAGON_VERSION = "";
wagonVersion = "";
public WebDavWagon() { if ( WAGON_VERSION == null ) { URL pomUrl = this.getClass() .getResource( "/META-INF/maven/org.apache.maven.wagon/wagon-webdav/pom.properties" ); if ( pomUrl == null ) { WAGON_VERSION = ""; } ...
WAGON_VERSION = props.getProperty( "version" ); System.out.println( "WAGON_VERSION: " + WAGON_VERSION );
wagonVersion = props.getProperty( "version" ); System.out.println( "WAGON_VERSION: " + wagonVersion );
public WebDavWagon() { if ( WAGON_VERSION == null ) { URL pomUrl = this.getClass() .getResource( "/META-INF/maven/org.apache.maven.wagon/wagon-webdav/pom.properties" ); if ( pomUrl == null ) { WAGON_VERSION = ""; } ...
if ( url.startsWith( "dav:" ) )
String s = "dav:"; if ( url.startsWith( s ) )
private String getURL( Repository repository ) { String url = repository.getUrl(); if ( url.startsWith( "dav:" ) ) { return url.substring( 4 ); } else { return url; } }
return url.substring( 4 );
return url.substring( s.length() );
private String getURL( Repository repository ) { String url = repository.getUrl(); if ( url.startsWith( "dav:" ) ) { return url.substring( 4 ); } else { return url; } }
}
public void openConnection() throws AuthenticationException, ConnectionException { String url = getURL( repository ); repository.setUrl( url ); HttpURL httpURL = null; try { httpURL = urlToHttpURL( url ); if ( authenticationInfo != null ...
String create_dir = "";
String createDir = "";
public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Repository repository = getRepository(); String basedir = repository.getBasedir(); resourceName = StringUtils.replace( resourceName, "\\", "/" );...
create_dir = create_dir + "/" + dirs[count]; wdresource.mkcolMethod( create_dir );
createDir = createDir + "/" + dirs[count]; wdresource.mkcolMethod( createDir );
public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Repository repository = getRepository(); String basedir = repository.getBasedir(); resourceName = StringUtils.replace( resourceName, "\\", "/" );...
} File [] list_files = sourceDirectory.listFiles();
} File [] listFiles = sourceDirectory.listFiles();
public void putDirectory( File sourceDirectory, String destinationDirectory ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String createPath = repository.getBasedir() + "/" + destinationDirectory; try { wdresource.mkcolMethod( createPath ...
for(int i=0; i<list_files.length; i++) { if ( list_files[i].isDirectory() ) { putDirectory( list_files[i], destinationDirectory + "/" + list_files[i].getName() ); } else { String target = createPath + "/" + list_files[i].getName(); try { wdresource.putMethod( target, list_files[i] ); } catch( IOException e ) {
for ( int i = 0; i < listFiles.length; i++ ) { if ( listFiles[i].isDirectory() ) { putDirectory( listFiles[i], destinationDirectory + "/" + listFiles[i].getName() ); } else { String target = createPath + "/" + listFiles[i].getName(); try { wdresource.putMethod( target, listFiles[i] ); } catch ( IOException e ) {
public void putDirectory( File sourceDirectory, String destinationDirectory ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String createPath = repository.getBasedir() + "/" + destinationDirectory; try { wdresource.mkcolMethod( createPath ...
return url.startsWith( "https" ) ? new HttpsURL( url ) : new HttpURL( url );
if ( url.startsWith( "https" ) ) { return new HttpsURL( url ); } else { return new HttpURL( url ); }
private HttpURL urlToHttpURL( String url ) throws URIException { return url.startsWith( "https" ) ? new HttpsURL( url ) : new HttpURL( url ); }
return new FjClassContext( context, context.getEnvironment(), sourceClass, this);
if (originalCompUnit == null) { return new FjClassContext( context, context.getEnvironment(), sourceClass, this); } else { return new CjExternClassContext( context, context.getEnvironment(), sourceClass, this, originalCompUnit.getExport()); }
protected CClassContext constructContext(CContext context) { return new FjClassContext( context, context.getEnvironment(), sourceClass, this); }
if (!param.getClass().equals(argValue.getClass())) throw new IllegalArgumentException("Param " + param.getName() + " has class " + argValue.getClass() + " but should have class " + param.getClass());
if (!param.getType().equals(argValue.getClass())) throw new IllegalArgumentException("Param " + param.getName() + " has class " + argValue.getClass() + " but should have class " + param.getType());
protected void validateFilterArgs(FilterParameter[] params, Map<String, Object> args) { if (args.size() != params.length) throw new IllegalArgumentException("Expected " + params.length + " args, got " + args.size()); for (FilterParameter param: params) { Object argValue = args.get(param.getName()); if (argV...
ArrayList agr = cha.getGroups("amino"); ArrayList hgr = cha.getGroups("hetatm"); ArrayList ngr = cha.getGroups("nucleotide");
List agr = cha.getGroups("amino"); List hgr = cha.getGroups("hetatm"); List ngr = cha.getGroups("nucleotide");
public String toString(){ String str = "structure "+name+ " " + pdb_id ; if ( isNmr() ) str += " models: "+nrModels()+"\n" ; str += header ; for (int i=0;i<nrModels();i++){ if (isNmr() ) str += " model["+i+"]:"; str +=" chains:"; str += "\n"; for (int j=0;j<size(i);j++){ //System.out.println("ge...
public abstract void list() throws Exception;
public abstract void list() ;
public abstract void list() throws Exception;
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context)
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception { this.request = request; this.response = response; this.context = context; String action = this.request.getAction(); if (!this.ignoreAction) { try { this.getClass().getMethod(acti...
catch (Exception e) { throw e;
catch (Exception e) { String es = "Erorr process()"; log.error(es, e); throw new RuntimeException(es, e);
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception { this.request = request; this.response = response; this.context = context; String action = this.request.getAction(); if (!this.ignoreAction) { try { this.getClass().getMethod(acti...
return JForumExecutionContext.templateConfig().getTemplate( new StringBuffer(SystemGlobals.getValue(ConfigKeys.TEMPLATE_DIR)). append('/').append(this.templateName).toString()); }
try { return JForumExecutionContext.templateConfig().getTemplate( new StringBuffer(SystemGlobals.getValue(ConfigKeys.TEMPLATE_DIR)). append('/').append(this.templateName).toString()); } catch (IOException e) { String es = "Erorr process()"; log.error(es, e); throw new RuntimeException(es, e); } }
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception { this.request = request; this.response = response; this.context = context; String action = this.request.getAction(); if (!this.ignoreAction) { try { this.getClass().getMethod(acti...
Object value = args.get(filt.getName());
Object value = args.get(param.getName());
public void setFilter(Long listId, String className, Map<String, Object> args) throws NotFoundException, PermissionException { MailingList list = this.getListFor(listId, Permission.EDIT_FILTERS); Filter filt = this.filterRunner.getFilters().get(className); EnabledFilter enabled = list.getEnabledFilters().get(cl...
public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception
public List selectAllByForumByLimit(int forumId, int startFrom, int count)
public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception { return super.selectAllByForumByLimit(startFrom, count, forumId); }
return "354 Enter mail, end with \".\" on a line by itself.";
return "354 End data with <CR><LF>.<CR><LF>\r\n";
public String execute(String commandString, Session session) { if (session.getSender() == null) { return "503 Need MAIL command."; } if (session.getRecipients().size() == 0) { return "503 Need RCPT (recipient)"; } session.setDataMode(true); return "354 Enter mail, end with \".\" on a line by itself."; }
Platform.run(this);
SafeRunner.run(this);
public void notifyAppend(String text) { if (text == null) return; fText = text; Object[] copiedListeners= fListeners.toArray(); for (int i= 0; i < copiedListeners.length; i++) { fListener = (IStreamListener) copiedListeners[i]; ...
LOG.info(strings().getString(HJBStrings.HANDLING_REQUEST, request.getPathInfo(), generators[i]));
LOG.info(strings().getString(HJBStrings.HANDLING_REQUEST, request.getMethod(), request.getPathInfo(), generators[i]));
protected void handleUsingMatchingGenerator(JMSCommandGenerator generators[], HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { for (int i =...
generator.getAssignedCommandRunner().ignore(generatedCommand); String message = strings().getString(HJBStrings.COMMAND_EXECUTION_TIMED_OUT, generatedCommand.getDescription(), commandTimeout); getServletContext().log(message); LOG.error(message); HJBException fault = new HJBException(message); fault.fillInStackTrace(); ...
handleCommandExecutionWasTimedOut(generator, response, commandTimeout, generatedCommand);
protected void handleUsingSelectedGenerator(JMSCommandGenerator generator, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Long commandTimeout = findComman...
String message = strings().getString(HJBStrings.COMMAND_EXECUTION_WAS_INTERRUPTED, generatedCommand); getServletContext().log(message, e); LOG.error(message, e); new RuntimeExceptionHandler().sendHJBFault(response, new HJBException(message, e));
handleExecutionThreadWasInterrupted(response, generatedCommand, e);
protected void handleUsingSelectedGenerator(JMSCommandGenerator generator, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Long commandTimeout = findComman...
if (! generatedCommand.isExecutedOK()) { getServletContext().log(generatedCommand.getStatusMessage(), generatedCommand.getFault()); LOG.error(generatedCommand.getStatusMessage(), generatedCommand.getFault());
if (!generatedCommand.isExecutedOK()) { handleExecutionWasNotOk(generatedCommand);
protected void handleUsingSelectedGenerator(JMSCommandGenerator generator, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Long commandTimeout = findComman...
public TexRow insertRow(int index) { return insertRow(index,new TexRow());
public TexRow insertRow(int index,TexRow row) { rows.insertElementAt(row,index); Iterator iterator = changeListeners.iterator(); while (iterator.hasNext()) ((ITexRowListViewer) iterator.next()).insertRow(row); return row;
public TexRow insertRow(int index) { return insertRow(index,new TexRow()); }
RagbagSequenceItf seq = new RagbagSequence("", "", filterFactory.wrap(new IdleSequenceBuilder()));
RagbagSequenceItf seq = new RagbagSequence("", "", filterFactory.wrap(new RagbagIdleSequenceBuilder()));
public void makeSequence() throws BioException { // with lazy instantiation, there's little to do but validate super.makeSequence(); // screen files without instantiating sequence object try { RagbagSequenceItf seq = new RagbagSequence("", "", filterFactory.wrap(new IdleSequenceBuilder())); ...
model.setDest(this.getFullRequestURI());
model.setDest(this.getUsefulRequestURI()); if (log.isDebugEnabled()) log.debug("Destination will be: " + model.getDest());
protected final void execute2() throws Exception { if (this.isLoggedIn()) { this.authExecute(); } else { Login.Model model = new Login.Model(); model.setDest(this.getFullRequestURI()); this.getCtx().getRequest().setAttribute(LOGIN_REQUIRED_MODEL_ATTR, model); throw new ForwardException(LOGIN_RE...
new HitRobotEvent(r.name, Utils.normalRelativeAngle(angle - heading), r.energy, atFault));
new HitRobotEvent(r.getName(), Utils.normalRelativeAngle(angle - heading), r.energy, atFault));
public void checkRobotCollision() { synchronized (this) { inCollision = false; } for (int i = 0; i < battle.getRobots().size(); i++) { RobotPeer r = (RobotPeer) battle.getRobots().elementAt(i); if (r != null && r != this && !r.isDead) { // If we hit if (getBoundingBox().intersects(r.getBoundingBox())) {...
new HitRobotEvent(name, Utils.normalRelativeAngle(PI + angle - r.heading), energy, false));
new HitRobotEvent(getName(), Utils.normalRelativeAngle(PI + angle - r.heading), energy, false));
public void checkRobotCollision() { synchronized (this) { inCollision = false; } for (int i = 0; i < battle.getRobots().size(); i++) { RobotPeer r = (RobotPeer) battle.getRobots().elementAt(i); if (r != null && r != this && !r.isDead) { // If we hit if (getBoundingBox().intersects(r.getBoundingBox())) {...
public boolean say(String text) {
public synchronized boolean say(String text) {
public boolean say(String text) { if (sayTextPeer == null) { sayTextPeer = new TextPeer(); } if (sayTextPeer.isReady()) { if (text.length() > 100) { return false; } sayTextPeer.setText(getVeryShortName() + ": " + text); sayTextPeer.setX((int) x); sayTextPeer.setY((int) y); sayTextPeer.setDuration...
new ScannedRobotEvent(r.name, r.energy, Utils.normalRelativeAngle(angle - heading), dist, r.heading,
new ScannedRobotEvent(r.getName(), r.energy, Utils.normalRelativeAngle(angle - heading), dist, r.heading,
public void scan() { if (isDroid) { return; } double startAngle = lastRadarHeading; double scanRadians = radarHeading - lastRadarHeading; // Check if we passed through 360 if (scanRadians < -PI) { scanRadians = 2 * PI + scanRadians; } else if (scanRadians > PI) { scanRadians = scanRadians - 2 * PI; } ...
public void setBattle(Battle newBattle) {
public synchronized void setBattle(Battle newBattle) {
public void setBattle(Battle newBattle) { battle = newBattle; }
public void setBattleField(BattleField newBattleField) {
public synchronized void setBattleField(BattleField newBattleField) {
public void setBattleField(BattleField newBattleField) { battleField = newBattleField; }
public void setBodyColor(Color color) {
public synchronized void setBodyColor(Color color) {
public void setBodyColor(Color color) { bodyColor = color; }
public void setBulletColor(Color color) {
public synchronized void setBulletColor(Color color) {
public void setBulletColor(Color color) { bulletColor = color; }
public void setGunColor(Color color) {
public synchronized void setGunColor(Color color) {
public void setGunColor(Color color) { gunColor = color; }
if (getEnergy() == 0) {
if (energy == 0) {
public final void setMove(double distance) { if (getEnergy() == 0) { return; } synchronized (this) { distanceRemaining = distance; acceleration = 0; if (distance == 0) { moveDirection = 0; } else if (distance > 0) { moveDirection = 1; } else { moveDirection = -1; } slowingDown = false; } }
public void setPaintEnabled(boolean enabled) {
public synchronized void setPaintEnabled(boolean enabled) {
public void setPaintEnabled(boolean enabled) { paintEnabled = enabled; }
public void setRadarColor(Color color) {
public synchronized void setRadarColor(Color color) {
public void setRadarColor(Color color) { radarColor = color; }
public void setSGPaintEnabled(boolean enabled) {
public synchronized void setSGPaintEnabled(boolean enabled) {
public void setSGPaintEnabled(boolean enabled) { sgPaintEnabled = enabled; }
public void setScanColor(Color color) {
public synchronized void setScanColor(Color color) {
public void setScanColor(Color color) { scanColor = color; }
public void setSkippedTurns(int newSkippedTurns) {
public synchronized void setSkippedTurns(int newSkippedTurns) {
public void setSkippedTurns(int newSkippedTurns) { skippedTurns = newSkippedTurns; }
public void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) {
public synchronized void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) {
public void setStatistics(robocode.peer.robot.RobotStatistics newStatistics) { statistics = newStatistics; }
String rString = (String) getWindowPositions().get( window.getName() + "(" + window.getPreferredSize().width / 10 + "-" + window.getPreferredSize().height / 10 + ")");
String rString = (String) getWindowPositions().get(window.getName());
public Rectangle getWindowRect(Window window) { window.addComponentListener(this); String rString = (String) getWindowPositions().get( window.getName() + "(" + window.getPreferredSize().width / 10 + "-" + window.getPreferredSize().height / 10 + ")"); if (rString == null) { return null; } else { StringTok...
String rString = new String(rect.x + "," + rect.y + "-" + rect.width + "," + rect.height);
String rString = new String(rect.x + "," + rect.y + "," + rect.width + "," + rect.height);
public void setWindowRect(boolean move, Window w, Rectangle rect) { String rString = new String(rect.x + "," + rect.y + "-" + rect.width + "," + rect.height); getWindowPositions().put( w.getName() + "(" + w.getPreferredSize().width / 10 + "," + w.getPreferredSize().height / 10 + ")", rString); }
getWindowPositions().put( w.getName() + "(" + w.getPreferredSize().width / 10 + "," + w.getPreferredSize().height / 10 + ")", rString);
getWindowPositions().put(w.getName(), rString);
public void setWindowRect(boolean move, Window w, Rectangle rect) { String rString = new String(rect.x + "," + rect.y + "-" + rect.width + "," + rect.height); getWindowPositions().put( w.getName() + "(" + w.getPreferredSize().width / 10 + "," + w.getPreferredSize().height / 10 + ")", rString); }
this.emptyFeature = new SimpleRichFeature(new SimpleFeatureHolder(),templ);
templ.type = ""; templ.source = ""; templ.location = RichLocation.full; try{ this.emptyFeature = new SimpleRichFeature(new SimpleFeatureHolder(),templ); }catch(Exception ex){ throw new BioError(ex); }
public RichSeqIOAdapter() { RichFeature.Template templ = new RichFeature.Template(); templ.annotation = new SimpleRichAnnotation(); templ.featureRelationshipSet = new TreeSet(); templ.rankedCrossRefs = new TreeSet(); this.emptyFeature = new SimpleRichFeature(new SimpleFeatureHolde...
start = gbend + 1;
start = start + gbend - gbstart + 1;
private Location blockToGapped(Location l) { int start = l.getMin(); int end = l.getMax(); List lblocks = new ArrayList(); while (start <= end) { int containingBlockIdx = findSourceBlock(start); Block containingBlock = (Block) blocks.get(containingBlockIdx); int gbstart = start - containingBlock.sourceS...