nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ReminderService extends Service { public static final int FLAG_DATA_CHANGED = 1 ; private static final String BACKUP_FILENAME = "evens.bak" ; public static final String EXTRA_ID = "event_id" ; public static final String EXTRA_BOOT = "boot" ; private static final String PREF_COUNTER = "reminder_service_counter" ; private boolean mRunning = false ; private Map < String , Integer > eventToIntentMap = new HashMap < > ( ) ; private Map < String , Event > idToEventMap = new HashMap < > ( ) ; private final ReminderService . ServiceBinder mBinder = new ReminderService . ServiceBinder ( ) ; private AlarmManager alarmManager ; private int alarmCounter ; private Messenger messageHandler ; protected ArrayBlockingQueue < HashMap < Event , Integer > > writeQueue = new ArrayBlockingQueue < > ( 10 ) ; private Thread backupWriterThread ; public class ServiceBinder extends Binder { ReminderService getReminderService ( ) { } } private class BackupWriter implements Runnable { protected ArrayBlockingQueue < HashMap < Event , Integer > > queue ; private HashMap < Event , Integer > currentMap ; private final Service service ; public BackupWriter ( ArrayBlockingQueue < HashMap < Event , Integer > > queue , Service service ) { } @ Override public void run ( ) { } } @ Override public void onCreate ( ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { } private void handleAlarm ( String id ) { } private void sendMessage ( int key ) { } @ Override public IBinder onBind ( Intent intent ) { } @ Override public void onDestroy ( ) { } private void addReminder ( Event event ) { } private void removeReminder ( Event event ) { } public void toggleState ( Event event ) { } public boolean hasReminder ( Event event ) { } public void updateReminderDates ( SparseArray < EventGroup > eventGroups ) { <START_BUG> if ( eventGroups == null ) <END_BUG> return ; boolean hasChanged = false ; for ( int i = 0 ; i < ( eventGroups . size ( ) ) ; i ++ ) { for ( Event e : eventGroups . get ( i ) . getEvents ( ) ) { if ( idToEventMap . containsKey ( e . getId ( ) ) ) { hasChanged = hasChanged || ( updateEventDate ( e ) ) ; } } } hasChanged = hasChanged || ( removeObsoleteReminders ( eventGroups ) ) ; if ( hasChanged ) sendMessage ( ReminderService . FLAG_DATA_CHANGED ) ; scheduleBackup ( ) ; } private boolean updateEventDate ( Event event1 ) { } private boolean removeObsoleteReminders ( SparseArray < EventGroup > eventGroups ) { } private void scheduleBackup ( ) { } private void restoreBackup ( boolean hard ) { } }

Fix:
if ( ( eventGroups == null ) || ( ( eventGroups . size ( ) ) < 1 ) )
Buggy code:
public class JdbcDatabaseResults implements DatabaseResults { private final PreparedStatement preparedStmt ; private final ResultSet resultSet ; private final ResultSetMetaData metaData ; private final ObjectCache objectCache ; private boolean first = true ; public JdbcDatabaseResults ( PreparedStatement preparedStmt , ResultSet resultSet , ObjectCache objectCache ) throws SQLException { } public int getColumnCount ( ) throws SQLException { } public String [ ] getColumnNames ( ) throws SQLException { int colN = metaData . getColumnCount ( ) ; String [ ] columnNames = new String [ colN ] ; for ( int colC = 0 ; colC < colN ; colC ++ ) { <START_BUG> columnNames [ colC ] = metaData . getColumnName ( ( colC + 1 ) ) ; <END_BUG> } return columnNames ; } public boolean first ( ) throws SQLException { } public boolean next ( ) throws SQLException { } public boolean last ( ) throws SQLException { } public boolean previous ( ) throws SQLException { } public boolean moveRelative ( int offset ) throws SQLException { } public boolean moveAbsolute ( int position ) throws SQLException { } public int findColumn ( String columnName ) throws SQLException { } public InputStream getBlobStream ( int columnIndex ) throws SQLException { } public boolean getBoolean ( int columnIndex ) throws SQLException { } public char getChar ( int columnIndex ) throws SQLException { } public byte getByte ( int columnIndex ) throws SQLException { } public byte [ ] getBytes ( int columnIndex ) throws SQLException { } public double getDouble ( int columnIndex ) throws SQLException { } public float getFloat ( int columnIndex ) throws SQLException { } public int getInt ( int columnIndex ) throws SQLException { } public long getLong ( int columnIndex ) throws SQLException { } public short getShort ( int columnIndex ) throws SQLException { } public String getString ( int columnIndex ) throws SQLException { } public Timestamp getTimestamp ( int columnIndex ) throws SQLException { } public BigDecimal getBigDecimal ( int columnIndex ) throws SQLException { } public boolean wasNull ( int columnIndex ) throws SQLException { } public ObjectCache getObjectCache ( ) { } public void close ( ) throws IOException { } public void closeQuietly ( ) { } public ResultSet getResultSet ( ) { } }

Fix:
columnNames [ colC ] = metaData . getColumnLabel ( ( colC + 1 ) ) ;
Buggy code:
public class RenderAsRegexp implements ActionListener , ResultRenderer { private static final String REGEXP_TESTER_COMMAND = "regexp_tester" ; private JPanel regexpPane ; private JTextArea regexpDataField ; private JLabeledTextField regexpField ; private JTextArea regexpResultField ; private JTabbedPane rightSide ; private SampleResult sampleResult = null ; public void clearData ( ) { } public void init ( ) { } public void actionPerformed ( ActionEvent e ) { } private void executeAndShowRegexpTester ( String textToParse ) { } private String process ( String textToParse ) { } public void renderResult ( SampleResult sampleResult ) { } public void setupTabPane ( ) { } private JPanel createRegexpPanel ( ) { } private JPanel createRegexpTasksPanel ( ) { JPanel regexpActionPanel = new JPanel ( ) ; <START_BUG> regexpField = new JLabeledTextField ( JMeterUtils . getResString ( "regexp_tester_field" ) , 30 ) ; <END_BUG> regexpActionPanel . add ( regexpField , BorderLayout . WEST ) ; JButton regexpTester = new JButton ( JMeterUtils . getResString ( "regexp_tester_button_test" ) ) ; regexpTester . setActionCommand ( RenderAsRegexp . REGEXP_TESTER_COMMAND ) ; regexpTester . addActionListener ( this ) ; regexpActionPanel . add ( regexpTester , BorderLayout . EAST ) ; regexpResultField = new JTextArea ( ) ; regexpResultField . setEditable ( false ) ; regexpResultField . setLineWrap ( true ) ; regexpResultField . setWrapStyleWord ( true ) ; JPanel regexpTasksPanel = new JPanel ( new BorderLayout ( 0 , 5 ) ) ; regexpTasksPanel . add ( regexpActionPanel , BorderLayout . NORTH ) ; regexpTasksPanel . add ( GuiUtils . makeScrollPane ( regexpResultField ) , BorderLayout . CENTER ) ; return regexpTasksPanel ; } public synchronized void setRightSide ( JTabbedPane side ) { } public synchronized void setSamplerResult ( Object userObject ) { } public void setLastSelectedTab ( int index ) { } @ Override public String toString ( ) { } public void renderImage ( SampleResult sampleResult ) { } public void setBackgroundColor ( Color backGround ) { } }

Fix:
regexpField = new JLabeledTextField ( JMeterUtils . getResString ( "regexp_tester_field" ) ) ;
Buggy code:
public class testCalc { @ Test public void testParse ( ) { } @ Test public void testRead ( ) { } @ Test public void testEvalNotLet ( ) { } @ Test public void testEvalLet ( ) { } public static void main ( String [ ] args ) { <START_BUG> JUnitCore . main ( "TestCalculator" ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
JUnitCore . main ( "ju.michael.app.testCalc" ) ;
Buggy code:
public class Lurch { private static int port = 1994 ; private static String username = "lurch" ; private static String lurchUrl = ( ( "http:////" + ( MainActivity . LURCH_HOST ) ) + ":" ) + ( Lurch . port ) ; private static String lurchAuth = ( ( Lurch . username ) + ":" ) + ( MainActivity . LURCH_TOKEN ) ; public static String getPlugins ( ) throws IOException , URISyntaxException , JSONException { } public static void runPlugin ( String id ) { try { HttpClient client = new DefaultHttpClient ( ) ; URI uri = new URI ( ( ( ( Lurch . lurchUrl ) + "//plugin//run//" ) + id ) ) ; HttpPost request = new HttpPost ( ) ; request . setURI ( uri ) ; <START_BUG> final String basicAuth = "Basic<seq2seq4repair_space>" + ( Base64 . encodeToString ( "lurch:04ed252949e3" . getBytes ( ) , NO_WRAP ) ) ; <END_BUG> request . setHeader ( "Authorization" , basicAuth ) ; client . execute ( request ) ; } catch ( URISyntaxException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
final String basicAuth = "Basic<seq2seq4repair_space>" + ( Base64 . encodeToString ( Lurch . lurchAuth . getBytes ( ) , NO_WRAP ) ) ;
Buggy code:
public class EditorAreaHelper { private EditorSashContainer editorArea ; public EditorAreaHelper ( WorkbenchPage page ) { } public void displayEditorList ( ) { } public void closeEditor ( IEditorReference ref ) { } public void closeEditor ( IEditorPart part ) { } private void closeEditor ( EditorPane pane ) { } public static void derefPart ( LayoutPart part ) { } public void dispose ( ) { } public String getActiveEditorWorkbookID ( ) { } public EditorStack getActiveWorkbook ( ) { } public LayoutPart getLayoutPart ( ) { } public IEditorReference getVisibleEditor ( ) { } public void moveEditor ( IEditorPart part , int position ) { <START_BUG> EditorPane pane = ( ( EditorPane ) ( ( ( EditorSite ) ( part . getSite ( ) ) ) . getPane ( ) ) ) ; <END_BUG> } public void addEditor ( EditorReference ref , String workbookId ) { } private void addToLayout ( EditorPane pane , EditorStack stack ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus restorePresentationState ( IMemento areaMem ) { } public IStatus saveState ( IMemento memento ) { } public void setActiveEditorWorkbookFromID ( String id ) { } public boolean setVisibleEditor ( IEditorReference ref , boolean setFocus ) { } public ArrayList getWorkbooks ( ) { } public IEditorReference [ ] getEditors ( ) { } public EditorStack getWorkbookFromID ( String workbookId ) { } }

Fix:
( ( EditorSite ) ( part . getSite ( ) ) ) . getPane ( ) ;
Buggy code:
public class NameDialog { private Spieler [ ] spieler = new Spieler [ 2 ] ; private JTextField txtName1 ; private JTextField txtName2 ; private JButton btnOK ; private JButton btnAbort ; private JDialog dialog ; public NameDialog ( final Frame frame , final Spieler [ ] spieler ) { } private void showNameDialog ( final Frame o ) { } class EnterKeyListener extends KeyAdapter { @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } } private void verifyNames ( ) { } private void cropText ( JTextField textField , int maxLenght ) { if ( ( textField . getText ( ) . length ( ) ) >= maxLenght ) { String text = textField . getText ( ) ; String sizedText = text . substring ( 0 , maxLenght ) ; <START_BUG> txtName1 . setText ( sizedText ) ; <END_BUG> } } No newline ; at end ; of file ; }

Fix:
textField . setText ( sizedText ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private EditText query ; private TextView textView ; private Retrofit retrofit ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; query = ( ( EditText ) ( findViewById ( edit_query ) ) ) ; textView = ( ( TextView ) ( findViewById ( predict ) ) ) ; retrofit = new Retrofit . Builder ( ) . addConverterFactory ( GsonConverterFactory . create ( ) ) . baseUrl ( "https:////predictor.yandex.net//" ) . build ( ) ; query . addTextChangedListener ( new TextWatcher ( ) { @ Override public void beforeTextChanged ( CharSequence charSequence , int i , int i1 , int i2 ) { } @ Override public void onTextChanged ( CharSequence charSequence , int i , int i1 , int i2 ) { <START_BUG> String str = ( ( String ) ( charSequence ) ) ; <END_BUG> str = str . replace ( '<seq2seq4repair_space>' , '+' ) ; final String finalStr = str ; new Handler ( ) . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { Call < PredictResp > call = retrofit . create ( PredictService . class ) . complete ( getString ( API_KEY ) , "tt" , finalStr ) ; Callback < PredictResp > callback = new Callback < PredictResp > ( ) { @ Override public void onResponse ( Call < PredictResp > call , Response < PredictResp > response ) { textView . setText ( response . body ( ) . getText ( ) . toString ( ) ) ; } @ Override public void onFailure ( Call < PredictResp > call , Throwable t ) { Toast . makeText ( MainActivity . this , t . getMessage ( ) , LENGTH_LONG ) . show ( ) ; } } ; call . enqueue ( callback ) ; } } , 100 ) ; } @ Override public void afterTextChanged ( Editable editable ) { } } ) ; } }

Fix:
String str = charSequence . toString ( ) ;
Buggy code:
public final class UnionStep < S , E > extends ComputerAwareStep < S , E > implements TraversalHolder < S , E > { private static final Nest [ ] NEST_OPERATIONS = new Nest [ ] { Nest . SET_HOLDER , Nest . MERGE_IN_SIDE_EFFECTS , Nest . SET_SIDE_EFFECTS , Nest . SET_STRATEGIES } ; private List < Traversal < S , E > > traversals ; private boolean first = true ; @ SafeVarargs public UnionStep ( final Traversal traversal , final Traversal < S , E > ... unionTraversals ) { } @ Override protected Iterator < Traverser < E > > standardAlgorithm ( ) { } @ Override protected Iterator < Traverser < E > > computerAlgorithm ( ) { } @ Override public List < Traversal < S , E > > getTraversals ( ) { } @ Override public String toString ( ) { } @ Override public UnionStep < S , E > clone ( ) throws CloneNotSupportedException { final UnionStep < S , E > clone = ( ( UnionStep < S , E > ) ( super . clone ( ) ) ) ; clone . traversals = new ArrayList ( ) ; for ( final Traversal < S , E > union : this . traversals ) { clone . traversals . add ( union . clone ( ) ) ; } <START_BUG> this . executeTraversalOperations ( UnionStep . NEST_OPERATIONS ) ; <END_BUG> return clone ; } @ Override public void reset ( ) { } @ Override public Set < TraverserRequirement > getRequirements ( ) { } }

Fix:
clone . executeTraversalOperations ( UnionStep . NEST_OPERATIONS ) ;
Buggy code:
public abstract class BaseSyslogReceiver implements SyslogServer { private final Logger slog = LoggerFactory . getLogger ( BaseSyslogReceiver . class ) ; protected SyslogProfile profile ; protected Set < SyslogListener > callbacks ; protected Charset charset ; protected Date bootTime = new Date ( ) ; protected AtomicLong counter = new AtomicLong ( ) ; public BaseSyslogReceiver ( SyslogProfile profile ) { } protected Syslog parse ( String text , InetSocketAddress local , InetSocketAddress remote ) { int facility = - 1 ; int severity = - 1 ; int brace = text . indexOf ( '>' ) ; <START_BUG> if ( ( ( ( text . charAt ( 0 ) ) == '<' ) && ( brace > 0 ) ) && ( brace <= 5 ) ) { <END_BUG> int pri = Integer . valueOf ( text . substring ( 1 , brace ) ) ; facility = pri // 8 ; severity = pri % 8 ; text = text . substring ( ( brace + 1 ) ) ; } counter . incrementAndGet ( ) ; Syslog syslog = new Syslog ( new Date ( ) , remote , facility , severity , text ) ; syslog . setLocalAddress ( local ) ; return syslog ; } protected void dispatch ( Syslog [ ] syslogs ) { } @ Override public InetSocketAddress getListenAddress ( ) { } @ Override public Charset getCharset ( ) { } @ Override public void addListener ( SyslogListener callback ) { } @ Override public void removeListener ( SyslogListener callback ) { } }

Fix:
if ( ( ( ( ! ( text . isEmpty ( ) ) ) && ( ( text . charAt ( 0 ) ) == '<' ) ) && ( brace > 0 ) ) && ( brace <= 5 ) ) {
Buggy code:
public class PlayerTickHandler { @ SideOnly ( Side . CLIENT ) @ SubscribeEvent <START_BUG> public void RaytracingUpdate ( TickEvent . PlayerTickEvent event ) { <END_BUG> RayTracing . instance ( ) . fire ( ) ; } }

Fix:
public void RaytracingUpdate ( TickEvent . ClientTickEvent event ) {
Buggy code:
public final class Activator implements BundleActivator { public static final String PLUGIN_ID = "org.eclipse.ecf.provider.msn" ; static final String NAMESPACE_ID = "ecf.msn.msnp" ; private static Activator plugin ; private BundleContext context ; private Map services ; public Activator ( ) { } void registerService ( IPresenceService service ) { } void unregisterService ( IPresenceService service ) { <START_BUG> ServiceRegistration registration = ( ( ServiceRegistration ) ( services . get ( service ) ) ) ; <END_BUG> if ( registration != null ) { registration . unregister ( ) ; } } public void start ( BundleContext context ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } public static synchronized Activator getDefault ( ) { } }

Fix:
ServiceRegistration registration = ( ( ServiceRegistration ) ( services . remove ( service ) ) ) ;
Buggy code:
public class NestedJarInlineProcessor implements DeploymentUnitProcessor { private static final Logger log = Logger . getLogger ( "org.jboss.as.deployment" ) ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { final VirtualFile deploymentRoot = getVirtualFileAttachment ( context ) ; final List < VirtualFile > list = new ArrayList < VirtualFile > ( 1 ) ; try { deploymentRoot . visit ( new VirtualFileVisitor ( ) { public void visit ( VirtualFile virtualFile ) { if ( virtualFile . getName ( ) . endsWith ( ".jar" ) ) { list . add ( virtualFile ) ; } } public VisitorAttributes getAttributes ( ) { return VisitorAttributes . RECURSE_LEAVES_ONLY ; } } ) ; } catch ( IOException e ) { throw new DeploymentUnitProcessingException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>mount<seq2seq4repair_space>nested<seq2seq4repair_space>jars<seq2seq4repair_space>in<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( deploymentRoot . getName ( ) ) ) , e ) ; } if ( ( list . size ( ) ) == 0 ) return ; final NestedMounts mounts = new NestedMounts ( list . size ( ) ) ; for ( VirtualFile file : list ) try { MountHandle handle = new MountHandle ( VFS . mountZip ( file , file , TempFileProviderService . provider ( ) ) ) ; mounts . add ( file , handle ) ; } catch ( IOException e ) { NestedJarInlineProcessor . log . warnf ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>mount<seq2seq4repair_space>%s<seq2seq4repair_space>in<seq2seq4repair_space>deployment<seq2seq4repair_space>%s,<seq2seq4repair_space>skipping" , file . getPathNameRelativeTo ( deploymentRoot ) , deploymentRoot . getName ( ) ) ; } context . putAttachment ( ATTACHMENT_KEY , mounts ) ; <START_BUG> context . getBatchServiceBuilder ( ) . addListener ( new NestedJarInlineProcessor . CloseListener ( mounts . getClosables ( ) ) ) ; <END_BUG> } static class CloseListener extends AbstractServiceListener < Void > { private Closeable [ ] closeables ; CloseListener ( Closeable [ ] closeables ) { } @ Override public void serviceStopped ( ServiceController < ? extends Void > controller ) { } } }

Fix:
context . getServiceBuilder ( ) . addListener ( new NestedJarInlineProcessor . CloseListener ( mounts . getClosables ( ) ) ) ;
Buggy code:
public class WeblogicDeploymentTool extends GenericDeploymentTool { protected static final String WL_DD = "weblogic-ejb-jar.xml" ; protected static final String WL_CMP_DD = "weblogic-cmp-rdbms-jar.xml" ; private String jarSuffix = "-wl.jar" ; private Path classpath ; private boolean keepgeneric = true ; public void setClasspath ( Path classpath ) { } public void setSuffix ( String inString ) { } public void setKeepgeneric ( String inValue ) { } protected DescriptorHandler getDescriptorHandler ( File srcDir ) { } protected void addVendorFiles ( Hashtable ejbFiles , File srcdir , String baseName ) { } File getVendorOutputJarFile ( String baseName ) { } private void buildWeblogicJar ( File sourceJar , File destJar ) { org . apache . tools . ant . taskdefs . Java javaTask = null ; try { <START_BUG> String args = ( ( "-noexit<seq2seq4repair_space>" + ( sourceJar . getPath ( ) . replace ( '\\' , '//' ) ) ) + "<seq2seq4repair_space>" ) + ( destJar . getPath ( ) . replace ( '\\' , '//' ) ) ; <END_BUG> javaTask = ( ( Java ) ( getTask ( ) . getProject ( ) . createTask ( "java" ) ) ) ; javaTask . setClassname ( "weblogic.ejbc" ) ; javaTask . setArgs ( args ) ; if ( ( classpath ) != null ) { javaTask . setClasspath ( classpath ) ; javaTask . setFork ( true ) ; } else { javaTask . setFork ( false ) ; } getTask ( ) . log ( ( "Calling<seq2seq4repair_space>weblogic.ejbc<seq2seq4repair_space>for<seq2seq4repair_space>" + ( sourceJar . toString ( ) ) ) , MSG_VERBOSE ) ; javaTask . execute ( ) ; } catch ( Exception e ) { String msg = "Exception<seq2seq4repair_space>while<seq2seq4repair_space>calling<seq2seq4repair_space>ejbc.<seq2seq4repair_space>Details:<seq2seq4repair_space>" + ( e . toString ( ) ) ; throw new BuildException ( msg , e ) ; } } protected void writeJar ( String baseName , File jarFile , Hashtable files ) throws BuildException { } public void validateConfigured ( ) throws BuildException { } }

Fix:
String args = ( ( "-noexit<seq2seq4repair_space>" + ( sourceJar . getPath ( ) ) ) + "<seq2seq4repair_space>" ) + ( destJar . getPath ( ) ) ;
Buggy code:
public final class MinHashDriver extends AbstractJob { public static void main ( String [ ] args ) throws Exception { } private void runJob ( Path input , Path output , int minClusterSize , int minVectorSize , String hashType , int numHashFunctions , int keyGroups , int numReduceTasks , boolean debugOutput ) throws IOException , ClassNotFoundException , InterruptedException { } @ Override public int run ( String [ ] args ) throws IOException , ClassNotFoundException , InterruptedException { addInputOption ( ) ; addOutputOption ( ) ; addOption ( MinhashOptionCreator . minClusterSizeOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . minVectorSizeOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . hashTypeOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . numHashFunctionsOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . keyGroupsOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . numReducersOption ( ) . create ( ) ) ; addOption ( MinhashOptionCreator . debugOutputOption ( ) . create ( ) ) ; if ( ( parseArguments ( args ) ) == null ) { return - 1 ; } Path input = getInputPath ( ) ; Path output = getOutputPath ( ) ; int minClusterSize = Integer . valueOf ( getOption ( MIN_CLUSTER_SIZE ) ) ; int minVectorSize = Integer . valueOf ( getOption ( MIN_VECTOR_SIZE ) ) ; String hashType = getOption ( HASH_TYPE ) ; int numHashFunctions = Integer . valueOf ( getOption ( NUM_HASH_FUNCTIONS ) ) ; int keyGroups = Integer . valueOf ( getOption ( KEY_GROUPS ) ) ; int numReduceTasks = Integer . parseInt ( getOption ( NUM_REDUCERS ) ) ; <START_BUG> boolean debugOutput = Boolean . parseBoolean ( getOption ( DEBUG_OUTPUT ) ) ; <END_BUG> runJob ( input , output , minClusterSize , minVectorSize , hashType , numHashFunctions , keyGroups , numReduceTasks , debugOutput ) ; return 0 ; } }

Fix:
boolean debugOutput = hasOption ( DEBUG_OUTPUT ) ;
Buggy code:
public class DomineeringMove { private final int x ; private final int y ; public DomineeringMove ( int x , int y ) { } public int getX ( ) { } public int getY ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( Integer . toString ( x ) ) + ",<seq2seq4repair_space>" ) + ( Integer . toBinaryString ( y ) ) ; <END_BUG> } }

Fix:
return ( ( Integer . toString ( x ) ) + ",<seq2seq4repair_space>" ) + ( Integer . toString ( y ) ) ;
Buggy code:
public class Snippet42 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; <START_BUG> System . out . println ( ( ( ( "BOUNDS=" + ( display . getBounds ( ) ) ) + "<seq2seq4repair_space>CLIENT=" ) + ( display . getClientArea ( ) ) ) ) ; <END_BUG> display . dispose ( ) ; } }

Fix:
System . out . println ( ( ( ( "Display<seq2seq4repair_space>Bounds=" + ( display . getBounds ( ) ) ) + "<seq2seq4repair_space>Display<seq2seq4repair_space>ClientArea=" ) + ( display . getClientArea ( ) ) ) ) ;
Buggy code:
public interface Resource extends InputStreamSource { boolean exists ( ) { } boolean isReadable ( ) { } boolean isOpen ( ) { } URL getURL ( ) throws IOException { } URI getURI ( ) throws IOException { } File getFile ( ) throws IOException { } <START_BUG> int contentLength ( ) throws IOException ; <END_BUG> long lastModified ( ) throws IOException { } Resource createRelative ( String relativePath ) throws IOException { } String getFilename ( ) { } String getDescription ( ) { } }

Fix:
long contentLength ( ) throws IOException ;
Buggy code:
class ClusterNodeRemovalHandler extends ProtocolMessageHandler { private static final Logger logger = Logger . getLogger ( ClusterNodeRemovalHandler . class ) ; private final ChannelAssociation channelAssociation ; ClusterNodeRemovalHandler ( final ChannelAssociation channelAssociation ) { } @ Override protected void processMessage ( MessageInputStream messageInputStream ) throws IOException { if ( messageInputStream == null ) { throw new IllegalArgumentException ( "Cannot<seq2seq4repair_space>read<seq2seq4repair_space>from<seq2seq4repair_space>null<seq2seq4repair_space>stream" ) ; } final Map < String , Collection < String > > removedNodesPerCluster = new HashMap < String , Collection < String > > ( ) ; try { final DataInput input = new DataInputStream ( messageInputStream ) ; final int clusterCount = PackedInteger . readPackedInteger ( input ) ; for ( int i = 0 ; i < clusterCount ; i ++ ) { final String clusterName = input . readUTF ( ) ; final int clusterMemberCount = PackedInteger . readPackedInteger ( input ) ; final Collection < String > removedNodes = new ArrayList < String > ( ) ; <START_BUG> for ( int j = 0 ; i < clusterMemberCount ; j ++ ) { <END_BUG> final String nodeName = input . readUTF ( ) ; removedNodes . add ( nodeName ) ; } removedNodesPerCluster . put ( clusterName , removedNodes ) ; } } finally { messageInputStream . close ( ) ; } final EJBReceiverContext ejbReceiverContext = this . channelAssociation . getEjbReceiverContext ( ) ; final EJBClientContext clientContext = ejbReceiverContext . getClientContext ( ) ; for ( final Map . Entry < String , Collection < String > > entry : removedNodesPerCluster . entrySet ( ) ) { final String clusterName = entry . getKey ( ) ; final Collection < String > removedNodes = entry . getValue ( ) ; ClusterNodeRemovalHandler . logger . debug ( ( ( ( ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>cluster<seq2seq4repair_space>node(s)<seq2seq4repair_space>removal<seq2seq4repair_space>message,<seq2seq4repair_space>for<seq2seq4repair_space>cluster<seq2seq4repair_space>named<seq2seq4repair_space>" + clusterName ) + "<seq2seq4repair_space>with<seq2seq4repair_space>" ) + ( removedNodes . size ( ) ) ) + "<seq2seq4repair_space>removed<seq2seq4repair_space>nodes" ) ) ; final ClusterContext clusterContext = clientContext . getClusterContext ( clusterName ) ; if ( clusterContext != null ) { for ( final String nodeName : removedNodes ) { clusterContext . removeClusterNode ( nodeName ) ; } } } } }

Fix:
for ( int j = 0 ; j < clusterMemberCount ; j ++ ) {
Buggy code:
@ WebListener public class StartupListener implements ServletContextListener { private static final Logger logger = LoggerFactory . getLogger ( StartupListener . class ) ; private StrolchAgent agent ; @ Override public void contextInitialized ( ServletContextEvent sce ) { String realPath = sce . getServletContext ( ) . getRealPath ( "//WEB-INF" ) ; File pathF = new File ( realPath ) ; String environment = StrolchEnvironment . getEnvironmentFromEnvProperties ( pathF ) ; StartupListener . logger . info ( "Starting<seq2seq4repair_space>CSV<seq2seq4repair_space>Rest<seq2seq4repair_space>Endpoint..." ) ; try { <START_BUG> this . agent = new StrolchBootstrapper ( ) . setupByRoot ( environment , pathF ) ; <END_BUG> this . agent . initialize ( ) ; this . agent . start ( ) ; } catch ( Exception e ) { StartupListener . logger . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>CSV<seq2seq4repair_space>Rest<seq2seq4repair_space>Endpoint<seq2seq4repair_space>due<seq2seq4repair_space>to:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; throw e ; } StartupListener . logger . info ( "Started<seq2seq4repair_space>CSV<seq2seq4repair_space>Rest<seq2seq4repair_space>Endpoint." ) ; } @ Override public void contextDestroyed ( ServletContextEvent sce ) { } }

Fix:
this . agent = new StrolchBootstrapper ( StartupListener . class ) . setupByRoot ( environment , pathF ) ;
Buggy code:
public class ColumnFamilyStoreTest extends CleanupHelper { static byte [ ] bytes1 ; static byte [ ] bytes2 ; @ Test public void testGetColumnWithWrongBF ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testEmptyRow ( ) throws Exception { } @ Test public void testSkipStartKey ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testIndexScan ( ) throws IOException { } @ Test public void testIndexDeletions ( ) throws IOException { } @ Test public void testIndexUpdate ( ) throws IOException { } @ Test public void testIndexCreate ( ) throws IOException , InterruptedException , ExecutionException , ConfigurationException { Table table = Table . open ( "Keyspace1" ) ; RowMutation rm ; rm = new RowMutation ( "Keyspace1" , ByteBufferUtil . bytes ( "k1" ) ) ; rm . add ( new QueryPath ( "Indexed2" , null , ByteBufferUtil . bytes ( "birthdate" ) ) , ByteBufferUtil . bytes ( 1L ) , 1 ) ; rm . apply ( ) ; ColumnFamilyStore cfs = table . getColumnFamilyStore ( "Indexed2" ) ; ColumnDefinition old = cfs . metadata . getColumn_metadata ( ) . get ( ByteBufferUtil . bytes ( "birthdate" ) ) ; <START_BUG> ColumnDefinition cd = new ColumnDefinition ( old . name , old . validator . getClass ( ) . getName ( ) , IndexType . KEYS , "birthdate_index" ) ; <END_BUG> Future < ? > future = cfs . addIndex ( cd ) ; future . get ( ) ; assert ( cfs . getIndexedColumnFamilyStore ( cd . name ) . getSSTables ( ) . size ( ) ) > 0 ; queryBirthdate ( table ) ; ColumnFamilyStore indexedCfs = cfs . getIndexedColumnFamilyStore ( ByteBufferUtil . bytes ( "birthdate" ) ) ; cfs . removeIndex ( ByteBufferUtil . bytes ( "birthdate" ) ) ; assert ! ( indexedCfs . isIndexBuilt ( ) ) ; future = cfs . addIndex ( cd ) ; future . get ( ) ; queryBirthdate ( table ) ; } private void queryBirthdate ( Table table ) throws CharacterCodingException { } @ Test public void testDeleteSuperRowSticksAfterFlush ( ) throws Throwable { } private static void assertRowAndColCount ( int rowCount , int colCount , ByteBuffer sc , boolean isDeleted , Collection < Row > rows ) { } private static String str ( ColumnFamily cf ) { } private static void putColsSuper ( ColumnFamilyStore cfs , DecoratedKey key , ByteBuffer scfName , Column ... cols ) throws Throwable { } private static void putColsStandard ( ColumnFamilyStore cfs , DecoratedKey key , Column ... cols ) throws Throwable { } @ Test public void testDeleteStandardRowSticksAfterFlush ( ) throws Throwable { } private ColumnFamilyStore insertKey1Key2 ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testBackupAfterFlush ( ) throws Throwable { } }

Fix:
ColumnDefinition cd = new ColumnDefinition ( old . name , old . validator , IndexType . KEYS , "birthdate_index" ) ;
Buggy code:
public class MenuItem extends Item { Menu parent ; Menu menu ; int accelerator ; public MenuItem ( Menu parent , int style ) { } public MenuItem ( Menu parent , int style , int index ) { } void addAccelerator ( ) { } public void addArmListener ( ArmListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } static int checkStyle ( int style ) { } void createHandle ( int index ) { } public int getAccelerator ( ) { } public boolean getEnabled ( ) { } public Menu getMenu ( ) { } String getNameText ( ) { } public Menu getParent ( ) { } public boolean getSelection ( ) { } void hookEvents ( ) { } int hotkeyProc ( int widget , int data , int info ) { } public boolean isEnabled ( ) { } int Pt_CB_ACTIVATE ( int widget , int info ) { } int Pt_CB_ARM ( int widget , int info ) { } int Pt_CB_REALIZED ( int widget , int info ) { } void releaseChildren ( boolean destroy ) { if ( ( ( menu ) != null ) && ( ! ( menu . isDisposed ( ) ) ) ) { <START_BUG> menu . releaseChildren ( false ) ; <END_BUG> menu = null ; } super . releaseChildren ( destroy ) ; } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeArmListener ( ArmListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } void removeAccelerator ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAccelerator ( int accelerator ) { } public void setEnabled ( boolean enabled ) { } public void setImage ( Image image ) { } public void setMenu ( Menu menu ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } void showMenu ( ) { } }

Fix:
menu . release ( false ) ;
Buggy code:
public class BoundedQueueThreadPoolService implements Service < ManagedQueueExecutorService > { private final InjectedValue < ThreadFactory > threadFactoryValue = new InjectedValue < ThreadFactory > ( ) ; private final InjectedValue < Executor > handoffExecutorValue = new InjectedValue < Executor > ( ) ; private ManagedQueueExecutorService executor ; private int coreThreads ; private int maxThreads ; private int queueLength ; private boolean blocking ; private TimeSpec keepAlive ; private boolean allowCoreTimeout ; public BoundedQueueThreadPoolService ( int coreThreads , int maxThreads , int queueLength , boolean blocking , TimeSpec keepAlive , boolean allowCoreTimeout ) { } public synchronized void start ( final StartContext context ) throws StartException { } public synchronized void stop ( final StopContext context ) { } public synchronized ManagedQueueExecutorService getValue ( ) throws IllegalStateException { final ManagedQueueExecutorService value = this . executor ; if ( value == null ) { <START_BUG> throw MESSAGES . boundedQueueThreadPoolExecutorUninitialized ( ) ; <END_BUG> } return value ; } public Injector < ThreadFactory > getThreadFactoryInjector ( ) { } public Injector < Executor > getHandoffExecutorInjector ( ) { } public synchronized void setCoreThreads ( int coreThreads ) { } public synchronized void setMaxThreads ( int maxThreads ) { } public synchronized void setKeepAlive ( TimeSpec keepAlive ) { } public synchronized void setAllowCoreTimeout ( boolean allowCoreTimeout ) { } public int getCurrentThreadCount ( ) { } public int getLargestThreadCount ( ) { } TimeUnit getKeepAliveUnit ( ) { } public int getRejectedCount ( ) { } public int getQueueSize ( ) { } }

Fix:
throw ROOT_LOGGER . boundedQueueThreadPoolExecutorUninitialized ( ) ;
Buggy code:
public class TestEarlyTermination extends LuceneTestCase { private int numDocs ; private List < String > terms ; private Directory dir ; private Sort sort ; private RandomIndexWriter iw ; private IndexReader reader ; @ Override public void setUp ( ) throws Exception { } private Document randomDocument ( ) { } private void createRandomIndexes ( int maxSegments ) throws IOException { } @ Override public void tearDown ( ) throws Exception { reader . close ( ) ; <START_BUG> iw . close ( ) ; <END_BUG> dir . close ( ) ; super . tearDown ( ) ; } public void testEarlyTermination ( ) throws IOException { } public void testEarlyTerminationDifferentSorter ( ) throws IOException { } private static void assertTopDocsEquals ( ScoreDoc [ ] scoreDocs1 , ScoreDoc [ ] scoreDocs2 ) { } }

Fix:
iw . shutdown ( ) ;
Buggy code:
public class MahoutEvaluator { private MahoutEvaluator ( ) { } public static void evaluate ( FitnessEvaluator < ? > evaluator , List < ? > population , List < Double > evaluations ) throws IOException { } private static Path prepareInput ( FileSystem fs , List < ? > population ) throws IOException { Path inpath = new Path ( fs . getWorkingDirectory ( ) , "input" ) ; if ( fs . exists ( inpath ) ) { <START_BUG> FileUtil . fullyDelete ( fs , inpath ) ; <END_BUG> } fs . mkdirs ( inpath ) ; MahoutEvaluator . storePopulation ( fs , new Path ( inpath , "population" ) , population ) ; return inpath ; } private static void configureJob ( JobConf conf , FitnessEvaluator < ? > evaluator , Path inpath , Path outpath ) { } static void storePopulation ( FileSystem fs , Path f , List < ? > population ) throws IOException { } }

Fix:
fs . delete ( inpath , true ) ;
Buggy code:
public class EvoSimDriver { public static void main ( String [ ] args ) { } private static void getOption ( ) { try { MonoCreature mc1 = new MonoCreature ( "Q" , "Q" ) ; MonoCreature mc2 = new MonoCreature ( "q" , "q" ) ; <START_BUG> MonoHybrid m = new MonoHybrid ( 3 ) ; <END_BUG> m . seedParents ( mc1 , mc2 ) ; m . generate ( ) ; } catch ( IllegalArgumentException e ) { System . out . println ( "Wrong<seq2seq4repair_space>genotype<seq2seq4repair_space>entered!" ) ; } finally { System . out . println ( "\n\n\nEnd<seq2seq4repair_space>of<seq2seq4repair_space>program" ) ; } } }

Fix:
MonoHybrid m = new MonoHybrid ( 4 ) ;
Buggy code:
public class animation { public static void animate ( int [ ] [ ] adj , int [ ] color , String name ) { Color [ ] chromes = new Color [ color . length ] ; for ( int i = 0 ; i < ( chromes . length ) ; i ++ ) { Random rand = new Random ( ) ; float r = rand . nextFloat ( ) ; float g = rand . nextFloat ( ) ; float b = rand . nextFloat ( ) ; Color randomColor = new Color ( r , g , b ) ; chromes [ i ] = randomColor ; } Graph < Integer , String > g = new edu . uci . ics . jung . graph . SparseMultigraph < Integer , String > ( ) ; for ( int i = 0 ; i < ( adj . length ) ; i ++ ) { g . addVertex ( i ) ; } for ( int i = 0 ; i < ( adj . length ) ; i ++ ) { for ( int j = 0 ; j < i ; j ++ ) { if ( ( adj [ i ] [ j ] ) == 1 ) <START_BUG> g . addEdge ( ( ( "edge" + i ) + j ) , i , j ) ; <END_BUG> } } Layout layout = new edu . uci . ics . jung . algorithms . layout . ISOMLayout ( g ) ; layout . setSize ( new Dimension ( 300 , 300 ) ) ; VisualizationViewer vv = new VisualizationViewer ( layout ) ; vv . setPreferredSize ( new Dimension ( 350 , 350 ) ) ; vv . getRenderContext ( ) . setVertexLabelTransformer ( new ToStringLabeller ( ) ) ; Transformer < Integer , Paint > vertexColor = new Transformer < Integer , Paint > ( ) { public Paint transform ( Integer i ) { int a = color [ i ] ; return chromes [ a ] ; } } ; final GraphZoomScrollPane panel = new GraphZoomScrollPane ( vv ) ; final AbstractModalGraphMouse graphMouse = new DefaultModalGraphMouse ( ) ; vv . setGraphMouse ( graphMouse ) ; vv . getRenderContext ( ) . setVertexFillPaintTransformer ( vertexColor ) ; JFrame frame = new JFrame ( ( "Graph<seq2seq4repair_space>Theory<seq2seq4repair_space>App<seq2seq4repair_space>" + name ) ) ; frame . setDefaultCloseOperation ( JFrame . DISPOSE_ON_CLOSE ) ; frame . getContentPane ( ) . add ( vv ) ; frame . pack ( ) ; frame . setVisible ( true ) ; } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
g . addEdge ( ( ( "edge" + ( i * i ) ) + j ) , i , j ) ;
Buggy code:
public class LUFactorization { private double [ ] [ ] L ; private double [ ] [ ] U ; private double error ; private LUFactorization ( double [ ] [ ] L , double [ ] [ ] U , double err ) { } public static LUFactorization lu_fact ( double [ ] [ ] matrix ) { double [ ] [ ] U = deepCopy ( matrix ) ; if ( ( U . length ) != ( U [ 0 ] . length ) ) { throw new IllegalArgumentException ( "LU<seq2seq4repair_space>factorization<seq2seq4repair_space>needs<seq2seq4repair_space>a<seq2seq4repair_space>square<seq2seq4repair_space>matrix" ) ; } int numCols = U . length ; int numRows = numCols ; double [ ] [ ] [ ] Lmatrices = new double [ numCols ] [ numRows ] [ numCols ] ; for ( int col = 0 ; col < numCols ; col ++ ) { int topRowI = col ; Lmatrices [ col ] = getIdentityMatrix ( numCols ) ; for ( int rowToKill = topRowI + 1 ; rowToKill < numRows ; rowToKill ++ ) { <START_BUG> if ( ( Math . abs ( U [ rowToKill ] [ col ] ) ) < 1.0E-9 ) { <END_BUG> continue ; } double multFactor = ( U [ rowToKill ] [ col ] ) // ( U [ topRowI ] [ col ] ) ; for ( int i = col ; i < numCols ; i ++ ) { U [ rowToKill ] [ i ] = ( U [ rowToKill ] [ i ] ) - ( ( U [ topRowI ] [ i ] ) * multFactor ) ; Lmatrices [ col ] [ rowToKill ] [ i ] = ( Lmatrices [ col ] [ rowToKill ] [ i ] ) - ( ( Lmatrices [ col ] [ topRowI ] [ i ] ) * multFactor ) ; } } } HilbertOps . LInverse ( Lmatrices [ 0 ] ) ; for ( int i = 1 ; i < ( Lmatrices . length ) ; i ++ ) { HilbertOps . LInverse ( Lmatrices [ i ] ) ; Lmatrices [ i ] = matrixMult ( Lmatrices [ ( i - 1 ) ] , Lmatrices [ i ] ) ; } double [ ] [ ] L = Lmatrices [ ( ( Lmatrices . length ) - 1 ) ] ; double [ ] [ ] difference = matrixSubtract ( matrixMult ( L , U ) , matrix ) ; return new LUFactorization ( L , U , HilbertOps . norm ( difference ) ) ; } public double [ ] [ ] getL ( ) { } public double [ ] [ ] getU ( ) { } public double getError ( ) { } }

Fix:
if ( ( Math . abs ( U [ rowToKill ] [ col ] ) ) < 1.0E-10 ) {
Buggy code:
public class ReadResourceNameOperationStepHandler implements OperationStepHandler { public static final ReadResourceNameOperationStepHandler INSTANCE = new ReadResourceNameOperationStepHandler ( ) ; private ReadResourceNameOperationStepHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; context . getResult ( ) . set ( name ) ; <START_BUG> context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class Server { public void runServer ( int port ) { try { ServerSocket serverSocket = new ServerSocket ( port ) ; while ( true ) { Socket socket = serverSocket . accept ( ) ; <START_BUG> ServerThread serverThread = new ServerThread ( socket ) ; <END_BUG> serverThread . setDaemon ( true ) ; serverThread . start ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; System . exit ( 1 ) ; } } }

Fix:
Thread serverThread = new Thread ( new ServerThread ( socket ) ) ;
Buggy code:
public class MultiTargetRelationalValue extends Value { private final Set < String > targetObjects ; public MultiTargetRelationalValue ( Attribute attribute , ValueHashFactory hashingFactory ) { } public MultiTargetRelationalValue ( Value v ) { } public MultiTargetRelationalValue ( Attribute attribute , Set < String > targetObjects , ValueHashFactory hashingFactory ) { } @ Override public boolean isSet ( ) { } @ Override public Value copy ( ) { } @ Override public Value changeValue ( String v ) { } @ Override public Value appendRelationalTarget ( String v ) { } @ Override public Value appendAllRelationalTargets ( Collection < String > targets ) { } public Value removeAllRelationalTargets ( ) { } public Value replaceRelationalTarget ( String target ) { TreeSet < String > newTargetObjects = new TreeSet < String > ( this . targetObjects ) ; newTargetObjects . remove ( target ) ; <START_BUG> return new MultiTargetRelationalValue ( this . attribute , targetObjects , this . hashTuple . getHashFactory ( ) ) ; <END_BUG> } @ Override public void setValue ( int v ) { } @ Override public void setValue ( double v ) { } @ Override @ Deprecated public void setValue ( String v ) { } @ Override public void setValue ( boolean v ) { } @ Override @ Deprecated public void addRelationalTarget ( String t ) { } @ Override @ Deprecated public void addAllRelationalTargets ( Collection < String > targets ) { } @ Override @ Deprecated public void clearRelationTargets ( ) { } @ Override @ Deprecated public void removeRelationalTarget ( String target ) { } @ Override public int getDiscVal ( ) { } @ Override public double getRealVal ( ) { } @ Override public Set < String > getAllRelationalTargets ( ) { } @ Override public String getStringVal ( ) { } @ Override public StringBuilder buildStringVal ( StringBuilder builder ) { } @ Override public double getNumericRepresentation ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public boolean getBooleanValue ( ) { } @ Override public void setValue ( int [ ] intArray ) { } @ Override public void setValue ( double [ ] doubleArray ) { } @ Override public int [ ] getIntArray ( ) { } @ Override public double [ ] getDoubleArray ( ) { } }

Fix:
return new MultiTargetRelationalValue ( this . attribute , newTargetObjects , this . hashTuple . getHashFactory ( ) ) ;
Buggy code:
public abstract class AbstractKDimension < A extends KView , B extends KDimension , C extends KUniverse > implements KDimension < A , B , C > { private KUniverse _universe ; private long _key ; protected AbstractKDimension ( KUniverse p_universe , long p_key ) { } @ Override public long key ( ) { } @ Override public C universe ( ) { } @ Override public void save ( Callback < Throwable > callback ) { } @ Override public void saveUnload ( Callback < Throwable > callback ) { } @ Override public void delete ( Callback < Throwable > callback ) { } @ Override public void discard ( Callback < Throwable > callback ) { } @ Override public void parent ( Callback < B > callback ) { } @ Override public void children ( Callback < B [ ] > callback ) { } @ Override public void fork ( Callback < B > callback ) { } @ Override <START_BUG> public synchronized A time ( Long timePoint ) { <END_BUG> return internal_create ( timePoint ) ; } @ Override public void listen ( ModelListener listener ) { } @ Override public void listenAllTimes ( KObject target , ModelListener listener ) { } protected abstract A internal_create ( Long timePoint ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
public synchronized A time ( long timePoint ) {
Buggy code:
public class TestPredicatedBuffer < E > extends TestPredicatedCollection < E > { public TestPredicatedBuffer ( String testName ) { } protected Buffer < E > decorateCollection ( Buffer < E > buffer , Predicate < E > predicate ) { <START_BUG> return PredicatedBuffer . decorate ( buffer , predicate ) ; <END_BUG> } @ Override public Buffer < E > makeObject ( ) { } @ Override public Collection < E > makeConfirmedCollection ( ) { } @ Override public Collection < E > makeConfirmedFullCollection ( ) { } public Buffer < E > makeTestBuffer ( ) { } @ SuppressWarnings ( "unchecked" ) public void testGet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testRemove ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return PredicatedBuffer . predicatedBuffer ( buffer , predicate ) ;
Buggy code:
public class ReplyWithTemplateCommand extends ReplyCommand { public ReplyWithTemplateCommand ( DefaultCommandReference [ ] references ) { } public void execute ( WorkerStatusController worker ) throws Exception { } private String getTemplateBody ( ) throws IOException , Exception , CommandCancelledException { MessageFolder templateFolder = ( ( MessageFolder ) ( treeModel . getFolder ( 107 ) ) ) ; HeaderList list = templateFolder . getHeaderList ( ) ; <START_BUG> ChooseTemplateDialog d = new ChooseTemplateDialog ( list ) ; <END_BUG> Object uid = null ; if ( d . isResult ( ) ) { uid = d . getUid ( ) ; } else { throw new CommandCancelledException ( ) ; } MimeTree tree = templateFolder . getMimePartTree ( uid ) ; MimePart mp ; if ( model . isHtml ( ) ) { mp = tree . getFirstTextPart ( "html" ) ; } else { mp = tree . getFirstTextPart ( "text" ) ; } InputStream bodyStream = templateFolder . getMimePartBodyStream ( uid , mp . getAddress ( ) ) ; String body = StreamUtils . readInString ( bodyStream ) . toString ( ) ; bodyStream . close ( ) ; return body ; } }

Fix:
ChooseTemplateDialog d = new ChooseTemplateDialog ( getFrameMediator ( ) . getView ( ) . getFrame ( ) , list ) ;