nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AssertStatement extends Statement { public Expression assertExpression ; public Expression exceptionArgument ; int preAssertInitStateIndex = - 1 ; private FieldBinding assertionSyntheticFieldBinding ; public AssertStatement ( Expression exceptionArgument , Expression assertExpression , int startPosition ) { } public AssertStatement ( Expression assertExpression , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; int divergePC ; if ( ( this . assertionSyntheticFieldBinding ) != null ) { Label assertionActivationLabel = new Label ( codeStream ) ; codeStream . getstatic ( this . assertionSyntheticFieldBinding ) ; codeStream . ifne ( assertionActivationLabel ) ; Label falseLabel = new Label ( codeStream ) ; assertExpression . generateOptimizedBoolean ( currentScope , codeStream , ( falseLabel = new Label ( codeStream ) ) , null , true ) ; codeStream . newJavaLangAssertionError ( ) ; codeStream . dup ( ) ; if ( ( exceptionArgument ) != null ) { exceptionArgument . generateCode ( currentScope , codeStream , true ) ; if ( ( exceptionArgument . constant ) != ( NotAConstant ) ) { codeStream . invokeJavaLangAssertionErrorConstructor ( exceptionArgument . constant . typeID ( ) ) ; } else { codeStream . invokeJavaLangAssertionErrorConstructor ( ( ( exceptionArgument . implicitConversion ) & 15 ) ) ; } } else { codeStream . invokeJavaLangAssertionErrorDefaultConstructor ( ) ; } codeStream . athrow ( ) ; falseLabel . place ( ) ; assertionActivationLabel . place ( ) ; } if ( ( preAssertInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , preAssertInitStateIndex ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public void resolve ( BlockScope scope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class SoundLayoutSettingsDialog extends SoundLayoutDialog { private static final String TAG = SoundLayoutSettingsDialog . class . getName ( ) ; private static final String KEY_DATABASE_ID = "org.neidhardt.dynamicsoundboard.dialog.SoundLayoutSettingsDialog.databaseId" ; private String databaseId ; public static void showInstance ( FragmentManager manager , String databaseId ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override protected int getLayoutId ( ) { } @ Override protected String getHintForName ( ) { <START_BUG> return null ; <END_BUG> } @ Override protected void deliverResult ( ) { } }

Fix:
return SoundLayoutsManager . getInstance ( ) . getSoundLayoutById ( this . databaseId ) . getLabel ( ) ;
Buggy code:
public class SearchFacade { ExecutorService executor ; AirlineFacade af = new AirlineFacade ( ) ; StringBuilder sb = new StringBuilder ( ) ; public String getFlights ( String from , String to , String date , int tickets ) throws InterruptedException , ExecutionException , TimeoutException { executor = Executors . newFixedThreadPool ( 4 ) ; List listAirline = af . getActiveAirlines ( ) ; System . out . println ( ( "number<seq2seq4repair_space>of<seq2seq4repair_space>airlines<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>database:<seq2seq4repair_space>" + ( listAirline . size ( ) ) ) ) ; List < Future > futures = new ArrayList ( ) ; for ( Object a : listAirline ) { AirlineEntity ae = ( ( AirlineEntity ) ( a ) ) ; Callable c = new SearchCaller ( ae . getUrl ( ) , from , to , date , tickets ) ; Future < String > fut = executor . submit ( c ) ; futures . add ( fut ) ; } int countResults = 0 ; for ( Future < String > future : futures ) { String tmp = future . get ( 5 , TimeUnit . DAYS ) ; <START_BUG> if ( ( tmp . length ( ) ) > 1 ) { <END_BUG> sb . append ( future . get ( 5 , TimeUnit . SECONDS ) ) ; sb . append ( ",\n" ) ; } } String result = sb . toString ( ) ; if ( result . endsWith ( ",\n" ) ) { result = result . substring ( 0 , result . lastIndexOf ( "," ) ) ; } result = ( "[\n" + result ) + "\n]" ; return result ; } }

Fix:
if ( ( tmp . length ( ) ) < 1 ) {
Buggy code:
public final class DataLineTest extends MahoutTestCase { private static final String [ ] DATA = new String [ ] { "842302,M,17.99,10.38,122.8,1001,0.1184,0.2776,0.3001,0.1471,0.2419,0.07871,1.095,0.9053,8.589,153.4,0.006399,0.04904,0.05373,0.01587,0.03003,0.006193,25.38,17.33,184.6,2019,0.1622,0.6656,0.7119,0.2654,0.4601,0.1189" , "8510426,B,13.54,14.36,87.46,566.3,0.09779,0.08129,0.06664,0.04781,0.1885,0.05766,0.2699,0.7886,2.058,23.56,0.008462,0.0146,0.02387,0.01315,0.0198,0.0023,15.11,19.26,99.7,711.2,0.144,0.1773,0.239,0.1288,0.2977,0.07259" , "852781,M,18.61,20.25,122.1,1094,0.0944,0.1066,0.149,0.07731,0.1697,0.05699,0.8529,1.849,5.632,93.54,0.01075,0.02722,0.05081,0.01911,0.02293,0.004217,21.31,27.26,139.9,1403,0.1338,0.2117,0.3446,0.149,0.2341,0.07421" } ; @ Test public void testSet ( ) throws Exception { FileSystem fs = FileSystem . get ( new Configuration ( ) ) ; <START_BUG> Path inpath = fs . makeQualified ( new Path ( Resources . getResource ( "wdbc" ) . toString ( ) ) ) ; <END_BUG> DataSet dataset = FileInfoParser . parseFile ( fs , inpath ) ; DataSet . initialize ( dataset ) ; DataLine dl = new DataLine ( ) ; int labelpos = dataset . getLabelIndex ( ) ; dl . set ( DataLineTest . DATA [ 0 ] ) ; assertEquals ( dataset . valueIndex ( labelpos , "M" ) , dl . getLabel ( ) ) ; dl . set ( DataLineTest . DATA [ 1 ] ) ; assertEquals ( dataset . valueIndex ( labelpos , "B" ) , dl . getLabel ( ) ) ; dl . set ( DataLineTest . DATA [ 2 ] ) ; assertEquals ( dataset . valueIndex ( labelpos , "M" ) , dl . getLabel ( ) ) ; } }

Fix:
Path inpath = fs . makeQualified ( new Path ( Resources . getResource ( "wdbc" ) . toURI ( ) ) ) ;
Buggy code:
public class Projection extends SpelNode { public Projection ( Token payload ) { } @ Override public Object getValue ( ExpressionState state ) throws EvaluationException { } @ Override public String toStringAST ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> return sb . append ( "!{" ) . append ( getChild ( 0 ) . toStringAST ( ) ) . append ( "}" ) . toString ( ) ; } @ Override public boolean isWritable ( ExpressionState expressionState ) throws SpelException { } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class OpenWithAction extends FrameAction implements SelectionListener { public OpenWithAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> processor . addOp ( new org . columba . mail . gui . attachment . command . OpenWithAttachmentCommand ( getFrameController ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ; <END_BUG> } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
processor . addOp ( new org . columba . mail . gui . attachment . command . OpenWithAttachmentCommand ( getFrameMediator ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ;
Buggy code:
public abstract class QueryNodeImpl implements Cloneable , QueryNode { private static final long serialVersionUID = 5569870883474845989L ; public static final String PLAINTEXT_FIELD_NAME = "_plain" ; private boolean isLeaf = true ; private Hashtable < CharSequence , Object > tags = new Hashtable < CharSequence , Object > ( ) ; private List < QueryNode > clauses = null ; protected void allocate ( ) { } public final void add ( QueryNode child ) { } public final void add ( List < QueryNode > children ) { if ( ( isLeaf ( ) ) || ( ( this . clauses ) == null ) ) { throw new IllegalArgumentException ( NLS . getLocalizedMessage ( NODE_ACTION_NOT_SUPPORTED ) ) ; } <START_BUG> for ( QueryNode child : getChildren ( ) ) { <END_BUG> add ( child ) ; } } public boolean isLeaf ( ) { } public final void set ( List < QueryNode > children ) { } public QueryNode cloneTree ( ) throws CloneNotSupportedException { } @ Override public Object clone ( ) throws CloneNotSupportedException { } protected void setLeaf ( boolean isLeaf ) { } public final List < QueryNode > getChildren ( ) { } public void setTag ( CharSequence tagName , Object value ) { } public void unsetTag ( CharSequence tagName ) { } public boolean containsTag ( CharSequence tagName ) { } public Object getTag ( CharSequence tagName ) { } private QueryNode parent = null ; private void setParent ( QueryNode parent ) { } public QueryNode getParent ( ) { } protected boolean isRoot ( ) { } protected boolean toQueryStringIgnoreFields = false ; protected boolean isDefaultField ( CharSequence fld ) { } @ Override public String toString ( ) { } @ SuppressWarnings ( { "unchecked" } ) public Map < CharSequence , Object > getTags ( ) { } }

Fix:
for ( QueryNode child : children ) {
Buggy code:
public abstract class WicketTestCase extends TestCase { public WicketTester tester ; @ Override protected void setUp ( ) throws Exception { } @ Override protected void tearDown ( ) throws Exception { } protected < T extends Page > void executeTest ( final Class < T > pageClass , final String filename ) throws Exception { } <START_BUG> protected < T extends Page > void executeTest ( final Class < T > pageClass , PageParameters parameters , final String filename ) throws Exception { <END_BUG> System . out . println ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; tester . startPage ( pageClass , parameters ) ; tester . assertRenderedPage ( pageClass ) ; tester . assertResultPage ( getClass ( ) , filename ) ; } protected void executedListener ( final Class < ? > clazz , final Component component , final String filename ) throws Exception { } protected void executedBehavior ( final Class < ? > clazz , final AbstractAjaxBehavior behavior , final String filename ) throws Exception { } public static String getBasedir ( ) { } }

Fix:
protected < T extends Page > void executeTest ( final Class < T > pageClass , final PageParameters parameters , final String filename ) throws Exception {
Buggy code:
public class ArrayAllocationExpression extends Expression { public TypeReference type ; public Expression [ ] dimensions ; public ArrayInitializer initializer ; public ArrayAllocationExpression ( ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { TypeBinding referenceType = type . resolveType ( scope , true ) ; constant = Constant . NotAConstant ; if ( referenceType == ( VoidBinding ) ) { scope . problemReporter ( ) . cannotAllocateVoidArray ( this ) ; referenceType = null ; } int explicitDimIndex = - 1 ; for ( int i = dimensions . length ; ( -- i ) >= 0 ; ) { if ( ( dimensions [ i ] ) != null ) { if ( explicitDimIndex < 0 ) explicitDimIndex = i ; } else if ( explicitDimIndex > 0 ) { scope . problemReporter ( ) . incorrectLocationForEmptyDimension ( this , i ) ; } } if ( ( initializer ) == null ) { if ( explicitDimIndex < 0 ) { scope . problemReporter ( ) . mustDefineDimensionsOrInitializer ( this ) ; } <START_BUG> if ( ( ( referenceType . isBoundParameterizedType ( ) ) || ( referenceType . isGenericType ( ) ) ) || ( referenceType . isTypeVariable ( ) ) ) { <END_BUG> scope . problemReporter ( ) . illegalGenericArray ( referenceType , this ) ; } } else if ( explicitDimIndex >= 0 ) { scope . problemReporter ( ) . cannotDefineDimensionsAndInitializer ( this ) ; } for ( int i = 0 ; i <= explicitDimIndex ; i ++ ) { if ( ( dimensions [ i ] ) != null ) { TypeBinding dimensionType = dimensions [ i ] . resolveTypeExpecting ( scope , IntBinding ) ; if ( dimensionType != null ) { dimensions [ i ] . computeConversion ( scope , IntBinding , dimensionType ) ; } } } if ( referenceType != null ) { if ( ( dimensions . length ) > 255 ) { scope . problemReporter ( ) . tooManyDimensions ( this ) ; } this . resolvedType = scope . createArrayType ( referenceType , dimensions . length ) ; if ( ( initializer ) != null ) { if ( ( initializer . resolveTypeExpecting ( scope , this . resolvedType ) ) != null ) initializer . binding = ( ( ArrayBinding ) ( this . resolvedType ) ) ; } } return this . resolvedType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( referenceType != null ) && ( ( ( referenceType . isBoundParameterizedType ( ) ) || ( referenceType . isGenericType ( ) ) ) || ( referenceType . isTypeVariable ( ) ) ) ) {
Buggy code:
public class PathConvert extends Task { private Path path = null ; private Reference refid = null ; private String targetOS = null ; private boolean targetWindows = false ; private boolean onWindows = false ; private String property = null ; private Vector prefixMap = new Vector ( ) ; private String pathSep = null ; private String dirSep = null ; public void setDirSep ( String sep ) { } public void setPathSep ( String sep ) { } public void setProperty ( String p ) { } public void setRefid ( Reference r ) throws TaskException { } public void setTargetos ( String target ) throws TaskException { } public boolean isReference ( ) { } public PathConvert . MapEntry createMap ( ) { } public Path createPath ( ) throws TaskException { } public void execute ( ) throws TaskException { if ( isReference ( ) ) { path = new Path ( getProject ( ) ) . createPath ( ) ; Object obj = refid . getReferencedObject ( getProject ( ) ) ; if ( obj instanceof Path ) { path . setRefid ( refid ) ; } else if ( obj instanceof FileSet ) { FileSet fs = ( ( FileSet ) ( obj ) ) ; path . addFileset ( fs ) ; } else { throw new TaskException ( "'refid'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>refer<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>path<seq2seq4repair_space>or<seq2seq4repair_space>fileset" ) ; } } validateSetup ( ) ; String osname = System . getProperty ( "os.name" ) . toLowerCase ( ) ; onWindows = ( ( osname . indexOf ( "windows" ) ) >= 0 ) || ( ( osname . indexOf ( "netware" ) ) >= 0 ) ; char fromDirSep = ( onWindows ) ? '\\' : '//' ; char toDirSep = dirSep . charAt ( 0 ) ; StringBuffer rslt = new StringBuffer ( 100 ) ; String [ ] elems = path . list ( ) ; for ( int i = 0 ; i < ( elems . length ) ; i ++ ) { String elem = elems [ i ] ; elem = mapElement ( elem ) ; elem = elem . replace ( fromDirSep , toDirSep ) ; if ( i != 0 ) rslt . append ( pathSep ) ; rslt . append ( elem ) ; } String value = rslt . toString ( ) ; log ( ( ( ( "Set<seq2seq4repair_space>property<seq2seq4repair_space>" + ( property ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + value ) , MSG_VERBOSE ) ; <START_BUG> getProject ( ) . setNewProperty ( property , value ) ; <END_BUG> } private String mapElement ( String elem ) throws TaskException { } private TaskException noChildrenAllowed ( ) { } private void validateSetup ( ) throws TaskException { } public class MapEntry { private String from = null ; private String to = null ; public void setFrom ( String from ) { } public void setTo ( String to ) { } public String apply ( String elem ) throws TaskException { } } }

Fix:
setProperty ( property , value ) ;
Buggy code:
public class WorthwhileWatchExpressionDelegate implements IWatchExpressionDelegate { private final class WorthwhileWatchExpressionResult extends WorthwhileDebugElement implements IWatchExpressionResult { public WorthwhileWatchExpressionResult ( final WorthwhileDebugTarget debugTarget , final Value value , final DebugException exception , final String expressionText ) { } private final Value value ; private final DebugException exception ; private final String expressionText ; @ Override public IValue getValue ( ) { <START_BUG> return new WorthwhileValue ( this . getDebugTarget ( ) , this . value ) ; <END_BUG> } @ Override public boolean hasErrors ( ) { } @ Override public String [ ] getErrorMessages ( ) { } @ Override public String getExpressionText ( ) { } @ Override public DebugException getException ( ) { } } @ Override public final void evaluateExpression ( final String expression , final IDebugElement context , final IWatchExpressionListener listener ) { } }

Fix:
return new WorthwhileValue ( this . getDebugTarget ( ) , null , this . value ) ;
Buggy code:
public class TablePanel extends TabSpawnable implements ActionListener , ItemListener , DocumentListener , ListSelectionListener , TabModelTarget { protected Object _target ; protected JLabel _contextLabel = new JLabel ( "Table<seq2seq4repair_space>view<seq2seq4repair_space>of:<seq2seq4repair_space>XXX" ) ; protected JLabel _sizeLabel = new JLabel ( "<seq2seq4repair_space>[Rows:<seq2seq4repair_space>000]" ) ; protected Vector _tableModels = new Vector ( ) ; protected JComboBox _persCombo = null ; protected JLabel _persLabel = new JLabel ( "Table:" ) ; protected JButton _config = new JButton ( "Config" ) ; protected JComboBox _filterCombo = new JComboBox ( ) ; protected JLabel _filterLabel = new JLabel ( "Filter:" ) ; protected JSortedTable _table = new JSortedTable ( ) ; protected JPanel _mainTablePane = new JPanel ( ) ; protected JPanel _north = new JPanel ( ) ; protected JPanel _content = new JPanel ( ) ; protected TableModelComposite _tableModel = null ; protected JScrollPane _sp1 ; public TablePanel ( String title ) { } protected void setEditors ( JTable t ) { } public void initTableModels ( ) { } public void setTarget ( Object t ) { } public void updateContext ( ) { String targetName = "" + ( _target ) ; if ( ( _target ) instanceof MElement ) { MModelElement e = ( ( MModelElement ) ( _target ) ) ; String ocl = "" ; <START_BUG> if ( e instanceof MElementImpl ) <END_BUG> ocl = ( ( MElementImpl ) ( e ) ) . getUMLClassName ( ) ; targetName = e . getName ( ) ; if ( targetName . equals ( "" ) ) targetName = ( "(anon<seq2seq4repair_space>" + ocl ) + ")" ; } if ( ( _target ) instanceof Diagram ) { targetName = ( ( Diagram ) ( _target ) ) . getName ( ) ; } int numRows = 0 ; if ( ( _tableModel ) != null ) numRows = _tableModel . getRowCount ( ) ; _contextLabel . setText ( ( "Table<seq2seq4repair_space>view<seq2seq4repair_space>of:<seq2seq4repair_space>" + targetName ) ) ; String numRowsStr = "0000" + numRows ; numRowsStr = numRowsStr . substring ( ( ( numRowsStr . length ( ) ) - 3 ) ) ; _sizeLabel . setText ( ( ( "<seq2seq4repair_space>[Rows:<seq2seq4repair_space>" + numRowsStr ) + "]" ) ) ; } public Object getTarget ( ) { } public void refresh ( ) { } public boolean shouldBeEnabled ( ) { } public void setFilter ( ) { } public void setTablePerspective ( ) { } public void insertUpdate ( DocumentEvent e ) { } public void removeUpdate ( DocumentEvent e ) { } public void changedUpdate ( DocumentEvent e ) { } public void itemStateChanged ( ItemEvent e ) { } public void valueChanged ( ListSelectionEvent lse ) { } public void objectSelected ( Object sel ) { } public void actionPerformed ( ActionEvent ae ) { } }

Fix:
if ( e instanceof MElement )
Buggy code:
public class EventBrokerBuilderDS { private static final Log log = LogFactory . getLog ( EventBrokerBuilderDS . class ) ; private EventBrokerHandler eventBrokerHandler ; protected void activate ( ComponentContext context ) { this . eventBrokerHandler = new EventBrokerHandler ( context ) ; boolean isQpidBundlePresent = false ; final BundleContext bundleContext = context . getBundleContext ( ) ; for ( Bundle bundle : bundleContext . getBundles ( ) ) { <START_BUG> if ( ( bundle . getSymbolicName ( ) . equals ( "org.wso2.carbon.andes" ) ) || ( bundle . getSymbolicName ( ) . equals ( "org.wso2.carbon.qpid" ) ) ) { <END_BUG> isQpidBundlePresent = true ; break ; } } if ( isQpidBundlePresent ) { context . getBundleContext ( ) . registerService ( EventBundleNotificationService . class . getName ( ) , this . eventBrokerHandler , null ) ; } else { this . eventBrokerHandler . startEventBroker ( ) ; } } protected void deactivate ( ComponentContext context ) { } protected void setRegistryService ( RegistryService registryService ) { } protected void unsetRegistryService ( RegistryService registryService ) { } protected void setRealmService ( RealmService realmService ) { } protected void unsetRealmService ( RealmService realmService ) { } protected void setConfigurationContextService ( ConfigurationContextService configurationContextService ) { } protected void unsetConfigurationContextService ( ConfigurationContextService configurationContextService ) { } }

Fix:
if ( bundle . getSymbolicName ( ) . equals ( "org.wso2.carbon.qpid" ) ) {
Buggy code:
public class FunctionHelper extends JDialog implements ActionListener , ChangeListener { JLabeledChoice functionList ; ArgumentsPanel parameterPanel ; JLabeledTextField cutPasteFunction ; private Map functionMap = new HashMap ( ) ; JButton generateButton ; public FunctionHelper ( ) { } private void init ( ) { } private void initializeFunctionList ( ) { } public void stateChanged ( ChangeEvent event ) { } public void actionPerformed ( ActionEvent e ) { StringBuffer functionCall = new StringBuffer ( "${" ) ; functionCall . append ( functionList . getText ( ) ) ; Arguments args = ( ( Arguments ) ( parameterPanel . createTestElement ( ) ) ) ; if ( ( args . getArguments ( ) . size ( ) ) > 0 ) { functionCall . append ( "(" ) ; PropertyIterator iter = args . iterator ( ) ; boolean first = true ; while ( iter . hasNext ( ) ) { Argument arg = ( ( Argument ) ( iter . next ( ) . getObjectValue ( ) ) ) ; if ( ! first ) { functionCall . append ( "," ) ; } <START_BUG> functionCall . append ( ( ( String ) ( arg . getValue ( ) ) ) ) ; <END_BUG> first = false ; } functionCall . append ( ")" ) ; } functionCall . append ( "}" ) ; cutPasteFunction . setText ( functionCall . toString ( ) ) ; } private class HelpListener implements ActionListener { public void actionPerformed ( ActionEvent e ) { String [ ] source = new String [ ] { Help . HELP_FUNCTIONS , functionList . getText ( ) } ; ActionEvent helpEvent = new ActionEvent ( source , e . getID ( ) , "help" ) ; org . apache . jmeter . gui . action . ActionRouter . getInstance ( ) . actionPerformed ( helpEvent ) ; } } }

Fix:
functionCall . append ( arg . getValue ( ) ) ;
Buggy code:
public class EmptyTile extends Tile { public EmptyTile ( boolean nwall , boolean wwall , boolean swall , boolean ewall ) { } @ Override public boolean walkable ( ) { <START_BUG> return true ; <END_BUG> } public String toString ( ) { } }

Fix:
return ( occupant ) == null ;
Buggy code:
public class PublicMessage extends Message { private HashTag topic ; private Location location ; @ Override public MessageType getType ( ) { } public HashTag getTopic ( ) { } public void setTopic ( HashTag topic ) { } public Location getLocation ( ) { } public void setLocation ( Location location ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( ( ( "{PrivateMessage:<seq2seq4repair_space>id=" + ( this . getId ( ) ) ) + ",<seq2seq4repair_space>origin=" ) + ( this . getOrigin ( ) ) ) + ",<seq2seq4repair_space>message=" ) + ( this . getMessage ( ) ) ) + ",<seq2seq4repair_space>sentTimestamp=" ) + ( this . getSentTimestamp ( ) ) ) + ",<seq2seq4repair_space>topic=" ) + ( this . topic ) ) + ",<seq2seq4repair_space>location=" ) + ( this . location ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( ( ( ( ( "{PublicMessage:<seq2seq4repair_space>id=" + ( this . getId ( ) ) ) + ",<seq2seq4repair_space>origin=" ) + ( this . getOrigin ( ) ) ) + ",<seq2seq4repair_space>message=" ) + ( this . getMessage ( ) ) ) + ",<seq2seq4repair_space>sentTimestamp=" ) + ( this . getSentTimestamp ( ) ) ) + ",<seq2seq4repair_space>topic=" ) + ( this . topic ) ) + ",<seq2seq4repair_space>location=" ) + ( this . location ) ) + "}" ;
Buggy code:
public class ServerStartup { static TCPServerSOContainerGroup [ ] serverGroups = null ; static final String SERVER_FILE_NAME = "ServerStartup.xml" ; static List servers = new ArrayList ( ) ; public ServerStartup ( ) throws Exception { } protected boolean isActive ( ) { } public void dispose ( ) { } protected synchronized void destroyServers ( ) { } protected synchronized void createServers ( InputStream ins ) throws Exception { } protected void registerServer ( ISharedObjectContainer cont ) throws URISyntaxException { <START_BUG> DiscoveryStartup . registerService ( cont . getConfig ( ) . getID ( ) . toURI ( ) ) ; <END_BUG> } protected TCPServerSOContainerGroup makeServerGroup ( String name , int port ) { } protected TCPServerSOContainer makeServerContainer ( String id , TCPServerSOContainerGroup group , String path , int keepAlive ) throws IDInstantiationException { } }

Fix:
DiscoveryStartup . registerService ( cont . getID ( ) . toURI ( ) ) ;
Buggy code:
public class Controller { private PDDLProblem model = null ; private boolean fileChangedFlag = false ; private Vector < ActionListener > listeners = null ; public Controller ( ) { } public Controller ( File selectedFile ) throws IOException { } public boolean pendingChanges ( ) { } public void addActionListener ( final ActionListener listener ) { } public void removeActionListener ( final ActionListener listener ) { } public void createNewModel ( ) { } public void save ( File selectedFile ) throws PDDLModelIncompleteException , IOException { } public String getProblemName ( ) { } public void setProblemName ( String newProblemName ) { } public final Vector < Location > getLocations ( ) { } public Location getLocationByName ( String name ) { } public void addNewLocaiton ( ) { } public void removeLocation ( Location location ) { } public void setLocationName ( Location location , String newName ) { } public void setLocationRemainingCapacity ( Location location , Integer capacity ) { <START_BUG> if ( capacity . equals ( location . getRemainingCapacity ( ) ) ) { <END_BUG> location . setRemainingCapacity ( capacity ) ; ActionEvent event = new ActionEvent ( location , ActionEvent . ACTION_PERFORMED , Constants . OPERATION_UPDATE ) ; notifyListeners ( event ) ; fileChangedFlag = true ; } } public void removeLocationRemainingCapacity ( Location location ) { } public void addNewVehicle ( ) { } public void removeVehicle ( Vehicle vehicle ) { } public void setVehicleName ( Vehicle vehicle , String newName ) { } public void setVehicleRemainingCapacity ( Vehicle vehicle , int remainingCapacity ) { } public void setVehicleLoadingTime ( Vehicle vehicle , Location loc , Integer loadingTime ) { } public void removeVehicleLoadingTime ( Vehicle vehicle , Location location ) { } public void setVehicleUnloadingTime ( Vehicle vehicle , Location loc , Integer unloadingTime ) { } public void removeVehicleUnloadingTime ( Vehicle vehicle , Location location ) { } public void setVehicleInitialLocation ( Vehicle vehicle , Location location ) { } public void setVehicleAvailableIn ( Vehicle vehicle , int availableIn ) { } public void setVehicleRoute ( Vehicle vehicle , Location origin , Location destination , Integer travelTime ) { } public void removeVehicleRoute ( Vehicle vehicle , Location origin , Location destination ) { } public void addNewCargo ( ) { } public void removeCargo ( Cargo cargo ) { } public void updateCargoName ( Cargo cargo , String newName ) { } public void setCargoPickupLocation ( Cargo cargo , Location location ) { } public void setCargoDeliveryLocation ( Cargo cargo , Location location ) { } public void updateCargoSize ( Cargo cargo , int size ) { } public void setCargoAvailableIn ( Cargo cargo , Integer availableIn ) { } public void setCargoRequiredBy ( Cargo cargo , Integer requiredBy ) { } public void removeCargoRequiredBy ( Cargo cargo ) { } public void invokeCreationEvents ( ) { } private void notifyListeners ( final ActionEvent event ) { } }

Fix:
if ( ! ( capacity . equals ( location . getRemainingCapacity ( ) ) ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( TwoModulesJarTestCase . ModuleAcDeploymentTestCaseSetup . class ) public class TwoModulesJarTestCase extends TwoModulesFlatTestCase { static class ModuleAcDeploymentTestCaseSetup extends AbstractModuleDeploymentTestCaseSetup { public static ModelNode address1 ; @ Override public void doSetup ( ManagementClient managementClient ) throws Exception { } @ Override public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { super . tearDown ( managementClient , containerId ) ; remove ( TwoModulesJarTestCase . ModuleAcDeploymentTestCaseSetup . address1 ) ; <START_BUG> removeModule ( "org//jboss//ironjacamar//ra16out1" ) ; <END_BUG> } @ Override protected String getSlot ( ) { } } @ Test @ RunAsClient public void testConnection2 ( ) throws Exception { } @ Override protected ModelNode getAddress ( ) { } }

Fix:
removeModule ( "org//jboss//ironjacamar//ra16out1" , true ) ;
Buggy code:
public interface IComponentInheritedModel extends IModel { <START_BUG> INestedModelContainer wrapOnInheritance ( Component component ) ; <END_BUG> }

Fix:
IWrapModel wrapOnInheritance ( Component component ) ;
Buggy code:
public class MenuScreen implements Screen , MenuInterface { public static String PLAY = "play" ; public static String SETTINGS = "settings" ; public static final float FRUSTUM_WIDTH = 150 ; public static final float FRUSTUM_HEIGHT = 100 ; private ShveetLife shveetLife ; private Accounts accounts ; private Viewport viewport ; private OrthographicCamera cam ; private MenuButton myButton ; private MenuWorld menuWorld ; private MenuRenderer menuRenderer ; private boolean isTouched ; private Vector3 touchPoint ; SpriteBatch batch ; Texture background ; private MovementAnimator myAnimator = new MovementAnimator ( 15 , 5 , 2 , Interpolation . LINEAR_INTERPOLATOR ) ; public MenuScreen ( ShveetLife sl ) { } @ Override public void show ( ) { } @ Override public void render ( float delta ) { } private void updateInput ( ) { } private void update ( float delta ) { } private void draw ( ) { } @ Override public void playGame ( ) { } @ Override public void connect ( ) { <START_BUG> GameScreen myGameScreen = new GameScreen ( shveetLife , DataManager . startManager ( "192.168.1.5" , "localhost" ) ) ; <END_BUG> DataManager . receiveData ( ) ; shveetLife . setScreen ( new GameScreen ( shveetLife ) ) ; } @ Override public void settings ( ) { } @ Override public void resize ( int width , int height ) { } @ Override public void pause ( ) { } @ Override public void resume ( ) { } @ Override public void hide ( ) { } @ Override public void dispose ( ) { } }

Fix:
GameScreen myGameScreen = new GameScreen ( shveetLife , DataManager . startManager ( "10.228.7.220" , "10.228.7.220" ) ) ;
Buggy code:
public class BundleInstallService implements Service < BundleInstallService > { private static final Logger log = Logger . getLogger ( "org.jboss.as.osgi" ) ; public static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "osgi" , "deployment" ) ; private final Deployment deployment ; private InjectedValue < BundleManagerService > injectedBundleManager = new InjectedValue < BundleManagerService > ( ) ; private InjectedValue < BundleStartTracker > injectedStartTracker = new InjectedValue < BundleStartTracker > ( ) ; private ServiceName installedBundleName ; private BundleInstallService ( Deployment deployment ) { } public static void addService ( DeploymentPhaseContext phaseContext , Deployment deployment ) { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final BundleInstallService service = new BundleInstallService ( deployment ) ; final String contextName = deploymentUnit . getName ( ) ; final ServiceName serviceName = BundleInstallService . getServiceName ( contextName ) ; final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; ServiceBuilder < BundleInstallService > builder = serviceTarget . addService ( serviceName , service ) ; builder . addDependency ( BUNDLE_MANAGER , BundleManagerService . class , service . injectedBundleManager ) ; builder . addDependency ( SERVICE_NAME , BundleStartTracker . class , service . injectedStartTracker ) ; builder . addDependency ( deploymentUnitName ( contextName ) ) ; <START_BUG> builder . addDependency ( FRAMEWORK_ACTIVE ) ; <END_BUG> builder . install ( ) ; } public static void removeService ( DeploymentUnit depUnit ) { } public static ServiceName getServiceName ( String contextName ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { } @ Override public BundleInstallService getValue ( ) throws IllegalStateException { } public ServiceName getInstalledBundleName ( ) { } }

Fix:
builder . addDependency ( FRAMEWORK_ACTIVATOR ) ;
Buggy code:
public class DocumentFragmentImpl extends NodeContainer implements DocumentFragment { static final long serialVersionUID = - 7596449967279236746L ; public DocumentFragmentImpl ( DocumentImpl ownerDoc ) { } public DocumentFragmentImpl ( ) { } public short getNodeType ( ) { } public String getNodeName ( ) { } public void setNodeValue ( String x ) throws DOMException { <START_BUG> throw new DOMExceptionImpl ( DOMException . NO_MODIFICATION_ALLOWED_ERR , "NO_MODIFICATION_ALLOWED_ERR" ) ; <END_BUG> } }

Fix:
throw new DOMExceptionImpl ( DOMException . NO_MODIFICATION_ALLOWED_ERR , "DOM001<seq2seq4repair_space>Modification<seq2seq4repair_space>not<seq2seq4repair_space>allowed" ) ;
Buggy code:
public class QueryTreeBuilder implements QueryBuilder { public static final String QUERY_TREE_BUILDER_TAGID = QueryTreeBuilder . class . getName ( ) ; private HashMap < Class < ? extends QueryNode > , QueryBuilder > queryNodeBuilders ; private HashMap < String , QueryBuilder > fieldNameBuilders ; public QueryTreeBuilder ( ) { } public void setBuilder ( CharSequence fieldName , QueryBuilder builder ) { } public void setBuilder ( Class < ? extends QueryNode > queryNodeClass , QueryBuilder builder ) { } private void process ( QueryNode node ) throws QueryNodeException { } private QueryBuilder getBuilder ( QueryNode node ) { QueryBuilder builder = null ; if ( ( ( this . fieldNameBuilders ) != null ) && ( node instanceof FieldableNode ) ) { CharSequence field = ( ( FieldableNode ) ( node ) ) . getField ( ) ; if ( field != null ) { field = field . toString ( ) ; } builder = this . fieldNameBuilders . get ( field ) ; } if ( ( builder == null ) && ( ( this . queryNodeBuilders ) != null ) ) { Class < ? > clazz = node . getClass ( ) ; do { builder = getQueryBuilder ( clazz ) ; if ( builder == null ) { <START_BUG> Class < ? > [ ] classes = node . getClass ( ) . getInterfaces ( ) ; <END_BUG> for ( Class < ? > actualClass : classes ) { builder = getQueryBuilder ( actualClass ) ; if ( builder != null ) { break ; } } } } while ( ( builder == null ) && ( ( clazz = clazz . getSuperclass ( ) ) != null ) ) ; } return builder ; } private void processNode ( QueryNode node , QueryBuilder builder ) throws QueryNodeException { } private QueryBuilder getQueryBuilder ( Class < ? > clazz ) { } @ Override public Object build ( QueryNode queryNode ) throws QueryNodeException { } }

Fix:
Class < ? > [ ] classes = clazz . getInterfaces ( ) ;
Buggy code:
public abstract class EntityProviderService < T extends PicketLinkFederationService < T > , C extends ProviderConfiguration > implements PicketLinkFederationService < T > { private final InjectedValue < FederationService > federationService = new InjectedValue < FederationService > ( ) ; private final PicketLinkType picketLinkType ; private volatile PicketLinkSubsystemMetrics metrics ; public EntityProviderService ( C configuration ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public void configure ( DeploymentUnit deploymentUnit ) { } @ Override public PicketLinkSubsystemMetrics getMetrics ( ) { } protected List < Class < ? extends SAML2Handler > > getDefaultHandlers ( ) { } private void configureKeyProvider ( ) { } private void configureTokenProviders ( ) { } private void configureHandlers ( ) { } protected void doAddHandlers ( ) { } private void configureWarMetadata ( DeploymentUnit deploymentUnit ) { } protected abstract void configureWebComponents ( DeploymentUnit deploymentUnit ) { } protected abstract void doConfigureDeployment ( DeploymentUnit deploymentUnit ) { } @ SuppressWarnings ( "unchecked" ) @ Override public T getValue ( ) throws IllegalArgumentException , IllegalStateException { } private PicketLinkType createPicketLinkType ( C configuration ) { } void addHandler ( final Handler handler ) { Handlers handlers = getPicketLinkType ( ) . getHandlers ( ) ; for ( Handler actualHandler : new ArrayList < Handler > ( handlers . getHandler ( ) ) ) { if ( actualHandler . getClazz ( ) . equals ( handler . getClazz ( ) ) ) { <START_BUG> throw ROOT_LOGGER . federationHandlerAlreadyDefined ( handler . getClazz ( ) ) ; <END_BUG> } } handlers . add ( handler ) ; } void addHandler ( Class < ? extends SAML2Handler > handlerClassName , Handlers handlers ) { } void removeHandler ( final Handler handler ) { } @ SuppressWarnings ( "unchecked" ) public C getConfiguration ( ) { } private STSType createSTSType ( ) { } public InjectedValue < FederationService > getFederationService ( ) { } PicketLinkType getPicketLinkType ( ) { } }

Fix:
throw ROOT_LOGGER . typeAlreadyDefined ( handler . getClazz ( ) ) ;
Buggy code:
public class ErrorHandler { private static final String title = "Error" ; private static final String desc = "opsu!<seq2seq4repair_space>has<seq2seq4repair_space>encountered<seq2seq4repair_space>an<seq2seq4repair_space>error." ; private static final String descR = "opsu!<seq2seq4repair_space>has<seq2seq4repair_space>encountered<seq2seq4repair_space>an<seq2seq4repair_space>error.<seq2seq4repair_space>Please<seq2seq4repair_space>report<seq2seq4repair_space>this!" ; private static final String [ ] options = new String [ ] { "View<seq2seq4repair_space>Error<seq2seq4repair_space>Log" , "Close" } ; private static final String [ ] optionsR = new String [ ] { "Send<seq2seq4repair_space>Report" , "View<seq2seq4repair_space>Error<seq2seq4repair_space>Log" , "Close" } ; private static final JTextArea textArea = new JTextArea ( 7 , 30 ) ; private static final JScrollPane scroll = new JScrollPane ( ErrorHandler . textArea ) ; private static final Object [ ] message = new Object [ ] { ErrorHandler . desc , ErrorHandler . scroll } ; private static final Object [ ] messageR = new Object [ ] { ErrorHandler . descR , ErrorHandler . scroll } ; private ErrorHandler ( ) { } public static void error ( String error , Throwable e , boolean report ) { if ( ( error == null ) && ( e == null ) ) return ; if ( error == null ) Log . error ( e ) ; else if ( e == null ) Log . error ( error ) ; else Log . error ( error , e ) ; ErrorHandler . textArea . setText ( null ) ; if ( error != null ) { ErrorHandler . textArea . append ( error ) ; ErrorHandler . textArea . append ( "\n" ) ; } if ( e != null ) { StringWriter sw = new StringWriter ( ) ; e . printStackTrace ( new PrintWriter ( sw ) ) ; ErrorHandler . textArea . append ( sw . toString ( ) ) ; } try { UIManager . setLookAndFeel ( UIManager . getSystemLookAndFeelClassName ( ) ) ; if ( Desktop . isDesktopSupported ( ) ) { if ( report ) { int n = JOptionPane . showOptionDialog ( null , ErrorHandler . messageR , ErrorHandler . title , JOptionPane . DEFAULT_OPTION , JOptionPane . ERROR_MESSAGE , null , ErrorHandler . optionsR , ErrorHandler . optionsR [ 2 ] ) ; if ( n == 0 ) { Desktop . getDesktop ( ) . browse ( ISSUES_URI ) ; Desktop . getDesktop ( ) . open ( LOG_FILE ) ; } else if ( n == 1 ) Desktop . getDesktop ( ) . open ( LOG_FILE ) ; } else { <START_BUG> int n = JOptionPane . showOptionDialog ( null , ErrorHandler . message , ErrorHandler . title , JOptionPane . DEFAULT_OPTION , JOptionPane . ERROR_MESSAGE , null , ErrorHandler . options , ErrorHandler . optionsR [ 1 ] ) ; <END_BUG> if ( n == 0 ) Desktop . getDesktop ( ) . open ( LOG_FILE ) ; } } else { JOptionPane . showMessageDialog ( null , ( report ? ErrorHandler . messageR : ErrorHandler . message ) , ErrorHandler . title , JOptionPane . ERROR_MESSAGE ) ; } } catch ( Exception e1 ) { Log . error ( "Error<seq2seq4repair_space>opening<seq2seq4repair_space>crash<seq2seq4repair_space>popup." , e1 ) ; } } }

Fix:
int n = JOptionPane . showOptionDialog ( null , ErrorHandler . message , ErrorHandler . title , JOptionPane . DEFAULT_OPTION , JOptionPane . ERROR_MESSAGE , null , ErrorHandler . options , ErrorHandler . options [ 1 ] ) ;
Buggy code:
public class Group extends Composite { static final int CLIENT_INSET = 3 ; static final int GroupProc ; static final TCHAR GroupClass = new TCHAR ( 0 , ( OS . IsWinCE ? "BUTTON" : "SWT_GROUP" ) , true ) ; public Group ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createHandle ( ) { } public Rectangle getClientArea ( ) { } String getNameText ( ) { } public String getText ( ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } public void setText ( String string ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_NCHITTEST ( int wParam , int lParam ) { } LRESULT WM_MOUSEMOVE ( int wParam , int lParam ) { } LRESULT WM_PRINTCLIENT ( int wParam , int lParam ) { LRESULT result = super . WM_PRINTCLIENT ( wParam , lParam ) ; if ( result != null ) return result ; <START_BUG> if ( ( OS . COMCTL32_MAJOR ) >= 6 ) { <END_BUG> int nSavedDC = OS . SaveDC ( wParam ) ; int code = callWindowProc ( handle , WM_PRINTCLIENT , wParam , lParam ) ; OS . RestoreDC ( wParam , nSavedDC ) ; return new LRESULT ( code ) ; } return result ; } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmColorChild ( int wParam , int lParam ) { } }

Fix:
if ( ( ( OS . COMCTL32_MAJOR ) >= 6 ) && ( OS . IsAppThemed ( ) ) ) {
Buggy code:
public class AuthService extends IntentService { public static final String AUTH_RESULT = "AUTH-RESULT" ; private static final String HMAC_PRIVATE = "4c4a3f0d-3dff-475a-afcc-6ec86fc0b126" ; public AuthService ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private void getDigestData ( String userName , String password ) { } private void getHmacData ( String userName ) { } private void getOauthData ( String userName , String password , OauthData data ) { } private void getWindowsData ( String url , String userName , String password , String domain ) { } private void getFormsData ( String cookie ) { } private void getBasicData ( String user , String password ) { BasicHelper http = new BasicHelper ( ) ; String webResult ; int result = 2 ; try { webResult = http . getPersonJson ( user , password ) ; if ( ! ( webResult . equalsIgnoreCase ( "" ) ) ) { result = Activity . RESULT_OK ; } } catch ( IOException e ) { webResult = "" ; Log . d ( getClass ( ) . getName ( ) , "Exception<seq2seq4repair_space>calling<seq2seq4repair_space>service" , e ) ; } <START_BUG> sendResult ( webResult , AuthService . AUTH_RESULT , "oauth-data" , result ) ; <END_BUG> } private void sendResult ( String data , String name , String action , int result ) { } private void sendResult ( OauthData data , String name , String action , int result ) { } }

Fix:
sendResult ( webResult , AuthService . AUTH_RESULT , "basic-data" , result ) ;
Buggy code:
public class DLanguageSdkType extends SdkType { private static final Logger LOG = Logger . getInstance ( DLanguageSdkType . class ) ; public DLanguageSdkType ( ) { } @ NotNull public static DLanguageSdkType getInstance ( ) { } @ Override public Icon getIcon ( ) { } @ Nullable @ Override public AdditionalDataConfigurable createAdditionalDataConfigurable ( SdkModel sdkModel , SdkModificator sdkModificator ) { } @ Override public String getPresentableName ( ) { } @ Override public void saveAdditionalData ( @ NotNull SdkAdditionalData additionalData , @ NotNull Element additional ) { } @ Override public boolean isValidSdkHome ( String path ) { } @ NotNull public static File getCompilerExecutable ( @ NotNull String sdkHome ) { <START_BUG> return new File ( FileUtil . join ( new File ( sdkHome , "bin" ) . getAbsolutePath ( ) , "dmd" ) ) ; <END_BUG> } @ Override public String suggestSdkName ( String currentSdkName , String sdkHome ) { } @ Nullable @ Override public String getVersionString ( @ NotNull String sdkHome ) { } @ Nullable @ Override public String suggestHomePath ( ) { } @ Override public boolean setupSdkPaths ( Sdk sdk , SdkModel sdkModel ) { } @ NotNull public static File getExecutable ( @ NotNull final String path ) { } @ Nullable public static File getExecutable ( @ NotNull final Project project ) { } public static String getDSdkPath ( @ NotNull Project project ) { } }

Fix:
return new File ( FileUtil . join ( new File ( sdkHome , "bin" ) . getAbsolutePath ( ) , ( SystemInfo . isWindows ? "dmd.exe" : "dmd" ) ) ) ;
Buggy code:
public class ShortSocketServer { static Category cat = Category . getInstance ( ShortSocketServer . class . getName ( ) ) ; static int port ; static int delay ; static void delay ( int amount ) { } public static void main ( String [ ] argv ) { if ( ( argv . length ) == 3 ) ShortSocketServer . init ( argv [ 0 ] , argv [ 1 ] , argv [ 2 ] ) ; else ShortSocketServer . usage ( "Wrong<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>arguments." ) ; try { LogLog . debug ( ( "Listening<seq2seq4repair_space>on<seq2seq4repair_space>port<seq2seq4repair_space>" + ( ShortSocketServer . port ) ) ) ; ServerSocket serverSocket = new ServerSocket ( ShortSocketServer . port ) ; LogLog . debug ( "Waiting<seq2seq4repair_space>to<seq2seq4repair_space>accept<seq2seq4repair_space>a<seq2seq4repair_space>new<seq2seq4repair_space>client." ) ; Socket socket = serverSocket . accept ( ) ; LogLog . debug ( ( "Connected<seq2seq4repair_space>to<seq2seq4repair_space>client<seq2seq4repair_space>at<seq2seq4repair_space>" + ( socket . getInetAddress ( ) ) ) ) ; LogLog . debug ( "Starting<seq2seq4repair_space>new<seq2seq4repair_space>socket<seq2seq4repair_space>node." ) ; <START_BUG> SocketNode sn = new SocketNode ( socket ) ; <END_BUG> Thread t = new Thread ( sn ) ; t . start ( ) ; t . join ( ) ; } catch ( Exception e ) { ShortSocketServer . cat . error ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>in<seq2seq4repair_space>main." , e ) ; } } static void usage ( String msg ) { } static void init ( String portStr , String configFile , String delayStr ) { } }

Fix:
SocketNode sn = new SocketNode ( socket , Category . getDefaultHierarchy ( ) ) ;
Buggy code:
public class Utils { public static < T > T selectRandom ( Collection < T > source , final T ... toFilter ) { } public static < T > List < T > filter ( Collection < T > source , final T ... toFilter ) { } public static < T > void selectMultipleRandom ( Collection < T > source , Collection < T > dest , int maxCount ) { } public static < T > void selectMultipleRandom ( Collection < T > source , Collection < T > dest , Collection < T > filter , int maxCount ) { <START_BUG> if ( ( dest == null ) || ( dest . isEmpty ( ) ) ) <END_BUG> return ; List < T > copy = new ArrayList < > ( source ) ; Collections . shuffle ( copy ) ; int max = Math . min ( maxCount , source . size ( ) ) ; int cnt = 0 ; for ( T t : copy ) { if ( ( ! ( dest . contains ( t ) ) ) && ( ! ( filter . contains ( t ) ) ) ) { dest . add ( t ) ; cnt ++ ; if ( cnt == max ) break ; } } } public static void serialize ( InetAddress addr , DataOutputPlus out ) throws IOException { } public static int serializeSize ( InetAddress addr ) { } public static InetAddress deserialize ( DataInput in ) throws IOException { } }

Fix:
if ( dest == null )