nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TopicClickableSpan extends ClickableSpan { private String mTopic ; private Context mContext ; public TopicClickableSpan ( Context context , String topic ) { } @ Override public void onClick ( View view ) { System . out . println ( mTopic ) ; Intent intent = new Intent ( mContext , ChatterTopicActivity . class ) ; intent . putExtra ( KEY_TOPIC , mTopic ) ; <START_BUG> intent . putExtra ( KEY_TITLE , mTopic ) ; <END_BUG> mContext . startActivity ( intent ) ; ( ( Activity ) ( mContext ) ) . overridePendingTransition ( in_from_right , out_to_left ) ; if ( mContext . getClass ( ) . equals ( ChatterTopicActivity . class ) ) { ( ( Activity ) ( mContext ) ) . finish ( ) ; ( ( Activity ) ( mContext ) ) . overridePendingTransition ( in_from_right , out_to_left ) ; } } @ Override public void updateDrawState ( TextPaint ds ) { } public static void setClickTopic ( Context context , final TextView textView , String content , int max , View . OnClickListener onItemClickListener ) { } static abstract class NormalClickableSpan extends ClickableSpan { @ Override public void updateDrawState ( TextPaint ds ) { } } No newline ; at end ; of file ; }

Fix:
intent . putExtra ( KEY_TITLE , ( ( "#" + ( mTopic ) ) + "#" ) ) ;
Buggy code:
public class ServerController implements NetworkObserver { private boolean runGame ; private boolean cheatMode ; private boolean isPlayerBusy ; private Board board ; private Map < Integer , Character > players ; private ArrayList < CharacterTypes > activeCharacters ; private Server server ; private CheatConfig cc ; private CombatController combatController ; public ServerController ( ) { } private void sendNCInfo ( Ticket ticket ) { } private void setBoardPieces ( int id ) { } private void updateNewPlayer ( int id , Position startingPos ) { } private void addNewPlayerToAllPlayers ( int id , CharacterTypes newCharacter , Position startingPos ) { } private void addPlayer ( Ticket ticket ) { } private void continueTurn ( int id , Character character ) { } private void sendHidingUpdate ( Character character ) { } private void hidePlayer ( Ticket ticket ) { } private void stopHidingPlayer ( Ticket ticket ) { } private void movePlayer ( Ticket ticket ) { } private void combat ( Ticket ticket ) { } private void sendDaylightTicket ( int id , boolean startOfTurn ) { } private void sendPlayerInfoTicket ( int id , Character player ) { } private void endTurn ( ) { } private boolean waitForPlayer ( int playerID ) { } private void run ( ) { } private void waitForPlayers ( ) { } public void handleTicket ( Ticket ticket ) { switch ( ticket . getType ( ) ) { case NEW_CONNECTION : sendNCInfo ( ticket ) ; break ; case NEW_PLAYER : addPlayer ( ticket ) ; break ; case HIDE : hidePlayer ( ticket ) ; break ; case STOP_HIDING : stopHidingPlayer ( ticket ) ; break ; case MOVE : movePlayer ( ticket ) ; break ; case END_TURN : endTurn ( ) ; break ; case PLAYER_INFO : combat ( ticket ) ; break ; default : <START_BUG> System . out . println ( ( "Server<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>recognize<seq2seq4repair_space>the<seq2seq4repair_space>request<seq2seq4repair_space>type<seq2seq4repair_space>for:<seq2seq4repair_space>" + ticket ) ) ; <END_BUG> break ; } } }

Fix:
System . out . println ( ( "Server<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>recognize<seq2seq4repair_space>the<seq2seq4repair_space>request<seq2seq4repair_space>type<seq2seq4repair_space>for:<seq2seq4repair_space>" + ( ticket . getType ( ) ) ) ) ;
Buggy code:
public class ViewFilter implements IView { private static final int SCALE_MAX_VALUE = 1000 ; private static final int SCALE_UPDATE_INTERVAL = 100 ; private Composite root ; private ComponentFilterTable generalization ; private Button anonymous ; private Button nonanonymous ; private Button unknown ; private RangeSlider slider ; private Controller controller ; private ModelNodeFilter filter = null ; private Model model = null ; private ARXResult result = null ; private boolean mouseDown = false ; private volatile Boolean fireEvent = false ; public ViewFilter ( final Composite parent , final Controller controller ) { } @ Override public void dispose ( ) { } @ Override public void reset ( ) { } @ Override public void update ( final ModelEvent event ) { } private void actionAnonymousChanged ( ) { } private void actionInfoLossChanged ( ) { } private void actionNonAnonymousChanged ( ) { } private void actionReset ( ) { if ( ( filter ) != null ) { DataDefinition definition = model . getOutputDefinition ( ) ; if ( definition == null ) { reset ( ) ; return ; } List < String > attributes = new ArrayList < String > ( ) ; <START_BUG> attributes . addAll ( definition . getQuasiIdentifyingAttributes ( ) ) ; <END_BUG> Collections . sort ( attributes , new Comparator < String > ( ) { public int compare ( String arg0 , String arg1 ) { return ( model . getOutput ( ) . getColumnIndexOf ( arg0 ) ) - ( model . getOutput ( ) . getColumnIndexOf ( arg1 ) ) ; } } ) ; int dimension = 0 ; for ( String attribute : attributes ) { int attributeMin = definition . getMinimumGeneralization ( attribute ) ; int attributeMax = definition . getMaximumGeneralization ( attribute ) ; for ( int i = attributeMin ; i <= attributeMax ; i ++ ) { filter . allowGeneralization ( dimension , i ) ; } dimension ++ ; } filter . allowAllInformationLoss ( ) ; filter . allowAnonymous ( ) ; filter . allowNonAnonymous ( ) ; filter . allowUnknown ( ) ; update ( ) ; fireModelEvent ( ) ; } } private void actionShowOptimum ( ) { } private void actionUnknownChanged ( ) { } private void actionUpdateSlider ( ) { } private void create ( final Composite parent ) { } private void fireModelEvent ( ) { } private void initialize ( final ARXResult result , final ModelNodeFilter nodeFilter ) { } private void update ( ) { } }

Fix:
attributes . addAll ( definition . getQuasiIdentifiersWithGeneralization ( ) ) ;
Buggy code:
public class CrisisOfFaith extends Status { public CrisisOfFaith ( Character affected ) { } @ Override public String initialMessage ( Combat c , boolean replaced ) { } @ Override public boolean lingering ( ) { } @ Override public String describe ( Combat c ) { } @ Override public int mod ( Attribute a ) { } @ Override public int regen ( Combat c ) { } @ Override public int damage ( Combat c , int x ) { } @ Override public double pleasure ( Combat c , BodyPart withPart , BodyPart targetPart , double x ) { } @ Override public int weakened ( int x ) { } @ Override public int tempted ( int x ) { } @ Override public int evade ( ) { } @ Override public int escape ( ) { } @ Override public int gainmojo ( int x ) { <START_BUG> return ( ( int ) ( ( ( double ) ( x ) ) // ( Global . getPlayer ( ) . getAddiction ( ZEAL ) . getMagnitude ( ) ) ) ) ; <END_BUG> } @ Override public int spendmojo ( int x ) { } @ Override public int counter ( ) { } @ Override public int value ( ) { } @ Override public Status instance ( Character newAffected , Character newOther ) { } @ SuppressWarnings ( "unchecked" ) @ Override public JSONObject saveToJSON ( ) { } @ Override public Status loadFromJSON ( JSONObject obj ) { } }

Fix:
return ( ( int ) ( x * ( 1.0F - ( Global . getPlayer ( ) . getAddiction ( ZEAL ) . getMagnitude ( ) ) ) ) ) ;
Buggy code:
public class DatabasePanel extends JPanel { private static final long serialVersionUID = 1L ; private DatabasePanel . GraphicsPanel graphicsPanel ; private JLabel lblClassification ; private JLabel lblDatacounter ; private JSpinner spnIndex ; private PERSTDatabase db_ ; private int numOfDatabaseElements_ ; public DatabasePanel ( ) { } private void updateClassificationLabel ( int value ) { } private void updateDatabaseState ( ) { <START_BUG> numOfDatabaseElements_ = db_ . getNumberOfDatabaseElements_ ( ) ; <END_BUG> lblDatacounter . setText ( String . valueOf ( numOfDatabaseElements_ ) ) ; if ( ( numOfDatabaseElements_ ) > 0 ) { spnIndex . setModel ( new SpinnerNumberModel ( 1 , 1 , numOfDatabaseElements_ , 1 ) ) ; spnIndex . setEnabled ( true ) ; updateClassificationLabel ( 1 ) ; } } class GraphicsPanel extends JPanel { private static final long serialVersionUID = 1L ; private int index_ ; public GraphicsPanel ( ) { } public void update ( int index ) { } private void paintNumber ( Graphics g ) { } @ Override public void paintComponent ( Graphics g ) { } } }

Fix:
numOfDatabaseElements_ = db_ . getNumberOfDatabaseElements ( ) ;
Buggy code:
public class ReplyAction extends FrameAction implements SelectionListener { public ReplyAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new org . columba . mail . gui . composer . command . ReplyCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class ChildrenNode extends PathOperator { private HashSet < String > children ; public ChildrenNode ( HashSet < String > children ) { } @ Override public boolean match ( PathOperator pathOperator ) { <START_BUG> return ( super . match ( pathOperator ) ) && ( children . contains ( ( ( ChildNode ) ( pathOperator ) ) . getKey ( ) ) ) ; <END_BUG> } @ Override public String toString ( ) { } }

Fix:
return ( ( super . match ( pathOperator ) ) && ( pathOperator instanceof ChildNode ) ) && ( children . contains ( ( ( ChildNode ) ( pathOperator ) ) . getKey ( ) ) ) ;
Buggy code:
public class TestPlainTextDictionary extends LuceneTestCase { public void testBuild ( ) throws IOException { final String LF = System . getProperty ( "line.separator" ) ; String input = ( ( ( "oneword" + LF ) + "twoword" ) + LF ) + "threeword" ; PlainTextDictionary ptd = new PlainTextDictionary ( new StringReader ( input ) ) ; Directory ramDir = newDirectory ( ) ; SpellChecker spellChecker = new SpellChecker ( ramDir ) ; spellChecker . indexDictionary ( ptd ) ; String [ ] similar = spellChecker . suggestSimilar ( "treeword" , 2 ) ; assertEquals ( 2 , similar . length ) ; assertEquals ( similar [ 0 ] , "threeword" ) ; <START_BUG> assertEquals ( similar [ 1 ] , "twoword" ) ; <END_BUG> spellChecker . close ( ) ; ramDir . close ( ) ; } }

Fix:
assertEquals ( similar [ 1 ] , "oneword" ) ;
Buggy code:
public class ConsoleUI implements UI { private boolean isRunning ; public ConsoleUI ( ) { } @ Override public void showMainScreen ( ) { } @ Override public boolean isRunning ( ) { } @ Override public Command getCommand ( ) { } @ Override public void showHelp ( ) { } @ Override public void stopRunning ( ) { } @ Override public void commandNotFound ( String c ) { } @ Override public void startScanMode ( ) { } @ Override public void scannedItem ( UPCEntry upc ) { } public void scanModePrompt ( ) { } @ Override public long [ ] getExportTime ( ) { long [ ] out = new long [ 2 ] ; DateFormat df = new SimpleDateFormat ( "MM-dd-yyyy" ) ; Scanner scanner = new Scanner ( System . in ) ; while ( ( out [ 0 ] ) == 0 ) { System . out . print ( "Enter<seq2seq4repair_space>start<seq2seq4repair_space>date<seq2seq4repair_space>(MM-DD-YYYY)>" ) ; String start = scanner . next ( ) ; try { out [ 0 ] = ( df . parse ( start ) . getTime ( ) ) // 1000 ; } catch ( ParseException e ) { System . out . println ( "Invalid<seq2seq4repair_space>date<seq2seq4repair_space>format" ) ; } } while ( ( out [ 1 ] ) == 0 ) { System . out . print ( "Enter<seq2seq4repair_space>end<seq2seq4repair_space>date<seq2seq4repair_space>or<seq2seq4repair_space>'now'<seq2seq4repair_space>(MM-DD-YYYY))>" ) ; String end = scanner . next ( ) ; if ( end . equals ( "now" ) ) { out [ 1 ] = ( new Date ( ) . getTime ( ) ) // 1000 ; } else { try { <START_BUG> out [ 0 ] = ( df . parse ( end ) . getTime ( ) ) // 1000 ; <END_BUG> } catch ( ParseException e ) { System . out . println ( "Invalid<seq2seq4repair_space>date<seq2seq4repair_space>format" ) ; } } } return out ; } @ Override public UPCEntry promptUnknonwnUPCEntry ( String upc ) { } }

Fix:
out [ 1 ] = ( df . parse ( end ) . getTime ( ) ) // 1000 ;
Buggy code:
public class Commandline implements Cloneable { private Vector arguments = new Vector ( ) ; private String executable = null ; protected static final String DISCLAIMER = ( ( ( ( StringUtils . LINE_SEP ) + "The<seq2seq4repair_space>\'<seq2seq4repair_space>characters<seq2seq4repair_space>around<seq2seq4repair_space>the<seq2seq4repair_space>executable<seq2seq4repair_space>and<seq2seq4repair_space>arguments<seq2seq4repair_space>are" ) + ( StringUtils . LINE_SEP ) ) + "not<seq2seq4repair_space>part<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>command." ) + ( StringUtils . LINE_SEP ) ; public Commandline ( String toProcess ) { } public Commandline ( ) { } public static class Argument extends ProjectComponent { private String [ ] parts ; public void setValue ( String value ) { } public void setLine ( String line ) { } public void setPath ( Path value ) { } public void setPathref ( Reference value ) { } public void setFile ( File value ) { } public String [ ] getParts ( ) { } } public class Marker { private int position ; private int realPos = - 1 ; Marker ( int position ) { } public int getPosition ( ) { } } public Commandline . Argument createArgument ( ) { } public Commandline . Argument createArgument ( boolean insertAtStart ) { } public void setExecutable ( String executable ) { } public String getExecutable ( ) { } public void addArguments ( String [ ] line ) { } public String [ ] getCommandline ( ) { } public void addCommandToList ( ListIterator list ) { } public String [ ] getArguments ( ) { } public void addArgumentsToList ( ListIterator list ) { } public String toString ( ) { } public static String quoteArgument ( String argument ) { } public static String toString ( String [ ] line ) { } public static String [ ] translateCommandline ( String toProcess ) { } public int size ( ) { } public Object clone ( ) { } public void clear ( ) { } public void clearArgs ( ) { } public Commandline . Marker createMarker ( ) { } public String describeCommand ( ) { } public String describeArguments ( ) { } public static String describeCommand ( Commandline line ) { } public static String describeArguments ( Commandline line ) { } public static String describeCommand ( String [ ] args ) { if ( ( args == null ) || ( ( args . length ) == 0 ) ) { return "" ; } StringBuffer buf = new StringBuffer ( "Executing<seq2seq4repair_space>\'" ) ; buf . append ( args [ 0 ] ) ; buf . append ( "\'" ) ; <START_BUG> if ( ( args . length ) > 0 ) { <END_BUG> buf . append ( "<seq2seq4repair_space>with<seq2seq4repair_space>" ) ; buf . append ( Commandline . describeArguments ( args , 1 ) ) ; } else { buf . append ( Commandline . DISCLAIMER ) ; } return buf . toString ( ) ; } public static String describeArguments ( String [ ] args ) { } protected static String describeArguments ( String [ ] args , int offset ) { } public Iterator iterator ( ) { } }

Fix:
if ( ( args . length ) > 1 ) {
Buggy code:
@ RunWith ( Arquillian . class ) public class DeployedXmlJpaDataSourceTestCase { public static final String TEST_DS_XML = "test-ds.xml" ; public static final String JPA_DEPLOYMENT_NAME = "jpaDeployment" ; @ Deployment ( name = DeployedXmlJpaDataSourceTestCase . JPA_DEPLOYMENT_NAME ) public static Archive < ? > deployJpa ( ) { <START_BUG> return ShrinkWrap . create ( JavaArchive . class , ( ( DeployedXmlJpaDataSourceTestCase . JPA_DEPLOYMENT_NAME ) + ".jar" ) ) . addClasses ( Employee . class , JpaRemoteBean . class , JpaRemote . class , DeployedXmlJpaDataSourceTestCase . class ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "persistence.xml" , "persistence.xml" ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "test-ds.xml" , "test-ds.xml" ) ; <END_BUG> } @ ArquillianResource private InitialContext initialContext ; @ Test public void testJpaUsedWithXMLXaDataSource ( ) throws Throwable { } }

Fix:
return ShrinkWrap . create ( JavaArchive . class , ( ( DeployedXmlJpaDataSourceTestCase . JPA_DEPLOYMENT_NAME ) + ".jar" ) ) . addClasses ( Employee . class , JpaRemoteBean . class , JpaRemote . class , DeployedXmlJpaDataSourceTestCase . class ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "persistence.xml" , "persistence.xml" ) . addAsManifestResource ( DeployedXmlJpaDataSourceTestCase . class . getPackage ( ) , "jpa-ds.xml" , "jpa-ds.xml" ) ;
Buggy code:
public class ItemView extends LinearLayout implements OnCheckedChangeListener { public static final int MAX_EXAMPLES_IN_VIEW = 50 ; private final WordController mWordCtrl ; private String mTitle ; private int mLesson ; private final CheckBox chkBox ; private final ItemStatus mStatus ; private final Dictionary mDictionary ; private TestAnyChecked mTestAnyChecked ; public ItemView ( Dictionary context , WordController wordCtrl ) { } public void setup ( int position , TestAnyChecked tac ) { } private String getFirstWord ( final String string ) { } public int getLesson ( ) { } @ Override public void onCheckedChanged ( final CompoundButton buttonView , boolean isChecked ) { if ( ! isChecked ) { <START_BUG> if ( ( ( ( mTestAnyChecked ) == null ) || ( mTestAnyChecked . testAnyChecked ( this ) ) ) && ( mWordCtrl . isEnableLesson ( mLesson ) ) ) { <END_BUG> AlertDialog . Builder builder = new AlertDialog . Builder ( getContext ( ) ) ; builder . setMessage ( msg_your_are_sure_disable_lesson ) . setCancelable ( false ) . setTitle ( mTitle ) . setPositiveButton ( yes , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { setVocabulary ( false ) ; } } ) . setNegativeButton ( no , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { dialog . cancel ( ) ; buttonView . setChecked ( true ) ; } } ) ; AlertDialog alert = builder . create ( ) ; alert . show ( ) ; } } else if ( ! ( mWordCtrl . isEnableLesson ( mLesson ) ) ) setVocabulary ( true ) ; } protected void setVocabulary ( boolean enable ) { } public boolean isChecked ( ) { } public void setChecked ( boolean checked ) { } }

Fix:
if ( ( mWordCtrl . isEnableLesson ( mLesson ) ) && ( ( ( mTestAnyChecked ) == null ) || ( mTestAnyChecked . testAnyChecked ( this ) ) ) ) {
Buggy code:
public final class TagElement extends ASTNode implements IDocElement { public static final SimplePropertyDescriptor TAG_NAME_PROPERTY = new SimplePropertyDescriptor ( TagElement . class , "tagName" , String . class , ASTNode . OPTIONAL ) ; public static final ChildListPropertyDescriptor FRAGMENTS_PROPERTY = new ChildListPropertyDescriptor ( TagElement . class , "fragments" , IDocElement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } public static final String TAG_AUTHOR = "@author" ; public static final String TAG_CODE = "@code" ; public static final String TAG_DEPRECATED = "@deprecated" ; public static final String TAG_DOCROOT = "@docRoot" ; public static final String TAG_EXCEPTION = "@exception" ; public static final String TAG_INHERITDOC = "@inheritDoc" ; public static final String TAG_LINK = "@link" ; public static final String TAG_LINKPLAIN = "@linkplain" ; public static final String TAG_LITERAL = "@literal" ; public static final String TAG_PARAM = "@param" ; public static final String TAG_RETURN = "@return" ; public static final String TAG_SEE = "@see" ; public static final String TAG_SERIAL = "@serial" ; public static final String TAG_SERIALDATA = "@serialData" ; public static final String TAG_SERIALFIELD = "@serialField" ; public static final String TAG_SINCE = "@since" ; public static final String TAG_THROWS = "@throws" ; public static final String TAG_VALUE = "@value" ; public static final String TAG_VERSION = "@version" ; private String optionalTagName = null ; private ASTNode . NodeList fragments = new ASTNode . NodeList ( TagElement . FRAGMENTS_PROPERTY ) ; TagElement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { TagElement result = new TagElement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setTagName ( getTagName ( ) ) ; result . fragments ( ) . addAll ( ASTNode . copySubtrees ( target , fragments ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getTagName ( ) { } public void setTagName ( String tagName ) { } public List fragments ( ) { } public boolean isNested ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public interface SessionManagerMBean { ReplicationStatistics getReplicationStatistics ( ) { } void resetStats ( ) { } long getTimeSinceLastReset ( ) { } long getActiveSessionCount ( ) { } long getLocalActiveSessionCount ( ) { } long getRejectedSessionCount ( ) { } long getCreatedSessionCount ( ) { } long getExpiredSessionCount ( ) { } long getMaxActiveSessionCount ( ) { } long getMaxLocalActiveSessionCount ( ) { } int getMaxActiveAllowed ( ) { } void setMaxActiveAllowed ( int max ) { } int getMaxInactiveInterval ( ) { } <START_BUG> void setMaxInactiveInterval ( int minutes ) ; <END_BUG> boolean getDistributable ( ) { } void setDistributable ( boolean distributable ) { } long getProcessingTime ( ) { } void setProcessingTime ( long processingTime ) { } int getSessionIdLength ( ) { } String getClassName ( ) { } int getMaxActiveSessions ( ) { } int getProcessExpiresFrequency ( ) { } void setProcessExpiresFrequency ( int frequency ) { } String getName ( ) { } int getActiveSessions ( ) { } int getSessionCounter ( ) { } void setSessionCounter ( int sessionCounter ) { } int getMaxActive ( ) { } void setMaxActive ( int maxActive ) { } int getSessionMaxAliveTime ( ) { } void setSessionMaxAliveTime ( int sessionAliveTime ) { } int getSessionAverageAliveTime ( ) { } int getExpiredSessions ( ) { } int getRejectedSessions ( ) { } }

Fix:
void setMaxInactiveInterval ( int seconds ) ;
Buggy code:
public class InterceptTest extends TestCase { private WicketTester application ; public InterceptTest ( String arg0 ) { } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testClickLink ( ) { } public void testClickLink2 ( ) { } private static class MyMockWebApplication extends WebApplication implements ISessionFactory { private static final long serialVersionUID = 1L ; public Class getHomePage ( ) { } protected void init ( ) { } public Class getLoginPage ( ) { } <START_BUG> public Session newSession ( Request request , Response response ) { <END_BUG> return new InterceptTest . MySession ( this , request ) ; } } public static class MySession extends WebSession { private static final long serialVersionUID = 1L ; private String username ; protected MySession ( WebApplication application , Request request ) { } protected final String getUsername ( ) { } protected final void setUsername ( String username ) { } public boolean isLoggedIn ( ) { } } private static class MyAuthorizationStrategy implements IAuthorizationStrategy { public boolean isInstantiationAuthorized ( Class componentClass ) { } public boolean isActionAuthorized ( Component component , Action action ) { } } }

Fix:
public Session newSession ( Request request , Response resposne ) {
Buggy code:
public class LobbyListController implements Initializable { @ FXML public TableView lobbyTable ; @ FXML public TableColumn columnGameName ; @ FXML public TableColumn columnPlayers ; @ FXML public TableColumn columnHostRank ; @ FXML public TextField newLobbyName ; @ FXML public TextField chatMessage ; @ FXML public ListView chatBox ; private LobbyManager controller ; private Human currentPlayer ; @ Override public void initialize ( URL url , ResourceBundle rb ) { <START_BUG> controller = new LobbyManager ( chatBox ) ; <END_BUG> columnGameName . setCellValueFactory ( new PropertyValueFactory ( "name" ) ) ; columnPlayers . setCellValueFactory ( new PropertyValueFactory ( "playerAmount" ) ) ; columnHostRank . setCellValueFactory ( new PropertyValueFactory ( "ranking" ) ) ; lobbyTable . setItems ( controller . getLobbies ( ) ) ; } public void initData ( Human currentPlayer ) { } public void backButton ( ActionEvent evt ) { } public void createLobby ( Event evt ) { } public void joinLobby ( Event evt ) { } public void spectLobby ( Event evt ) { } public void sendChat ( ActionEvent event ) { } public void buttonLeaderboard ( ActionEvent event ) { } }

Fix:
controller = new LobbyManager ( chatBox , currentPlayer ) ;
Buggy code:
public class modemanager { private WifiManager wifiManager ; private BluetoothAdapter bluetoothAdapter ; private AudioManager audioManager ; private Context context ; public modemanager ( Context context ) { } public void setAll ( int bright , int timeout , boolean data , boolean wifi , boolean bluetooth , boolean silence , boolean vibrate ) { } public int getBrightness ( ) throws SettingNotFoundException { } public void setBrightness ( int brightness ) { } public void setBrightnessAuto ( ) { } public int getTimeout ( ) throws SettingNotFoundException { } public void setTimeout ( int time ) { <START_BUG> System . putInt ( context . getContentResolver ( ) , SCREEN_OFF_TIMEOUT , ( time * 1000 ) ) ; <END_BUG> return ; } public boolean isDataEnabled ( ) { } public void setData ( boolean judge ) { } public boolean isWifiEnabled ( ) { } public void setWifi ( boolean judge ) { } public boolean isBluetoothEnabled ( ) { } public void setBluetooth ( boolean judge ) { } public boolean isSilence ( ) { } public void setSilence ( ) { } public boolean isVibrate ( ) { } public void setVibrate ( ) { } }

Fix:
System . putInt ( context . getContentResolver ( ) , SCREEN_OFF_TIMEOUT , time ) ;
Buggy code:
public class ExecuteOnTest extends BuildFileTest { private static final String BUILD_PATH = "src//etc//testcases//taskdefs//exec//" ; private static final String BUILD_FILE = ( ExecuteOnTest . BUILD_PATH ) + "apply.xml" ; public ExecuteOnTest ( String name ) { } public void setUp ( ) { } public void tearDown ( ) { } public void testNoRedirect ( ) { } public void testRedirect1 ( ) throws IOException { } public void testRedirect2 ( ) throws IOException { } public void testRedirect3 ( ) throws IOException { } public void testRedirect4 ( ) throws IOException { } public void testRedirect5 ( ) throws IOException { } public void testRedirect6 ( ) throws IOException { } private void testRedirect5or6 ( String target ) throws IOException { } public void testRedirect7 ( ) throws IOException { } public void testRedirector1 ( ) { } public void testRedirector2 ( ) throws IOException { } public void testRedirector3 ( ) throws IOException { } public void testRedirector4 ( ) throws IOException { } public void testRedirector5 ( ) throws IOException { } public void testRedirector6 ( ) throws IOException { } private void testRedirector5or6 ( String target ) throws IOException { } public void testRedirector7 ( ) throws IOException { } public void testRedirector8 ( ) throws IOException { } public void testRedirector9 ( ) throws IOException { } public void testRedirector10 ( ) throws IOException { } public void testRedirector11 ( ) throws IOException { } public void testRedirector12 ( ) throws IOException { } private void testRedirector9Thru12 ( String target ) throws IOException { } public void testRedirector13 ( ) { } public void testRedirector14 ( ) throws IOException { } public void testIgnoreMissing ( ) { } public void testForce ( ) { } private String getFileString ( String filename ) throws IOException { String result = null ; FileReader reader = null ; try { reader = new FileReader ( getProject ( ) . resolveFile ( filename ) ) ; <START_BUG> result = FileUtils . newFileUtils ( ) . readFully ( reader ) ; <END_BUG> } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( Throwable ignore ) { } } } return result ; } }

Fix:
result = FileUtils . readFully ( reader ) ;
Buggy code:
public final class MBeanServerConnectionProvider { private static final Logger log = Logger . getLogger ( MBeanServerConnectionProvider . class ) ; private final InetAddress hostAddr ; private final int port ; private JMXConnector jmxConnector ; public static MBeanServerConnectionProvider defaultProvider ( ) throws UnknownHostException { } public MBeanServerConnectionProvider ( InetAddress hostAddr , int port ) { } public MBeanServerConnection getConnection ( ) { String host = hostAddr . getHostAddress ( ) ; <START_BUG> String urlString = System . getProperty ( "jmx.service.url" , ( ( ( ( "service:jmx:rmi://////jndi//rmi:////" + ( ProtocolUtils . formatPossibleIpv6Address ( host ) ) ) + ":" ) + ( port ) ) + "//jmxrmi" ) ) ; <END_BUG> try { if ( ( jmxConnector ) == null ) { MBeanServerConnectionProvider . log . debug ( ( "Connecting<seq2seq4repair_space>JMXConnector<seq2seq4repair_space>to:<seq2seq4repair_space>" + urlString ) ) ; JMXServiceURL serviceURL = new JMXServiceURL ( urlString ) ; jmxConnector = JMXConnectorFactory . connect ( serviceURL , null ) ; } return jmxConnector . getMBeanServerConnection ( ) ; } catch ( IOException ex ) { throw new IllegalStateException ( ( "Cannot<seq2seq4repair_space>obtain<seq2seq4repair_space>MBeanServerConnection<seq2seq4repair_space>to:<seq2seq4repair_space>" + urlString ) , ex ) ; } } public MBeanServerConnection getConnection ( long timeout ) { } }

Fix:
String urlString = System . getProperty ( "jmx.service.url" , ( ( ( ( "service:jmx:rmi://////jndi//rmi:////" + ( NetworkUtils . formatPossibleIpv6Address ( host ) ) ) + ":" ) + ( port ) ) + "//jmxrmi" ) ) ;
Buggy code:
public class TingleFragment extends Fragment { private static final String ARG_THING_ID = "thing_id" ; private Button mAddButton ; private Button mListButton ; private Button mSearchButton ; private TextView mLastAdded ; private TextView mWhatField ; private TextView mWhereField ; private static ThingRepository sThingRepository ; private TingleFragment . eventListener mCallBackToActivity ; public interface eventListener { void onShowItems ( ) { } void onAddItems ( ) { } } @ Override public void onAttach ( Context context ) { } public static TingleFragment newInstance ( UUID thingId ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public String searchItems ( String item ) { } private void setTextFields ( View view ) { } private void setButtons ( View view ) { } private void updateUI ( ) { int size = TingleFragment . sThingRepository . size ( ) ; if ( size > 0 ) { <START_BUG> mLastAdded . setText ( TingleFragment . sThingRepository . getThing ( ( size - 1 ) ) . toString ( ) ) ; <END_BUG> } else this . mLastAdded . setText ( getString ( item_notfound_toast ) ) ; } private void makeToast ( String string ) { } }

Fix:
mLastAdded . setText ( TingleFragment . sThingRepository . getThings ( ) . get ( ( size - 1 ) ) . toString ( ) ) ;
Buggy code:
@ LogMessageInfo ( message = "Error<seq2seq4repair_space>in<seq2seq4repair_space>deleting<seq2seq4repair_space>file<seq2seq4repair_space>{0}" , level = "WARNING" ) private static final String FILE_DELETION_ERROR = "AS-DEPLOYMENT-04017" ; public interface DFCommandRunner { DFDeploymentStatus run ( ) throws CommandException { } } protected abstract AbstractDeploymentFacility . DFCommandRunner getDFCommandRunner ( String commandName , Map < String , Object > commandOptions , String [ ] operands ) throws CommandException { } protected DFProgressObject changeState ( Target [ ] targets , String moduleID , String commandName , String action ) { } protected abstract boolean doConnect ( ) { } public boolean connect ( ServerConnectionIdentifier targetDAS ) { } protected abstract boolean doDisconnect ( ) { } public boolean disconnect ( ) { } public DFProgressObject createAppRef ( Target [ ] targets , String moduleID , Map options ) { } public DFProgressObject deleteAppRef ( Target [ ] targets , String moduleID , Map options ) { } protected DFProgressObject changeAppRef ( Target [ ] targets , String moduleID , String commandName , String action , Map options ) { } public Target createTarget ( String name ) { } public Target [ ] createTargets ( String [ ] targets ) { } protected String createTargetsParam ( Target [ ] targets ) { } public DFProgressObject deploy ( Target [ ] targets , ReadableArchive source , ReadableArchive deploymentPlan , Map deploymentOptions ) throws IOException { } private File writeMemoryMappedArchiveToTempFile ( MemoryMappedArchive mma , String fileSuffix ) throws IOException { } public DFProgressObject deploy ( Target [ ] targets , URI source , URI deploymentPlan , Map deploymentOptions ) { ensureConnected ( ) ; targets = prepareTargets ( targets ) ; ProgressObjectImpl po = new ProgressObjectImpl ( targets ) ; <START_BUG> if ( ( deploymentOptions . get ( DEFAULT_REDEPLOY ) ) == "true" ) <END_BUG>

Fix:
if ( deploymentOptions . get ( DEFAULT_REDEPLOY ) . equals ( "true" ) )
Buggy code:
public class CmpKeyGeneratorSubsystem11TestCase extends CmpKeyGeneratorSubsystem10TestCase { private static final PathAddress SUBSYSTEM_PATH = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) ) ; @ Override protected String getSubsystemXml ( ) throws IOException { } @ Override protected KernelServices standardSubsystemTest ( String configId , boolean compareXml ) throws Exception { } @ Test public void testParseSubsystem ( ) throws Exception { } private void assertOperation ( final ModelNode operation , final String operationName , final PathElement lastElement ) { } @ Test public void testTransformers_7_1_2 ( ) throws Exception { } @ Test public void testTransformers_7_1_3 ( ) throws Exception { } private void testTransformers_1_0_0 ( ModelTestControllerVersion controllerVersion ) throws Exception { ModelVersion modelVersion = ModelVersion . create ( 1 , 0 , 0 ) ; KernelServicesBuilder builder = createKernelServicesBuilder ( createAdditionalInitialization ( ) ) ; <START_BUG> builder . createLegacyKernelServicesBuilder ( createAdditionalInitialization ( ) , controllerVersion , modelVersion ) . addMavenResourceURL ( ( "org.jboss.as:jboss-as-cmp:" + ( controllerVersion . getMavenGavVersion ( ) ) ) ) . configureReverseControllerCheck ( createAdditionalInitialization ( ) , null ) ; <END_BUG> KernelServices mainServices = builder . build ( ) ; Assert . assertTrue ( mainServices . isSuccessfulBoot ( ) ) ; Assert . assertTrue ( mainServices . getLegacyServices ( modelVersion ) . isSuccessfulBoot ( ) ) ; ModelTestUtils . checkFailedTransformedBootOperations ( mainServices , modelVersion , parse ( getSubsystemXml ( ) ) , new FailedOperationTransformationConfig ( ) . addFailedAttribute ( CmpKeyGeneratorSubsystem11TestCase . SUBSYSTEM_PATH . append ( UUID_KEY_GENERATOR_PATH ) , new FailedOperationTransformationConfig . NewAttributesConfig ( CMPSubsystemRootResourceDefinition . JNDI_NAME ) ) . addFailedAttribute ( CmpKeyGeneratorSubsystem11TestCase . SUBSYSTEM_PATH . append ( HILO_KEY_GENERATOR_PATH ) , new FailedOperationTransformationConfig . NewAttributesConfig ( CMPSubsystemRootResourceDefinition . JNDI_NAME ) ) ) ; } }

Fix:
builder . createLegacyKernelServicesBuilder ( null , controllerVersion , modelVersion ) . addMavenResourceURL ( ( "org.jboss.as:jboss-as-cmp:" + ( controllerVersion . getMavenGavVersion ( ) ) ) ) . configureReverseControllerCheck ( createAdditionalInitialization ( ) , null ) ;
Buggy code:
public abstract class AbstractAutoCompleteBehavior extends AbstractDefaultAjaxBehavior { private static final PackageResourceReference AUTOCOMPLETE_JS = new PackageResourceReference ( AutoCompleteBehavior . class , "wicket-autocomplete.js" ) ; private static final long serialVersionUID = 1L ; @ Override protected void onRenderHeadInitContribution ( Response response ) { } @ Override protected void onComponentRendered ( ) { Response response = getComponent ( ) . getResponse ( ) ; final String id = getComponent ( ) . getMarkupId ( ) ; response . write ( SCRIPT_OPEN_TAG ) ; <START_BUG> response . write ( ( ( ( ( "new<seq2seq4repair_space>WicketAutoComplete('" + id ) + "','" ) + ( getCallbackUrl ( ) ) ) + "');" ) ) ; <END_BUG> response . write ( SCRIPT_CLOSE_TAG ) ; } @ Override protected void respond ( AjaxRequestTarget target ) { } protected abstract void onRequest ( String input , RequestCycle requestCycle ) { } }

Fix:
response . write ( ( ( ( ( "new<seq2seq4repair_space>Wicket.Ajax.AutoComplete('" + id ) + "','" ) + ( getCallbackUrl ( ) ) ) + "');" ) ) ;
Buggy code:
public class MathTag { public static final Pattern FORMULA_PATTERN = Pattern . compile ( "FORMULA_[0-9a-f+]" ) ; private static final HashFunction HASHER = Hashing . md5 ( ) ; private final int position ; private final String content ; private final MathMarkUpType markUpType ; private Multiset < String > indentifiers = null ; public MathTag ( int position , String content , MathMarkUpType markUp ) { } public int getPosition ( ) { } public String getContent ( ) { } public String getTagContent ( ) { } public String getContentHash ( ) { } public String placeholder ( ) { } public MathMarkUpType getMarkUpType ( ) { } @ Deprecated public Multiset < String > getIdentifier ( boolean useTeX , boolean useBlacklist ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public Multiset < String > getIdentifiers ( BaseConfig config ) { <START_BUG> if ( ( indentifiers ) == null ) { <END_BUG> indentifiers = extractIdentifiers ( this , config . getUseTeXIdentifiers ( ) , config . getTexvcinfoUrl ( ) ) ; } return indentifiers ; } public String getKey ( ) { } }

Fix:
if ( ( ( indentifiers ) == null ) || ( ( indentifiers . size ( ) ) == 0 ) ) {
Buggy code:
public abstract class ClearCase extends Task { private static final String CLEARTOOL_EXE = "cleartool" ; public static final String COMMAND_UPDATE = "update" ; public static final String COMMAND_CHECKOUT = "checkout" ; public static final String COMMAND_CHECKIN = "checkin" ; public static final String COMMAND_UNCHECKOUT = "uncheckout" ; private String m_ClearToolDir = "" ; private String m_viewPath = null ; public final void setClearToolDir ( final File dir ) { } public final void setViewPath ( String viewPath ) { } public String getViewPath ( ) { } protected final String getClearToolCommand ( ) { } protected int run ( Commandline cmd ) throws TaskException { try { final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; exe . setWorkingDirectory ( getBaseDirectory ( ) ) ; <START_BUG> exe . setCommandline ( cmd . getCommandline ( ) ) ; <END_BUG> return exe . execute ( ) ; } catch ( IOException e ) { throw new TaskException ( "Error" , e ) ; } } }

Fix:
exe . setCommandline ( cmd ) ;
Buggy code:
class StormServerHandler extends SimpleChannelUpstreamHandler { private static final Logger LOG = LoggerFactory . getLogger ( StormServerHandler . class ) ; Server server ; private AtomicInteger failure_count ; StormServerHandler ( Server server ) { } @ Override public void channelConnected ( ChannelHandlerContext ctx , ChannelStateEvent e ) { } @ Override public void messageReceived ( ChannelHandlerContext ctx , MessageEvent e ) { List < TaskMessage > msgs = ( ( List < TaskMessage > ) ( e . getMessage ( ) ) ) ; if ( msgs == null ) { return ; } try { <START_BUG> server . enqueue ( msgs ) ; <END_BUG> } catch ( InterruptedException e1 ) { StormServerHandler . LOG . info ( "failed<seq2seq4repair_space>to<seq2seq4repair_space>enqueue<seq2seq4repair_space>a<seq2seq4repair_space>request<seq2seq4repair_space>message" , e ) ; failure_count . incrementAndGet ( ) ; } } @ Override public void exceptionCaught ( ChannelHandlerContext ctx , ExceptionEvent e ) { } }

Fix:
server . enqueue ( msgs , e . getRemoteAddress ( ) . toString ( ) ) ;
Buggy code:
public class JSCompile { public static void main ( String [ ] args ) throws IOException { String projectPath = args [ 0 ] ; String outputPath = args [ 1 ] ; String projectName = null ; if ( ( args . length ) > 2 ) { projectName = args [ 2 ] ; } else { <START_BUG> String [ ] projectPathParts = projectPath . split ( "[\\//]" ) ; <END_BUG> if ( ( projectPathParts . length ) > 0 ) { projectName = projectPathParts [ ( ( projectPathParts . length ) - 1 ) ] ; } } File rootDir = new File ( projectPath ) ; if ( rootDir . isDirectory ( ) ) { ProjectProcessor processor = new ProjectProcessor ( rootDir ) ; String compiledJS = processor . getCompiledProject ( projectName ) ; FileWriter writer = new FileWriter ( outputPath ) ; writer . write ( compiledJS ) ; writer . close ( ) ; } } }

Fix:
String [ ] projectPathParts = projectPath . split ( File . separator ) ;
Buggy code:
public class SpringBeanLocator implements IProxyTargetLocator { private transient WeakReference beanTypeCache ; private String beanTypeName ; private String beanName ; private ISpringContextLocator springContextLocator ; private Boolean singletonCache = null ; public SpringBeanLocator ( Class beanType , ISpringContextLocator locator ) { } public SpringBeanLocator ( String beanName , Class beanType , ISpringContextLocator locator ) { } private final String getBeanNameOfClass ( ApplicationContext ctx , Class clazz ) { String [ ] names = BeanFactoryUtils . beanNamesForTypeIncludingAncestors ( ctx , clazz ) ; if ( ( names . length ) == 0 ) { throw new IllegalStateException ( ( ( "bean<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" + ( clazz . getName ( ) ) ) + "]<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ; } if ( ( names . length ) > 1 ) { <START_BUG> StringBuilder msg = new StringBuilder ( ) ; <END_BUG> msg . append ( "more<seq2seq4repair_space>then<seq2seq4repair_space>one<seq2seq4repair_space>bean<seq2seq4repair_space>of<seq2seq4repair_space>type<seq2seq4repair_space>[" ) ; msg . append ( clazz . getName ( ) ) ; msg . append ( "]<seq2seq4repair_space>found,<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>specify<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>bean<seq2seq4repair_space>" ) ; msg . append ( "(@SpringBean(name=\"foo\"))<seq2seq4repair_space>in<seq2seq4repair_space>order<seq2seq4repair_space>to<seq2seq4repair_space>resolve<seq2seq4repair_space>this<seq2seq4repair_space>conflict.<seq2seq4repair_space>" ) ; msg . append ( "Matched<seq2seq4repair_space>beans:<seq2seq4repair_space>" ) ; msg . append ( Strings . join ( "," , names ) ) ; throw new IllegalStateException ( msg . toString ( ) ) ; } return names [ 0 ] ; } public boolean isSingletonBean ( ) { } public Class getBeanType ( ) { } public Object locateProxyTarget ( ) { } private ApplicationContext getSpringContext ( ) { } public final String getBeanName ( ) { } public final ISpringContextLocator getSpringContextLocator ( ) { } private final Object lookupSpringBean ( ApplicationContext ctx , Class clazz ) { } private static Object lookupSpringBean ( ApplicationContext ctx , String name , Class clazz ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } }

Fix:
StringBuffer msg = new StringBuffer ( ) ;
Buggy code:
public class Home extends ActionBarActivity { Button buttonCatalogue ; Button buttonTodo ; private DbManager dbManager ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } private void setTodoButtonListener ( ) { } private void setCatalogueButtonListener ( ) { buttonCatalogue . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> Intent myIntent = new Intent ( Home . this , CatalogueHome . class ) ; <END_BUG> startActivity ( myIntent ) ; } } ) ; } }

Fix:
Intent myIntent = new Intent ( Home . this , CatalogueActivity . class ) ;
Buggy code:
public class FolderTreeCellRenderer extends DefaultTreeCellRenderer { private static Icon expandedFolderIcon ; private static Icon collapsedFolderIcon ; private static Icon virtualFolderIcon ; private static Icon localRootFolderIcon ; private static Icon imapRootFolderIcon ; private static Icon inboxIcon ; private static Icon outboxIcon ; private static Icon trashIcon ; private Font plainFont ; private Font boldFont ; private Font italicFont ; public FolderTreeCellRenderer ( ) { } public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean isSelected , boolean expanded , boolean leaf , int row , boolean hasFocusVar ) { super . getTreeCellRendererComponent ( tree , value , isSelected , expanded , leaf , row , hasFocusVar ) ; setFont ( plainFont ) ; setToolTipText ( "" ) ; AbstractFolder treeNode = ( ( AbstractFolder ) ( value ) ) ; setText ( treeNode . getName ( ) ) ; setIcon ( FolderTreeCellRenderer . getFolderIcon ( treeNode , expanded ) ) ; if ( value instanceof MessageFolder ) { MessageFolder folder = ( ( MessageFolder ) ( value ) ) ; MessageFolderInfo info = folder . getMessageFolderInfo ( ) ; int unseen = info . getUnseen ( ) ; if ( unseen > 0 ) { setFont ( boldFont ) ; } <START_BUG> FolderItem item = folder . getFolderItem ( ) ; <END_BUG> if ( item != null ) { String name ; name = item . get ( "property" , "name" ) ; if ( unseen > 0 ) { name = ( ( name + "<seq2seq4repair_space>(" ) + unseen ) + ")<seq2seq4repair_space>" ; } StringBuffer buf = new StringBuffer ( ) ; buf . append ( ( "<html><body>&nbsp;Total:<seq2seq4repair_space>" + ( info . getExists ( ) ) ) ) ; buf . append ( ( "<br>&nbsp;Unseen:<seq2seq4repair_space>" + unseen ) ) ; buf . append ( ( "<br>&nbsp;Recent:<seq2seq4repair_space>" + ( info . getRecent ( ) ) ) ) ; buf . append ( "<//body><//html>" ) ; setToolTipText ( buf . toString ( ) ) ; setText ( name ) ; if ( ! ( item . getBoolean ( "selectable" , true ) ) ) { setFont ( italicFont ) ; setForeground ( Color . darkGray ) ; } } } return this ; } public static Icon getFolderIcon ( AbstractFolder node , boolean expanded ) { } }

Fix:
FolderItem item = folder . getConfiguration ( ) ;
Buggy code:
public class ViewMessageCommand extends FolderCommand { private MimeTree mimePartTree ; private Flags flags ; private MessageFolder srcFolder ; private Object uid ; public ViewMessageCommand ( FrameMediator frame , DefaultCommandReference reference ) { } public void updateGUI ( ) throws Exception { MessageController messageController = ( ( org . columba . mail . gui . frame . MessageViewOwner ) ( frameMediator ) ) . getMessageController ( ) ; messageController . updateGUI ( ) ; if ( ( flags ) == null ) return ; <START_BUG> if ( ! ( flags . getSeen ( ) ) ) { <END_BUG> ( ( org . columba . mail . gui . frame . TableViewOwner ) ( frameMediator ) ) . getTableController ( ) . getMarkAsReadTimer ( ) . restart ( ( ( FolderCommandReference ) ( getReference ( ) ) ) ) ; } } public void execute ( WorkerStatusController wsc ) throws Exception { } }

Fix:
if ( ( ! ( flags . getSeen ( ) ) ) && ( ! ( srcFolder . isReadOnly ( ) ) ) ) {