nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class AbstractMessageChannel implements BeanNameAware , MessageChannel { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private final ChannelInterceptorChain interceptorChain = new ChannelInterceptorChain ( ) ; private String beanName ; public AbstractMessageChannel ( ) { } @ Override public void setBeanName ( String name ) { } public String getBeanName ( ) { } public void setInterceptors ( List < ChannelInterceptor > interceptors ) { } public void addInterceptor ( ChannelInterceptor interceptor ) { } public List < ChannelInterceptor > getInterceptors ( ) { } protected ChannelInterceptorChain getInterceptorChain ( ) { } @ Override public final boolean send ( Message < ? > message ) { } @ Override public final boolean send ( Message < ? > message , long timeout ) { Assert . notNull ( message , "Message<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; if ( logger . isTraceEnabled ( ) ) { <START_BUG> logger . trace ( ( ( ( "[" + ( this . beanName ) ) + "]<seq2seq4repair_space>sending<seq2seq4repair_space>message<seq2seq4repair_space>id=" ) + ( message . getHeaders ( ) . getId ( ) ) ) ) ; <END_BUG> } message = this . interceptorChain . preSend ( message , this ) ; if ( message == null ) { return false ; } try { boolean sent = sendInternal ( message , timeout ) ; this . interceptorChain . postSend ( message , this , sent ) ; return sent ; } catch ( Exception e ) { if ( e instanceof MessagingException ) { throw ( ( MessagingException ) ( e ) ) ; } throw new org . springframework . messaging . MessageDeliveryException ( message , ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>message<seq2seq4repair_space>to<seq2seq4repair_space>channel<seq2seq4repair_space>'" + ( this . getBeanName ( ) ) ) + "'" ) , e ) ; } } protected abstract boolean sendInternal ( Message < ? > message , long timeout ) { } @ Override public String toString ( ) { } }

Fix:
logger . trace ( ( ( ( "[" + ( this . beanName ) ) + "]<seq2seq4repair_space>sending<seq2seq4repair_space>message=" ) + message ) ) ;
Buggy code:
public class TokenManager { @ NotNull public static String getNewRandomSessionID ( Object ... stringConvertibles ) { } @ NotNull public static NewCookie getNewCookieWithSessionID ( String sessionID ) { } @ NotNull public static NewCookie getNewNullCookie ( ) { } @ Nullable public static String getSIDStringFromHeaders ( HttpHeaders headers ) { if ( headers . getCookies ( ) . containsKey ( TokenManager . COOKIE_NAME ) ) <START_BUG> return headers . getCookies ( ) . get ( TokenManager . COOKIE_NAME ) . toString ( ) ; <END_BUG> else return null ; } private static NewCookie getNewCookie ( @ Nullable String sessionID , int maxAge ) { } public static final String COOKIE_NAME = "BOMBERMAN-SESSION-TOKEN" ; private static final int COOKIE_MAX_AGE = 3600 ; private static final String SALT = "Just<seq2seq4repair_space>some<seq2seq4repair_space>words." ; }

Fix:
return headers . getCookies ( ) . get ( TokenManager . COOKIE_NAME ) . getValue ( ) ;
Buggy code:
public class PerSingleton extends PerClause { public PerSingleton ( ) { } public Set couldMatchKinds ( ) { } public FuzzyBoolean fastMatch ( FastMatchInfo type ) { } protected FuzzyBoolean matchInternal ( Shadow shadow ) { } public void resolveBindings ( IScope scope , Bindings bindings ) { } public Test findResidueInternal ( Shadow shadow , ExposedState state ) { } public PerClause concretize ( ResolvedTypeX inAspect ) { PerSingleton ret = new PerSingleton ( ) ; ret . copyLocationFrom ( this ) ; ret . inAspect = inAspect ; if ( ( ! ( inAspect . isAbstract ( ) ) ) && ( Ajc5MemberMaker . isAnnotationStyleAspect ( inAspect ) ) ) { inAspect . crosscuttingMembers . addLateTypeMunger ( inAspect . getWorld ( ) . makePerClauseAspect ( inAspect , getKind ( ) ) ) ; } if ( Ajc5MemberMaker . isAnnotationStyleAspect ( inAspect ) ) { <START_BUG> inAspect . crosscuttingMembers . addLateTypeMunger ( new org . aspectj . weaver . bcel . BcelAccessForInlineMunger ( inAspect ) ) ; <END_BUG> } return ret ; } public void write ( DataOutputStream s ) throws IOException { } public static PerClause readPerClause ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public Kind getKind ( ) { } public String toString ( ) { } public String toDeclarationString ( ) { } }

Fix:
inAspect . crosscuttingMembers . addTypeMunger ( new org . aspectj . weaver . bcel . BcelAccessForInlineMunger ( inAspect ) ) ;
Buggy code:
public class NodeFactory { public static Node createNode ( NodeType nodetype ) { } public static Node createModeledLevelNode ( Level levelToCreate , Camera cam ) { Node levelNode = ( ( Node ) ( Resources . getInstance ( ) . getResources ( levelToCreate . getModelName ( ) ) ) ) ; List < Spatial > nodeList = levelNode . getChildren ( ) ; for ( int i = 0 ; i < ( nodeList . size ( ) ) ; i ++ ) { if ( ( ( ( Node ) ( nodeList . get ( i ) ) ) . getUserDataKeys ( ) . size ( ) ) > 0 ) { String type = ( ( String ) ( ( ( Node ) ( nodeList . get ( i ) ) ) . getUserData ( "nodeType" ) ) ) ; switch ( type ) { case "SPAWNPOINT" : CollisionObjectPainter . paintCollisionObject ( SPAWNPOINT , ( ( Node ) ( nodeList . get ( i ) ) ) ) ; break ; case "CHECKPOINT" : CollisionObjectPainter . paintCollisionObject ( CHECKPOINT , ( ( Node ) ( nodeList . get ( i ) ) ) ) ; ( ( Node ) ( nodeList . get ( i ) ) ) . setLocalTranslation ( 0 , 2 , 0 ) ; break ; case "FINALCHECKPOINT" : CollisionObjectPainter . paintCollisionObject ( FINALCHECKPOINT , ( ( Node ) ( nodeList . get ( i ) ) ) ) ; break ; case "GAMEOBJECT" : CollisionObjectPainter . paintCollisionObject ( GAMEOBJECT , ( ( Node ) ( nodeList . get ( i ) ) ) ) ; case "PLAYER" : Node playerNode = NodeFactory . createNode ( PLAYER ) ; ChaseCamera chaseCam = new ChaseCamera ( cam ) ; chaseCam . setRotationSensitivity ( 0 ) ; chaseCam . setDefaultHorizontalRotation ( new Float ( ( ( Math . PI ) // 2 ) ) ) ; chaseCam . setDefaultVerticalRotation ( new Float ( ( ( FastMath . PI ) // 9 ) ) ) ; playerNode . addControl ( chaseCam ) ; ( ( Node ) ( nodeList . get ( i ) ) ) . attachChild ( playerNode ) ; <START_BUG> playerNode . getControl ( CharacterControl . class ) . warp ( nodeList . get ( i ) . getWorldTranslation ( ) ) ; <END_BUG> levelNode . setLocalTranslation ( 0.0F , ( - 5.0F ) , 0.0F ) ; PhysicsTickControl ptc = new PhysicsTickControl ( playerNode ) ; levelNode . addControl ( ptc ) ; PhysicsWrapper . getInstance ( ) . add ( ( ( PhysicsTickListener ) ( ptc ) ) ) ; break ; } } CollisionShape sceneShape = CollisionShapeFactory . createMeshShape ( levelNode ) ; RigidBodyControl landscape = new RigidBodyControl ( sceneShape , 0 ) ; PhysicsWrapper . getInstance ( ) . add ( landscape ) ; CollisionObjectListener listener = new CollisionObjectListener ( ) ; PhysicsWrapper . getInstance ( ) . addCollisonListener ( listener ) ; levelNode . addControl ( listener ) ; levelNode . addControl ( landscape ) ; } return levelNode ; } }

Fix:
playerNode . setLocalTranslation ( nodeList . get ( i ) . getWorldTranslation ( ) ) ;
Buggy code:
public class CXFConsumptionUIPlugin extends AbstractUIPlugin { public static final String PLUGIN_ID = "org.eclipse.jst.ws.cxf.consumption.ui" ; private static CXFConsumptionUIPlugin plugin ; public CXFConsumptionUIPlugin ( ) { } @ Override public void start ( BundleContext context ) throws Exception { } @ Override public void stop ( BundleContext context ) throws Exception { } public static CXFConsumptionUIPlugin getDefault ( ) { } public static void logMessage ( int severity , String message ) { } public static void log ( IStatus status ) { } public static void log ( Throwable exception ) { <START_BUG> CXFConsumptionUIPlugin . log ( new Status ( IStatus . ERROR , CXFConsumptionUIPlugin . PLUGIN_ID , exception . getLocalizedMessage ( ) , exception ) ) ; <END_BUG> } }

Fix:
CXFConsumptionUIPlugin . log ( new Status ( IStatus . ERROR , CXFConsumptionUIPlugin . PLUGIN_ID , exception . toString ( ) , exception ) ) ;
Buggy code:
final class ObjectFactory { private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties" ; private static final boolean DEBUG = ObjectFactory . isDebugEnabled ( ) ; private static final int DEFAULT_LINE_LENGTH = 80 ; private static Properties fXercesProperties = null ; private static long fLastModified = - 1 ; static Object createObject ( String factoryId , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } static Object createObject ( String factoryId , String propertiesFilename , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } private static boolean isDebugEnabled ( ) { } private static void debugPrintln ( String msg ) { } static ClassLoader findClassLoader ( ) throws ObjectFactory . ConfigurationError { } static Object newInstance ( String className , ClassLoader cl , boolean doFallback ) throws ObjectFactory . ConfigurationError { } static Class findProviderClass ( String className , ClassLoader cl , boolean doFallback ) throws ClassNotFoundException , ObjectFactory . ConfigurationError { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { <START_BUG> final int lastDot = className . lastIndexOf ( "." ) ; <END_BUG> String packageName = className ; if ( lastDot != ( - 1 ) ) packageName = className . substring ( 0 , lastDot ) ; security . checkPackageAccess ( packageName ) ; } Class providerClass ; if ( cl == null ) { providerClass = Class . forName ( className ) ; } else { try { providerClass = cl . loadClass ( className ) ; } catch ( ClassNotFoundException x ) { if ( doFallback ) { ClassLoader current = ObjectFactory . class . getClassLoader ( ) ; if ( current == null ) { providerClass = Class . forName ( className ) ; } else if ( cl != current ) { cl = current ; providerClass = cl . loadClass ( className ) ; } else { throw x ; } } else { throw x ; } } } return providerClass ; } private static Object findJarServiceProvider ( String factoryId ) throws ObjectFactory . ConfigurationError { } static final class ConfigurationError extends Error { static final long serialVersionUID = 5061904944269807898L ; private Exception exception ; ConfigurationError ( String msg , Exception x ) { } Exception getException ( ) { } } }

Fix:
final int lastDot = className . lastIndexOf ( '.' ) ;
Buggy code:
public class Main extends Application { @ Override public void start ( Stage primaryStage ) throws Exception { } public static void main ( String [ ] args ) throws IOException { <START_BUG> if ( ( ( args . length ) > 0 ) && ( args [ 0 ] . equals ( "gui" ) ) ) { <END_BUG> Application . launch ( args ) ; } else { GraphCli graph = new GraphCli ( ) ; File file = new File ( ".graph" ) ; if ( ! ( file . exists ( ) ) ) file . createNewFile ( ) ; graph . graph = graph . graph . fromFile ( ".graph" ) ; while ( true ) { graph . call ( ) ; if ( graph . shouldBreak ( ) ) return ; } } } }

Fix:
if ( ( ( args . length ) > 0 ) && ( args [ 0 ] . equalsIgnoreCase ( "gui" ) ) ) {
Buggy code:
public class BounceAction extends AbstractColumbaAction implements SelectionListener { public BounceAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new BounceCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class ObjectActionContributorReader extends RegistryReader { public static final String TAG_OBJECT_CONTRIBUTION = "objectContribution" ; private static final String ATT_OBJECTCLASS = "objectClass" ; private ObjectActionContributorManager manager ; protected void processObjectContribution ( IConfigurationElement element ) { } protected boolean readElement ( IConfigurationElement element ) { } public void readPopupContributors ( ObjectActionContributorManager mng ) { setManager ( mng ) ; <START_BUG> IPluginRegistry registry = Platform . getPluginRegistry ( ) ; <END_BUG> readRegistry ( registry , PLUGIN_ID , PL_POPUP_MENU ) ; } public void setManager ( ObjectActionContributorManager mng ) { } }

Fix:
IExtensionRegistry registry = Platform . getExtensionRegistry ( ) ;
Buggy code:
public final class Util { public static int [ ] createShape ( int size , int arity ) { } public static int getShapeSize ( int [ ] shape ) { } public static String formatElement ( int size , int elem ) { } public static int parseElement ( int size , String elem ) { } public static String formatTuple ( int size , int [ ] tuple ) { } public static int [ ] parseTuple ( int size , String str ) { int [ ] tuple ; if ( size > ( ( 'z' - 'a' ) + 10 ) ) { String [ ] s = str . split ( "," ) ; tuple = new int [ s . length ] ; for ( int i = 0 ; i < ( s . length ) ; i ++ ) { int t = Integer . parseInt ( s [ i ] ) ; if ( ( t < 0 ) || ( t >= size ) ) throw new IllegalArgumentException ( ) ; tuple [ i ] = t ; } } else { tuple = new int [ str . length ( ) ] ; for ( int i = 0 ; i < ( tuple . length ) ; i ++ ) { char c = str . charAt ( i ) ; int t ; if ( ( '0' <= c ) && ( c <= '9' ) ) t = c - '0' ; else <START_BUG> if ( ( 'a' <= c ) && ( c <= 'a' ) ) <END_BUG> t = ( c - 'a' ) + 10 ; else throw new IllegalArgumentException ( ) ; if ( ( t < 0 ) || ( t >= size ) ) throw new IllegalArgumentException ( ) ; tuple [ i ] = t ; } } return tuple ; } private static class NullIterator implements Iterator < int [ ] > { private static final int [ ] EMPTY = new int [ 0 ] ; private boolean hasNext ; public NullIterator ( boolean hasNext ) { } @ Override public boolean hasNext ( ) { } @ Override public int [ ] next ( ) { } @ Override public void remove ( ) { } } private static final Iterator < int [ ] > NULL_ITERATOR = new Util . NullIterator ( false ) ; private static class CubeIterator implements Iterator < int [ ] > { private final int [ ] shape ; private final int [ ] index ; private int state ; public CubeIterator ( int [ ] shape ) { } @ Override public boolean hasNext ( ) { } @ Override public int [ ] next ( ) { } @ Override public void remove ( ) { } } public static Iterator < int [ ] > cubeIterator ( int [ ] shape ) { } private static class CubeIterator2 implements Iterator < int [ ] > { private final int size ; private final int [ ] index ; private int state ; public CubeIterator2 ( int size , int arity ) { } @ Override public boolean hasNext ( ) { } @ Override public int [ ] next ( ) { } @ Override public void remove ( ) { } } public static Iterator < int [ ] > cubeIterator ( int size , int arity ) { } private static class HullIterator implements Iterator < int [ ] > { private final int radius ; private final int [ ] index ; private int coord ; private int state ; public HullIterator ( int radius , int arity ) { } @ Override public boolean hasNext ( ) { } @ Override public int [ ] next ( ) { } @ Override public void remove ( ) { } } public static Iterator < int [ ] > hullIterator ( int radius , int arity ) { } private static void printTuples ( Iterator < int [ ] > iter ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( 'a' <= c ) && ( c <= 'z' ) )
Buggy code:
public class ConnectionManager implements Watcher { protected static final Logger log = LoggerFactory . getLogger ( ConnectionManager . class ) ; private final String name ; private CountDownLatch clientConnected ; private KeeperState state = KeeperState . Disconnected ; private boolean connected = false ; private boolean likelyExpired = true ; private final ZkClientConnectionStrategy connectionStrategy ; private final String zkServerAddress ; private final SolrZkClient client ; private final OnReconnect onReconnect ; private volatile boolean isClosed = false ; private volatile Timer disconnectedTimer ; public ConnectionManager ( String name , SolrZkClient client , String zkServerAddress , int zkClientTimeout , ZkClientConnectionStrategy strat , OnReconnect onConnect ) { } private synchronized void connected ( ) { } private synchronized void disconnected ( ) { if ( ( disconnectedTimer ) != null ) { disconnectedTimer . cancel ( ) ; disconnectedTimer = null ; } if ( ! ( isClosed ) ) { <START_BUG> disconnectedTimer = new Timer ( ) ; <END_BUG> disconnectedTimer . schedule ( new TimerTask ( ) { @ Override public void run ( ) { synchronized ( ConnectionManager . this ) { likelyExpired = true ; } } } , ( ( long ) ( ( client . getZkClientTimeout ( ) ) * 0.9 ) ) ) ; } connected = false ; } @ Override public synchronized void process ( WatchedEvent event ) { } public synchronized boolean isConnected ( ) { } public void close ( ) { } public synchronized KeeperState state ( ) { } public synchronized boolean isLikelyExpired ( ) { } public synchronized void waitForConnected ( long waitForConnection ) throws TimeoutException { } public synchronized void waitForDisconnected ( long timeout ) throws InterruptedException , TimeoutException { } private void closeKeeper ( SolrZooKeeper keeper ) { } }

Fix:
disconnectedTimer = new Timer ( true ) ;
Buggy code:
public class IntegerLiteral extends Literal { public IntegerLiteral ( final Identifier literalValue ) { } @ Override public Object evaluateInternal ( final ExecutionContext ctx ) { <START_BUG> return new Long ( getLiteralValue ( ) . getValue ( ) ) ; <END_BUG> } public Type analyzeInternal ( final ExecutionContext ctx , final Set < AnalysationIssue > issues ) { } }

Fix:
return new BigInteger ( getLiteralValue ( ) . getValue ( ) ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity" ; private Activity context = this ; private static Button saveButton ; private static EditText editText_userid ; private static EditText editText_token ; private static String userID ; private static String token ; public static final String PREFS_NAME = "N2I_PREFS" ; public static final String PREFS_USERID_KEY = "N2I_USERID" ; public static final String PREFS_TOKEN_KEY = "N2I_TOKEN" ; public static int notificationID = 10001 ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onDestroy ( ) { } public void get_prefs ( Context context ) { SharedPreferences settings ; String text ; settings = context . getSharedPreferences ( MainActivity . PREFS_NAME , MODE_PRIVATE ) ; MainActivity . userID = settings . getString ( MainActivity . PREFS_USERID_KEY , null ) ; <START_BUG> MainActivity . token = settings . getString ( MainActivity . PREFS_USERID_KEY , null ) ; <END_BUG> } public void save_prefs ( Context context , String userid , String token ) { } private static IntentFilter makeIntentFilter ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private final BroadcastReceiver N2IReceiver ; No newline ; at end ; of file ; }

Fix:
MainActivity . token = settings . getString ( MainActivity . PREFS_TOKEN_KEY , null ) ;
Buggy code:
public class Execute { private String [ ] m_command ; private Properties m_environment = new Properties ( ) ; private File m_workingDirectory = new File ( "." ) ; private boolean m_newEnvironment ; private OutputStream m_output ; private OutputStream m_error ; private long m_timeout ; private boolean m_useVMLauncher = true ; private static File getAntHomeDirectory ( ) { } public static void runCommand ( final Task task , final String [ ] cmdline ) throws TaskException { try { <START_BUG> task . log ( Commandline . toString ( cmdline ) , MSG_VERBOSE ) ; <END_BUG> final Execute exe = new Execute ( ) ; exe . setOutput ( new LogOutputStream ( task , Project . MSG_INFO ) ) ; exe . setError ( new LogOutputStream ( task , Project . MSG_WARN ) ) ; exe . setCommandline ( cmdline ) ; int retval = exe . execute ( ) ; if ( retval != 0 ) { throw new TaskException ( ( ( ( cmdline [ 0 ] ) + "<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>return<seq2seq4repair_space>code<seq2seq4repair_space>" ) + retval ) ) ; } } catch ( final IOException ioe ) { throw new TaskException ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>launch<seq2seq4repair_space>" + ( cmdline [ 0 ] ) ) + ":<seq2seq4repair_space>" ) + ioe ) ) ; } } public Execute ( final ExecuteStreamHandler streamHandler ) { } public Execute ( ) { } public void setTimeout ( final long timeout ) { } public void setOutput ( final OutputStream output ) { } public void setError ( final OutputStream error ) { } public void setCommandline ( String [ ] commandline ) { } public void setEnvironment ( final Properties environment ) { } public void setNewenvironment ( boolean newEnvironment ) { } public void setVMLauncher ( boolean useVMLauncher ) { } public void setWorkingDirectory ( final File workingDirectory ) { } public int execute ( ) throws IOException , TaskException { } }

Fix:
task . hackGetLogger ( ) . debug ( Commandline . toString ( cmdline ) ) ;
Buggy code:
public class ITuser { private static WebDriver driver ; @ BeforeClass public static void setupClass ( ) { } @ Test public void testLogin ( ) { ITuser . driver . get ( "http:////localhost:9966//kandoe//#//login" ) ; SeleniumHelper . allowDomToLoad ( ) ; WebElement element = ITuser . driver . findElement ( By . id ( "app" ) ) ; element = ITuser . driver . findElement ( By . tagName ( "login" ) ) ; element = element . findElement ( By . id ( "ib_username" ) ) ; assertEquals ( "input" , element . getTagName ( ) ) ; assertEquals ( "text" , element . getAttribute ( "type" ) ) ; SeleniumHelper . fillTextIntoElement ( element , "clarence.ho@gmail.com" ) ; element = ITuser . driver . findElement ( By . id ( "ib_password" ) ) ; assertEquals ( "input" , element . getTagName ( ) ) ; assertEquals ( "password" , element . getAttribute ( "type" ) ) ; SeleniumHelper . fillTextIntoElement ( element , "scott" ) ; element = ITuser . driver . findElement ( By . name ( "btn_login" ) ) ; assertEquals ( "button" , element . getTagName ( ) ) ; <START_BUG> assertEquals ( "Login" , element . getText ( ) ) ; <END_BUG> SeleniumHelper . clickOnElement ( ITuser . driver , element ) ; new org . openqa . selenium . support . ui . WebDriverWait ( ITuser . driver , 10 ) . until ( ( WebDriver d ) -> d . getTitle ( ) . equals ( "Jouw<seq2seq4repair_space>sessies" ) ) ; } @ AfterClass public static void tearDownClass ( ) { } }

Fix:
assertEquals ( "Inloggen" , element . getText ( ) ) ;
Buggy code:
public class JoinCommand extends AbstractCommand { private static final String WELCOME_TEXT_MESSAGE = "Hello!<seq2seq4repair_space>Thank<seq2seq4repair_space>you<seq2seq4repair_space>for<seq2seq4repair_space>using<seq2seq4repair_space>me.<seq2seq4repair_space>For<seq2seq4repair_space>more<seq2seq4repair_space>information<seq2seq4repair_space>about<seq2seq4repair_space>me<seq2seq4repair_space>visit<seq2seq4repair_space>my<seq2seq4repair_space>twitch<seq2seq4repair_space>page" ; @ Override public void call ( String commandSyntax , MessageEvent event ) { String userNick = getUserNick ( event ) ; <START_BUG> if ( userNick != null ) { <END_BUG> String channelName = getChannelName ( userNick ) ; if ( ! ( event . getBot ( ) . getUserChannelDao ( ) . containsChannel ( channelName ) ) ) { List < User > result = JpaRepository . findUserByName ( userNick ) ; User user ; if ( ! ( result . isEmpty ( ) ) ) { user = new User ( result . get ( 0 ) . getName ( ) , 1 , result . get ( 0 ) . whisperSettings ( ) , result . get ( 0 ) . getIGN ( ) ) ; } else { user = new User ( userNick , 1 , 1 , "" ) ; } joinChannel ( event , channelName , user ) ; } else { event . respondChannel ( ( userNick + ",<seq2seq4repair_space>I<seq2seq4repair_space>am<seq2seq4repair_space>already<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>channel!" ) ) ; } } } private void joinChannel ( MessageEvent event , String channelName , User user ) { } }

Fix:
if ( ( userNick != null ) && ( event . getMessage ( ) . equalsIgnoreCase ( "!join" ) ) ) {
Buggy code:
public class GwtSafeStylesUtilsTest extends GWTTestCase { static final String INVALID_STYLE_NAME = "contains;semicolon" ; static final String [ ] INVALID_STYLE_NAMES = new String [ ] { null , "" , ";startsWithSemicolon" , "endsWithSemicolon;" , "contains;semicolon" , "--starts-with-double-hyphen" , "0starts-with-digit" , "-0starts-with-hyphen-digit" , "contains:colon" } ; static final String INVALID_STYLE_VALUE = "contains;semicolon" ; static final String [ ] INVALID_STYLE_VALUES = new String [ ] { null , "" , "unmatched}close-bracket" , "unmatched{open-bracket" , "mismatched[bracket)" , ";startsWithSemicolon" , "endsWithSemicolon;" , "contains;semicolon" , "almost-escaped\\\\;semi-colon" , "almost-escaped\\\\:colon" , "unmatched'singlequote" , "unmatched\"doublequote" , "url(http:////withUnmatched(Paren)" , "url(http:////unterminated" , "end-in-escape-character\\" } ; static final String [ ] VALID_STYLE_NAMES = new String [ ] { "simple" , "one-hyphen" , "has-two-hyphens" , "-starts-with-hyphen" , "_startsWithUnderscore" , "endsWithUnderscore_" , "contains_underscore" , "contains--double-hyphen" , "contains-1-digit" } ; static final String [ ] VALID_STYLE_VALUES = new String [ ] { "simple" , "one-hyphen" , "has-two-hyphens" , "-starts-with-hyphen" , "[braces]" , "curly{brackets}" , "paren(thes)es" , "(nested[pair]ables)" , "(sibling)parenthesis{and[braces]}" , "semicolon-in'single;quote'" , "semicolon-in\"double;quote\"" , "unmatched'in<seq2seq4repair_space>quote}'" , "unmatched\"in<seq2seq4repair_space>[double<seq2seq4repair_space>quote\"" , "escaped\\;semi-colon" , "escaped\\:colon" , "url(http:////localhost)" , "url('http:////withSingleQuotes')" , "url(\"http:////withDoubleQuotes\")" , "url(http:////withSemiColon;)" , "url(http:////withUnmatchedBracket{[)" , "url(http:////withUnmatchedCloseBracket}])" , "end-in-escaped-backslash\\\\" , "u-near-end-u" , "url-near-end-url" , "absolute" } ; private static Boolean isAssertionEnabled ; static boolean isAssertionEnabled ( ) { } @ Override public String getModuleName ( ) { } public void testForBackgroundImage ( ) { } public void testForDisplay ( ) { } public void testForZIndex ( ) { <START_BUG> assertEquals ( "zIndex:<seq2seq4repair_space>5;" , SafeStylesUtils . forZIndex ( 5 ) . asString ( ) ) ; <END_BUG> } public void testFromTrustedNameAndValue ( ) { } public void testFromTrustedNameAndValueInvalidName ( ) { } public void testFromTrustedNameAndValueInvalidValue ( ) { } public void testFromTrustedNameAndValueValidName ( ) { } public void testFromTrustedNameAndValueValidValue ( ) { } public void testFromTrustedString ( ) { } }

Fix:
assertEquals ( "z-index:<seq2seq4repair_space>5;" , SafeStylesUtils . forZIndex ( 5 ) . asString ( ) ) ;
Buggy code:
public class DateTime extends Composite { static final int DateTimeProc ; static final TCHAR DateTimeClass = new TCHAR ( 0 , OS . DATETIMEPICK_CLASS , true ) ; static final int CalendarProc ; static final TCHAR CalendarClass = new TCHAR ( 0 , OS . MONTHCAL_CLASS , true ) ; static final int MARGIN = 4 ; static final int MAX_DIGIT = 9 ; static final int MAX_DAY = 31 ; static final int MAX_12HOUR = 12 ; static final int MAX_24HOUR = 24 ; static final int MAX_MINUTE = 60 ; static final int MONTH_DAY_YEAR = 0 ; static final int DAY_MONTH_YEAR = 1 ; static final int YEAR_MONTH_DAY = 2 ; static final char SINGLE_QUOTE = '\'' ; static final char DAY_FORMAT_CONSTANT = 'd' ; static final char MONTH_FORMAT_CONSTANT = 'M' ; static final char YEAR_FORMAT_CONSTANT = 'y' ; static final char HOURS_FORMAT_CONSTANT = 'h' ; static final char MINUTES_FORMAT_CONSTANT = 'm' ; static final char SECONDS_FORMAT_CONSTANT = 's' ; static final char AMPM_FORMAT_CONSTANT = 't' ; static final int [ ] MONTH_NAMES = new int [ ] { OS . LOCALE_SMONTHNAME1 , OS . LOCALE_SMONTHNAME2 , OS . LOCALE_SMONTHNAME3 , OS . LOCALE_SMONTHNAME4 , OS . LOCALE_SMONTHNAME5 , OS . LOCALE_SMONTHNAME6 , OS . LOCALE_SMONTHNAME7 , OS . LOCALE_SMONTHNAME8 , OS . LOCALE_SMONTHNAME9 , OS . LOCALE_SMONTHNAME10 , OS . LOCALE_SMONTHNAME11 , OS . LOCALE_SMONTHNAME12 } ; public DateTime ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultBackground ( ) { } String getComputeSizeString ( ) { } String getCustomShortDateFormat ( ) { } String getCustomShortTimeFormat ( ) { } String getLongDateFormat ( ) { } String getShortDateFormat ( ) { } int getShortDateFormatOrdering ( ) { } String getTimeFormat ( ) { } boolean is24HourTime ( ) { } public int getDay ( ) { } public int getHours ( ) { } public int getMinutes ( ) { } public int getMonth ( ) { } String getNameText ( ) { } public int getSeconds ( ) { } public int getYear ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setDay ( int day ) { } public void setHours ( int hours ) { } public void setMinutes ( int minutes ) { } public void setMonth ( int month ) { } public void setSeconds ( int seconds ) { } public void setYear ( int year ) { } int widgetStyle ( ) { int bits = ( super . widgetStyle ( ) ) | ( OS . WS_TABSTOP ) ; if ( ( ( style ) & ( SWT . CALENDAR ) ) != 0 ) <START_BUG> return bits ; <END_BUG> bits &= ~ ( OS . WS_CLIPCHILDREN ) ; if ( ( ( style ) & ( SWT . TIME ) ) != 0 ) bits |= OS . DTS_TIMEFORMAT ; if ( ( ( style ) & ( SWT . DATE ) ) != 0 ) bits |= ( ( ( style ) & ( SWT . MEDIUM ) ) != 0 ? OS . DTS_SHORTDATECENTURYFORMAT : OS . DTS_LONGDATEFORMAT ) | ( OS . DTS_UPDOWN ) ; return bits ; } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT wmNotifyChild ( NMHDR hdr , int wParam , int lParam ) { } }

Fix:
return bits | ( OS . MCS_NOTODAY ) ;
Buggy code:
public class Programa { public static void main ( String [ ] args ) { NotaFiscal notaFiscal = new NotaFiscal ( ) ; notaFiscal . setNomeDoCliente ( "Anderson" ) ; notaFiscal . setValor ( 200.0F ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>da<seq2seq4repair_space>nota<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscal . getValor ( ) ) ) ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>com<seq2seq4repair_space>juros<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscal . valorComJuros ( ) ) ) ) ; NotaFiscalPessoaFisica notaFiscalPessoaFisica = new NotaFiscalPessoaFisica ( ) ; notaFiscalPessoaFisica . setNomeDoCliente ( "Anderson" ) ; notaFiscalPessoaFisica . setValor ( 200.0F ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>da<seq2seq4repair_space>nota<seq2seq4repair_space>pf<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscalPessoaFisica . getValor ( ) ) ) ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>com<seq2seq4repair_space>juros<seq2seq4repair_space>pf<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscalPessoaFisica . valorComJuros ( ) ) ) ) ; NotaFiscalPessoaJuridica notaFiscalPessoaJuridica = new NotaFiscalPessoaJuridica ( ) ; <START_BUG> notaFiscalPessoaFisica . setNomeDoCliente ( "João" ) ; <END_BUG> notaFiscalPessoaJuridica . setValor ( 200.0F ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>da<seq2seq4repair_space>nota<seq2seq4repair_space>pj<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscalPessoaJuridica . getValor ( ) ) ) ) ; System . out . println ( ( "O<seq2seq4repair_space>valor<seq2seq4repair_space>com<seq2seq4repair_space>juros<seq2seq4repair_space>pj<seq2seq4repair_space>é:<seq2seq4repair_space>" + ( notaFiscalPessoaJuridica . valorComJuros ( ) ) ) ) ; } }

Fix:
notaFiscalPessoaJuridica . setNomeDoCliente ( "João" ) ;
Buggy code:
public abstract class AjaxEventBehavior extends AbstractDefaultAjaxBehavior { private static long sequence = 0 ; private static final long serialVersionUID = 1L ; private String event ; private AjaxEventBehavior . ThrottlingSettings throttlingSettings ; public AjaxEventBehavior ( final String event ) { } public final AjaxEventBehavior setThrottleDelay ( Duration throttleDelay ) { } protected void onComponentTag ( final ComponentTag tag ) { } protected String getEventHandler ( ) { } protected String getCallbackScript ( String partialCall , String onSuccessScript , String onFailureScript ) { String script = super . getCallbackScript ( partialCall , onSuccessScript , onFailureScript ) ; final AjaxEventBehavior . ThrottlingSettings ts = throttlingSettings ; if ( ts != null ) { <START_BUG> script = AbstractAjaxTimerBehavior . throttleScript ( script , ts . getId ( ) , ts . getDelay ( ) ) ; <END_BUG> } return script ; } protected void onCheckEvent ( final String event ) { } protected final String getEvent ( ) { } protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onEvent ( final AjaxRequestTarget target ) { } private static class ThrottlingSettings { private final Duration delay ; private final String id ; public ThrottlingSettings ( final String id , final Duration delay ) { } public Duration getDelay ( ) { } public String getId ( ) { } } }

Fix:
script = AbstractDefaultAjaxBehavior . throttleScript ( script , ts . getId ( ) , ts . getDelay ( ) ) ;
Buggy code:
public class InAppBillingHelper { public static final int BILLING_REQUEST_CODE = 3000 ; public static final String BUY_ALL_HEROES_IN_APP_ID = "all_heroes" ; private static final String TAG = "InAppBillingHelper" ; private static final int API_VERSION = 3 ; private static final String IN_APP_PURCHASE_TYPE = "inapp" ; private static final String DEVELOPER_PAYLOAD = "doobiididadoobiiidoodidadoodidaaaaaa" ; private static final String SERVICE_INTENT = "com.android.vending.billing.InAppBillingService.BIND" ; private static final String RESPONSE_CODE_KEY = "RESPONSE_CODE" ; private static final String RESPONSE_PURCHASE_ITEMS_KEY = "INAPP_PURCHASE_ITEM_LIST" ; private static final int RESPONSE_SUCCESS = 0 ; private Activity mActivity ; private SharedPreferences mPrefs ; private IInAppBillingService mService ; private ServiceConnection mServiceConnection ; public InAppBillingHelper ( Activity activity , final OnBillingServiceConnectedListener callback ) { } public void doIOwn ( List < ? extends InAppProduct > inAppProducts ) { try { Bundle response = mService . getPurchases ( InAppBillingHelper . API_VERSION , mActivity . getPackageName ( ) , InAppBillingHelper . IN_APP_PURCHASE_TYPE , null ) ; int responseCode = response . getInt ( InAppBillingHelper . RESPONSE_CODE_KEY ) ; if ( responseCode == ( InAppBillingHelper . RESPONSE_SUCCESS ) ) { ArrayList < String > ownedItems = response . getStringArrayList ( InAppBillingHelper . RESPONSE_PURCHASE_ITEMS_KEY ) ; <START_BUG> boolean hasAll = ownedItems . contains ( InAppBillingHelper . BUY_ALL_HEROES_IN_APP_ID ) ; <END_BUG> Log . d ( InAppBillingHelper . TAG , ( "has<seq2seq4repair_space>all<seq2seq4repair_space>heroes<seq2seq4repair_space>?<seq2seq4repair_space>" + hasAll ) ) ; for ( InAppProduct inAppProduct : inAppProducts ) { if ( ! ( inAppProduct . isAvailable ( ) ) ) { inAppProduct . setHasBeenBought ( false ) ; if ( hasAll || ( ( mPrefs . getString ( inAppProduct . getProductId ( ) , null ) ) != null ) ) { inAppProduct . setHasBeenBought ( true ) ; } else { for ( String productId : ownedItems ) { if ( inAppProduct . getProductId ( ) . equals ( productId ) ) { inAppProduct . setHasBeenBought ( true ) ; break ; } } } } } } } catch ( RemoteException e ) { e . printStackTrace ( ) ; } } public void doIOwn ( InAppProduct inAppProduct ) { } public void purchaseItem ( InAppProduct inAppProduct ) { } public void purchaseItem ( String inAppProductId ) { } public void onDestroy ( ) { } }

Fix:
boolean hasAll = ( ownedItems != null ) && ( ownedItems . contains ( InAppBillingHelper . BUY_ALL_HEROES_IN_APP_ID ) ) ;
Buggy code:
public abstract class GabGame extends BaseGabGame { @ Override public void onLoadOptions ( Engine engine ) { } @ Override public void onLoadResources ( ) { } @ Override public void onLoadEntities ( ) { } @ Override public Scene onLoadScene ( ) { } <START_BUG> public abstract Scene config ( Engine engine ) ; <END_BUG> public abstract Scene init ( ) { } }

Fix:
public abstract void config ( Engine engine ) ;
Buggy code:
@ Deprecated public class TestSynonymMap extends LuceneTestCase { public void testInvalidMappingRules ( ) throws Exception { } public void testReadMappingRules ( ) throws Exception { } public void testRead1waySynonymRules ( ) throws Exception { } public void testRead2waySynonymRules ( ) throws Exception { } public void testBigramTokenizer ( ) throws Exception { } public void testLoadRules ( ) throws Exception { Map < String , String > args = new HashMap < String , String > ( ) ; args . put ( "synonyms" , "something.txt" ) ; SlowSynonymFilterFactory ff = new SlowSynonymFilterFactory ( ) ; ff . init ( args ) ; ff . inform ( new ResourceLoader ( ) { @ Override <START_BUG> public < T > T newInstance ( String cname , Class < T > expectedType , String ... subpackages ) { <END_BUG> throw new RuntimeException ( "stub" ) ; } @ Override public InputStream openResource ( String resource ) throws IOException { if ( ! ( "something.txt" . equals ( resource ) ) ) { throw new RuntimeException ( "should<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>differnt<seq2seq4repair_space>resource" ) ; } else { return new ByteArrayInputStream ( "a,b" . getBytes ( "UTF-8" ) ) ; } } } ) ; SlowSynonymMap synMap = ff . getSynonymMap ( ) ; assertEquals ( 2 , synMap . submap . size ( ) ) ; assertTokIncludes ( synMap , "a" , "a" ) ; assertTokIncludes ( synMap , "a" , "b" ) ; assertTokIncludes ( synMap , "b" , "a" ) ; assertTokIncludes ( synMap , "b" , "b" ) ; } private void assertTokIncludes ( SlowSynonymMap map , String src , String exp ) throws Exception { } private SlowSynonymMap getSubSynonymMap ( SlowSynonymMap map , String src ) { } }

Fix:
public < T > T newInstance ( String cname , Class < T > expectedType ) {
Buggy code:
public class IDeviceRecorder implements DeviceRecorder { static final int DEFAULT_COMMIT_INTERVAL = 1 ; int interval = IDeviceRecorder . DEFAULT_COMMIT_INTERVAL ; String idString ; Id < Composite > id ; Package repo ; private Transaction recordStateTx ; private boolean modified = false ; private Log log = LogFactory . getLog ( getClass ( ) ) ; public IDeviceRecorder ( Connector connector , String idString ) throws ConnectorException { } public IDeviceRecorder ( Connector connector , String idString , int interval ) throws ConnectorException { } private Transaction createStateTx ( ) { <START_BUG> return repo . connect ( ( ( ( getClass ( ) . getName ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( id . getUniqueName ( ) ) ) ) ; <END_BUG> } private synchronized void commitStateTx ( ) { } @ Override public synchronized String recordState ( State state ) { } @ Override public synchronized String recordCommand ( Command command ) { } private long timestamp ( ) { } }

Fix:
return repo . connect ( ( ( ( getClass ( ) . getName ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( idString ) ) ) ;
Buggy code:
public class Canvas extends Composite { Caret caret ; Canvas ( ) { } public Canvas ( Composite parent , int style ) { } public Caret getCaret ( ) { } int Pt_CB_GOT_FOCUS ( int widget , int info ) { } int Pt_CB_LOST_FOCUS ( int widget , int info ) { } int drawProc ( int widget , int damage ) { } public void redraw ( ) { } public void redraw ( int x , int y , int width , int height , boolean all ) { } void releaseChildren ( boolean destroy ) { if ( ( caret ) != null ) { <START_BUG> caret . releaseChildren ( false ) ; <END_BUG> caret = null ; } super . releaseChildren ( destroy ) ; } public void scroll ( int destX , int destY , int x , int y , int width , int height , boolean all ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } public void setCaret ( Caret caret ) { } public void setFont ( Font font ) { } }

Fix:
caret . release ( false ) ;
Buggy code:
public class MSVSSGET extends MSVSS { private String m_LocalPath = null ; private boolean m_Recursive = false ; private boolean m_Writable = false ; private String m_Version = null ; private String m_Date = null ; private String m_Label = null ; public void execute ( ) throws BuildException { StringBuffer commandLine = new StringBuffer ( ) ; int result = 0 ; if ( ( getVsspath ( ) ) == null ) { String msg = "vsspath<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" ; throw new BuildException ( msg ) ; } <START_BUG> commandLine . append ( SS_EXE ) . append ( '<seq2seq4repair_space>' ) . append ( COMMAND_GET ) ; <END_BUG> commandLine . append ( getVsspath ( ) ) ; commandLine . append ( getLocalpathCommand ( ) ) ; commandLine . append ( "<seq2seq4repair_space>-I-" ) ; commandLine . append ( getRecursiveCommand ( ) ) ; commandLine . append ( getVersionCommand ( ) ) ; commandLine . append ( getWritableCommand ( ) ) ; commandLine . append ( getLoginCommand ( ) ) ; result = run ( commandLine . toString ( ) ) ; if ( result != 0 ) { String msg = "Failed<seq2seq4repair_space>executing:<seq2seq4repair_space>" + ( commandLine . toString ( ) ) ; throw new BuildException ( msg ) ; } } public void setLocalpath ( String localPath ) { } public String getLocalpathCommand ( ) { } public void setRecursive ( String recursive ) { } public String getRecursiveCommand ( ) { } public final void setWritable ( String argWritable ) { } public String getWritableCommand ( ) { } public void setVersion ( String version ) { } public void setDate ( String date ) { } public void setLabel ( String label ) { } public String getVersionCommand ( ) { } }

Fix:
commandLine . append ( getSSCommand ( ) ) . append ( '<seq2seq4repair_space>' ) . append ( COMMAND_GET ) ;
Buggy code:
public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior { private static final long serialVersionUID = 1L ; public static final ResourceReference INDICATOR = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "indicator.gif" ) ; private static final ResourceReference JAVASCRIPT_DEBUG = new JavascriptResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug.js" ) ; @ Override protected void onBind ( ) { } @ Override public void renderHead ( IHeaderResponse response ) { } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected CharSequence getCallbackScript ( ) { } protected CharSequence getCallbackScript ( boolean onlyTargetActivePage ) { } protected CharSequence getPreconditionScript ( ) { } protected CharSequence getFailureScript ( ) { } protected CharSequence getSuccessScript ( ) { } protected CharSequence generateCallbackScript ( final CharSequence partialCall ) { } protected String getChannelName ( ) { } protected String findIndicatorId ( ) { } public final void onRequest ( ) { WebApplication app = ( ( WebApplication ) ( getComponent ( ) . getApplication ( ) ) ) ; AjaxRequestTarget target = app . newAjaxRequestTarget ( getComponent ( ) . getPage ( ) ) ; RequestCycle requestCycle = RequestCycle . get ( ) ; requestCycle . scheduleRequestHandlerAfterCurrent ( target ) ; Url oldBaseURL = requestCycle . getUrlRenderer ( ) . getBaseUrl ( ) ; WebRequest request = ( ( WebRequest ) ( requestCycle . getRequest ( ) ) ) ; <START_BUG> Url baseURL = Url . parse ( request . getAjaxBaseUrl ( ) , request . getCharset ( ) ) ; <END_BUG> requestCycle . getUrlRenderer ( ) . setBaseUrl ( baseURL ) ; respond ( target ) ; requestCycle . getUrlRenderer ( ) . setBaseUrl ( oldBaseURL ) ; } protected abstract void respond ( AjaxRequestTarget target ) { } public static CharSequence throttleScript ( CharSequence script , String throttleId , Duration throttleDelay ) { } }

Fix:
Url baseURL = Url . parse ( request . getHeader ( "Wicket-Ajax-BaseURL" ) , request . getCharset ( ) ) ;
Buggy code:
public class SendMessageCommand extends FolderCommand { private SendMessageDialog sendMessageDialog ; private boolean showComposer = false ; private ComposerController composerController ; public SendMessageCommand ( DefaultCommandReference reference ) { } private void showInvalidRecipientMessage ( String recipient ) { } private boolean validArguments ( ComposerCommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { ComposerCommandReference r = ( ( ComposerCommandReference ) ( getReference ( ) ) ) ; if ( ! ( validArguments ( r ) ) ) return ; worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "send_message_compose" ) ) ; composerController = r . getComposerController ( ) ; if ( ( composerController . getView ( ) . getFrame ( ) ) != null ) { composerController . getView ( ) . getFrame ( ) . setVisible ( false ) ; } sendMessageDialog = new SendMessageDialog ( worker ) ; ComposerModel model = ( ( ComposerModel ) ( composerController . getModel ( ) ) ) ; AccountItem item = model . getAccountItem ( ) ; MessageFolder sentFolder = ( ( MessageFolder ) ( treeModel . getFolder ( item . getSpecialFoldersItem ( ) . getInteger ( "sent" ) ) ) ) ; SendableMessage message = null ; try { message = new org . columba . mail . composer . MessageComposer ( model ) . compose ( worker ) ; } catch ( JSCFException e1 ) { if ( e1 instanceof CancelledException ) { showComposer = true ; return ; } else { JOptionPane . showMessageDialog ( null , e1 . getMessage ( ) ) ; showComposer = true ; return ; } } worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "send_message_connect" ) ) ; SMTPServer server = new SMTPServer ( item ) ; try { server . openConnection ( ) ; } catch ( Exception e2 ) { showComposer = true ; throw e2 ; } try { worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "send_message" ) ) ; server . sendMessage ( message , worker ) ; <START_BUG> composerController . close ( ) ; <END_BUG> Flags flags = new Flags ( ) ; flags . setSeen ( true ) ; message . getHeader ( ) . setFlags ( flags ) ; ComposerCommandReference ref = new ComposerCommandReference ( composerController , sentFolder ) ; ref . setMessage ( message ) ; SaveMessageCommand c = new SaveMessageCommand ( ref ) ; processor . addOp ( c ) ; FolderCommandReference ref2 = model . getSourceReference ( ) ; if ( ref2 != null ) { ref2 . setMarkVariant ( MARK_AS_ANSWERED ) ; MarkMessageCommand c1 = new MarkMessageCommand ( ref2 ) ; processor . addOp ( c1 ) ; } worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "send_message_closing" ) ) ; server . closeConnection ( ) ; worker . setDisplayText ( MailResourceLoader . getString ( "statusbar" , "message" , "send_message_success" ) ) ; } catch ( Exception e ) { showComposer = true ; throw e ; } } public void updateGUI ( ) throws Exception { } }

Fix:
composerController . getContainer ( ) . close ( ) ;
Buggy code:
public class ContextHost { String webcontext = null ; String webhost = null ; int waittime = 10 ; public ContextHost ( ModelNode operation ) throws OperationFailedException { } public static String RemoveQuotes ( String string ) { if ( ( string . endsWith ( "\"" ) ) && ( string . startsWith ( "\"" ) ) ) return string . substring ( 1 , ( ( string . length ( ) ) - 1 ) ) ; <START_BUG> return null ; <END_BUG> } }

Fix:
return string ;