nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestDateSort extends LuceneTestCase { private static final String TEXT_FIELD = "text" ; private static final String DATE_TIME_FIELD = "dateTime" ; private static Directory directory ; @ Override public void setUp ( ) throws Exception { } public void testReverseDateSort ( ) throws Exception { IndexSearcher searcher = new IndexSearcher ( TestDateSort . directory , true ) ; Sort sort = new Sort ( new SortField ( TestDateSort . DATE_TIME_FIELD , SortField . STRING , true ) ) ; <START_BUG> QueryParser queryParser = new QueryParser ( Version . LUCENE_CURRENT , TestDateSort . TEXT_FIELD , new WhitespaceAnalyzer ( ) ) ; <END_BUG> Query query = queryParser . parse ( "Document" ) ; String [ ] actualOrder = new String [ 5 ] ; ScoreDoc [ ] hits = searcher . search ( query , null , 1000 , sort ) . scoreDocs ; for ( int i = 0 ; i < ( hits . length ) ; i ++ ) { Document document = searcher . doc ( hits [ i ] . doc ) ; String text = document . get ( TestDateSort . TEXT_FIELD ) ; actualOrder [ i ] = text ; } searcher . close ( ) ; String [ ] expectedOrder = new String [ 5 ] ; expectedOrder [ 0 ] = "Document<seq2seq4repair_space>5" ; expectedOrder [ 1 ] = "Document<seq2seq4repair_space>4" ; expectedOrder [ 2 ] = "Document<seq2seq4repair_space>3" ; expectedOrder [ 3 ] = "Document<seq2seq4repair_space>2" ; expectedOrder [ 4 ] = "Document<seq2seq4repair_space>1" ; assertEquals ( Arrays . asList ( expectedOrder ) , Arrays . asList ( actualOrder ) ) ; } private static Document createDocument ( String text , long time ) { } }

Fix:
QueryParser queryParser = new QueryParser ( TEST_VERSION_CURRENT , TestDateSort . TEXT_FIELD , new WhitespaceAnalyzer ( ) ) ;
Buggy code:
public class ScopedKernelServicesBootstrap { ClassLoader legacyChildFirstClassLoader ; ClassLoaderObjectConverter objectConverter ; public ScopedKernelServicesBootstrap ( ClassLoader legacyChildFirstClassLoader ) { } public LegacyControllerKernelServicesProxy createKernelServices ( String mainSubsystemName , String extensionClassName , AdditionalInitialization additionalInit , ModelTestOperationValidatorFilter validateOpsFilter , List < ModelNode > bootOperations , ModelVersion legacyModelVersion , boolean persistXml ) throws Exception { } private Object createChildClassLoaderKernelServices ( String mainSubsystemName , String extensionClassName , AdditionalInitialization additionalInit , ModelTestOperationValidatorFilter validateOpsFilter , List < ModelNode > bootOperations , ModelVersion legacyModelVersion , boolean persistXml ) { try { Class < ? > clazz = legacyChildFirstClassLoader . loadClass ( ChildFirstClassLoaderKernelServicesFactory . class . getName ( ) ) ; Method m = clazz . getMethod ( "create" , String . class , String . class , legacyChildFirstClassLoader . loadClass ( AdditionalInitialization . class . getName ( ) ) , legacyChildFirstClassLoader . loadClass ( ModelTestOperationValidatorFilter . class . getName ( ) ) , List . class , legacyChildFirstClassLoader . loadClass ( ModelVersion . class . getName ( ) ) , Boolean . TYPE ) ; List < Object > convertedBootOps = new ArrayList < Object > ( ) ; for ( int i = 0 ; i < ( bootOperations . size ( ) ) ; i ++ ) { ModelNode node = bootOperations . get ( i ) ; if ( node != null ) { convertedBootOps . add ( objectConverter . convertModelNodeToChildCl ( node ) ) ; } } <START_BUG> Object convertedAdditionalInit = null ; <END_BUG> Object convertedModelVersion = objectConverter . convertModelVersionToChildCl ( legacyModelVersion ) ; Object convertedValidateOpsFilter = objectConverter . convertValidateOperationsFilterToChildCl ( validateOpsFilter ) ; return m . invoke ( null , mainSubsystemName , extensionClassName , convertedAdditionalInit , convertedValidateOpsFilter , convertedBootOps , convertedModelVersion , persistXml ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } }

Fix:
Object convertedAdditionalInit = objectConverter . convertAdditionalInitializationToChildCl ( additionalInit ) ;
Buggy code:
public class StrategyContextImpl implements StrategyContext { private static final Logger log = LoggerFactory . getLogger ( StrategyContextImpl . class ) ; private static final ModeStrategyImpl defaultMode = new ModeDefault ( ) ; private final Factory factory ; private final MultiversePortals multiversePortals ; private final WorldGuard worldGuard ; private String eventType ; private Player player ; private Location location ; private Location fromLocation ; private String arg ; private transient boolean isDistanceCheckEnabled = false ; private List < ModeStrategy > currentModes ; @ Inject public StrategyContextImpl ( Factory factory , MultiversePortals multiversePortals , WorldGuard worldGuard ) { } @ Override public String getEventType ( ) { } @ Override public void setEventType ( String eventType ) { } @ Override public Player getPlayer ( ) { } @ Override public Location getEventLocation ( ) { } @ Override public Location getLocation ( ) { } @ Override public void setLocation ( Location location ) { } @ Override public Location getFromLocation ( ) { } @ Override public void setFromLocation ( Location fromLocation ) { } @ Override public void setPlayer ( Player player ) { } @ Override public List < ModeStrategy > getCurrentModes ( ) { } @ Override public void addMode ( ModeStrategy mode ) { } @ Override public void resetCurrentModes ( ) { } private boolean isDefaultMode ( final StrategyMode mode ) { } @ Override public boolean isInHomeDefaultMode ( ) { } @ Override public boolean isDefaultModeEnabled ( ) { } @ Override public boolean isModeEnabled ( final StrategyMode mode ) { } @ Override public ModeStrategy getMode ( final StrategyMode mode ) { } @ Override public List < ModeStrategy > getModeList ( final StrategyMode mode ) { } public void clearEffectModes ( ) { } @ Override public boolean isStrategyProcessingAllowed ( ) { } @ Override public TeleportOptions getTeleportOptions ( ) { } @ Override public boolean checkDistance ( final Location newLocation ) { if ( ! ( isDistanceCheckEnabled ) ) return true ; final ModeStrategy mode = getMode ( MODE_DISTANCE_LIMITS ) ; if ( mode != null ) { final Location anchor = getEventLocation ( ) ; if ( ( anchor == null ) || ( newLocation == null ) ) return false ; <START_BUG> if ( ( anchor . getWorld ( ) ) != ( newLocation . getWorld ( ) ) ) <END_BUG> return false ; ModeDistanceLimits limits = ( ( ModeDistanceLimits ) ( mode ) ) ; double distance = anchor . distance ( newLocation ) ; if ( ( distance >= ( limits . getMinDistance ( ) ) ) && ( distance <= ( limits . getMaxDistance ( ) ) ) ) return true ; else return false ; } else { return true ; } } @ Override public String getArg ( ) { } @ Override public void setArg ( String arg ) { } public String toString ( ) { } }

Fix:
if ( ! ( anchor . getWorld ( ) . getName ( ) . equals ( newLocation . getWorld ( ) . getName ( ) ) ) )
Buggy code:
public class TestPlanGui extends AbstractJMeterGuiComponent { JCheckBox functionalMode ; ArgumentsPanel argsPanel ; public TestPlanGui ( ) { } public JPopupMenu createPopupMenu ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement plan ) { } public String getStaticLabel ( ) { } public Collection getMenuCategories ( ) { } public void configure ( TestElement el ) { super . configure ( el ) ; functionalMode . setSelected ( ( ( AbstractTestElement ) ( el ) ) . getPropertyAsBoolean ( FUNCTIONAL_MODE ) ) ; if ( ( el . getProperty ( USER_DEFINED_VARIABLES ) ) != null ) { <START_BUG> argsPanel . configure ( ( ( Arguments ) ( el . getProperty ( USER_DEFINED_VARIABLES ) ) ) ) ; <END_BUG> } } protected JPanel getVariablePanel ( ) { } private void init ( ) { } }

Fix:
argsPanel . configure ( ( ( Arguments ) ( el . getProperty ( USER_DEFINED_VARIABLES ) . getObjectValue ( ) ) ) ) ;
Buggy code:
public class RTestPlayerListener extends PlayerListener { static String message = "" ; static int EorD = 0 ; static int seconds = 0 ; public static Main plugin ; public RTestPlayerListener ( Main instance ) { } public static void enable ( ) { } public static void disable ( ) { } public void onPlayerChat ( PlayerChatEvent event ) { Player player = event . getPlayer ( ) ; String name = player . getDisplayName ( ) ; if ( ( player . hasPermission ( "RTest.Member" ) ) || ( player . hasPermission ( "RTest.Admin" ) ) ) { Player [ ] players = RTestPlayerListener . plugin . getServer ( ) . getOnlinePlayers ( ) ; if ( ( event . getMessage ( ) . equals ( dNum1 ) ) && ( ( RTestPlayerListener . EorD ) == 1 ) ) { ConsoleCommandSender console = Bukkit . getConsoleSender ( ) ; RTestPlayerListener . plugin . getServer ( ) . dispatchCommand ( console , ( ( ( "money<seq2seq4repair_space>give<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>" ) + ( Main . reward ( ) ) ) ) ; for ( int i = 0 ; i < ( players . length ) ; i ++ ) players [ i ] . sendMessage ( new StringBuilder ( ) . append ( RED ) . append ( ( ( "The<seq2seq4repair_space>Winner<seq2seq4repair_space>is:<seq2seq4repair_space>" + name ) + "." ) ) . append ( RTestPlayerListener . message ) . toString ( ) ) ; log . info ( "[RTest]<seq2seq4repair_space>Displaying<seq2seq4repair_space>Winner<seq2seq4repair_space>to<seq2seq4repair_space>Players..." ) ; RTestPlayerListener . disable ( ) ; if ( ( Main . b ) == 1 ) { t . start ( ) ; Main . b = 0 ; } } } else { <START_BUG> if ( ( event . getMessage ( ) . equals ( dNum1 ) ) || ( ( RTestPlayerListener . EorD ) == 1 ) ) { <END_BUG> player . sendMessage ( ( ( ChatColor . GOLD ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>win<seq2seq4repair_space>a<seq2seq4repair_space>Reaction<seq2seq4repair_space>Test" ) ) ; player . sendMessage ( ( ( ChatColor . GOLD ) + "Congratulations<seq2seq4repair_space>Though<seq2seq4repair_space>for<seq2seq4repair_space>Getting<seq2seq4repair_space>it<seq2seq4repair_space>right!" ) ) ; } else { if ( ( RTestPlayerListener . EorD ) == 1 ) { player . sendMessage ( ( ( ChatColor . GOLD ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>win<seq2seq4repair_space>a<seq2seq4repair_space>Reaction<seq2seq4repair_space>Test" ) ) ; } } } } No newline ; at end ; of file ; }

Fix:
if ( ( event . getMessage ( ) . equals ( dNum1 ) ) && ( ( RTestPlayerListener . EorD ) == 1 ) ) {
Buggy code:
public class SocketNode implements Runnable , Pauseable { static Logger logger = Logger . getLogger ( SocketNode . class ) ; private boolean paused ; private Socket socket ; private LoggerRepository hierarchy ; private Receiver receiver ; private SocketNodeEventListener listener ; private EventListenerList listenerList = new EventListenerList ( ) ; public SocketNode ( Socket socket , LoggerRepository hierarchy ) { } public SocketNode ( Socket socket , Receiver receiver ) { } public void setListener ( SocketNodeEventListener _listener ) { } public void addSocketNodeEventListener ( SocketNodeEventListener listener ) { } public void removeSocketNodeEventListener ( SocketNodeEventListener listener ) { } public void run ( ) { LoggingEvent event ; Logger remoteLogger ; Exception listenerException = null ; ObjectInputStream ois = null ; try { ois = new ObjectInputStream ( new BufferedInputStream ( socket . getInputStream ( ) ) ) ; } catch ( Exception e ) { ois = null ; listenerException = e ; SocketNode . logger . error ( ( "Exception<seq2seq4repair_space>opening<seq2seq4repair_space>ObjectInputStream<seq2seq4repair_space>to<seq2seq4repair_space>" + ( socket ) ) , e ) ; } if ( ois != null ) { String remoteInfo = ( ( socket . getInetAddress ( ) . getHostName ( ) ) + ":" ) + ( socket . getPort ( ) ) ; fireSocketOpened ( remoteInfo ) ; try { while ( true ) { event = ( ( LoggingEvent ) ( ois . readObject ( ) ) ) ; event . setProperty ( "log4j.remoteSourceInfo" , remoteInfo ) ; if ( ! ( isPaused ( ) ) ) { if ( ( receiver ) != null ) { receiver . doPost ( event ) ; } else { remoteLogger = hierarchy . getLogger ( event . getLoggerName ( ) ) ; if ( event . getLevel ( ) . isGreaterOrEqual ( remoteLogger . getEffectiveLevel ( ) ) ) { remoteLogger . callAppenders ( event ) ; } } } else { } } } catch ( EOFException e ) { SocketNode . logger . info ( "Caught<seq2seq4repair_space>java.io.EOFException<seq2seq4repair_space>closing<seq2seq4repair_space>conneciton." ) ; listenerException = e ; } catch ( SocketException e ) { SocketNode . logger . info ( "Caught<seq2seq4repair_space>java.net.SocketException<seq2seq4repair_space>closing<seq2seq4repair_space>conneciton." ) ; listenerException = e ; } catch ( IOException e ) { SocketNode . logger . info ( ( "Caught<seq2seq4repair_space>java.io.IOException:<seq2seq4repair_space>" + e ) ) ; SocketNode . logger . info ( "Closing<seq2seq4repair_space>connection." ) ; listenerException = e ; } catch ( Exception e ) { SocketNode . logger . error ( "Unexpected<seq2seq4repair_space>exception.<seq2seq4repair_space>Closing<seq2seq4repair_space>connecition." , e ) ; listenerException = e ; } } try { if ( ois != null ) { ois . close ( ) ; } } catch ( Exception e ) { } <START_BUG> if ( ( listener ) != null ) { <END_BUG> fireSocketClosedEvent ( listenerException ) ; } } private void fireSocketClosedEvent ( Exception listenerException ) { } private void fireSocketOpened ( String remoteInfo ) { } public void setPaused ( boolean paused ) { } public boolean isPaused ( ) { } }

Fix:
if ( ( ( listener ) != null ) || ( ( listenerList . getListenerCount ( ) ) > 0 ) ) {
Buggy code:
public class StandardTypeLocatorTests { @ Test public void testImports ( ) throws EvaluationException { StandardTypeLocator locator = new StandardTypeLocator ( ) ; Assert . assertEquals ( Integer . class , locator . findType ( "java.lang.Integer" ) ) ; Assert . assertEquals ( String . class , locator . findType ( "java.lang.String" ) ) ; List < String > prefixes = locator . getImportPrefixes ( ) ; Assert . assertEquals ( 1 , prefixes . size ( ) ) ; Assert . assertTrue ( prefixes . contains ( "java.lang" ) ) ; Assert . assertFalse ( prefixes . contains ( "java.util" ) ) ; Assert . assertEquals ( Boolean . class , locator . findType ( "Boolean" ) ) ; try { locator . findType ( "URL" ) ; Assert . fail ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>failed" ) ; } catch ( EvaluationException ee ) { SpelEvaluationException sEx = ( ( SpelEvaluationException ) ( ee ) ) ; <START_BUG> Assert . assertEquals ( TYPE_NOT_FOUND , sEx . getMessageUnformatted ( ) ) ; <END_BUG> } locator . registerImport ( "java.net" ) ; Assert . assertEquals ( URL . class , locator . findType ( "URL" ) ) ; } }

Fix:
Assert . assertEquals ( TYPE_NOT_FOUND , sEx . getMessageCode ( ) ) ;
Buggy code:
public class Initializer extends FieldDeclaration { public Block block ; public int lastVisibleFieldID ; public int bodyStart ; public int bodyEnd ; public boolean errorInSignature = false ; public Initializer ( Block block , int modifiers ) { } public FlowInfo analyseCode ( MethodScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { <START_BUG> if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { <END_BUG> return ; } int pc = codeStream . position ; block . generateCode ( currentScope , codeStream ) ; codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public int getKind ( ) { } public boolean isStatic ( ) { } public void parseStatements ( Parser parser , TypeDeclaration typeDeclaration , CompilationUnitDeclaration unit ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( MethodScope scope ) { } public void traverse ( ASTVisitor visitor , MethodScope scope ) { } }

Fix:
if ( ( ( bits ) & ( ASTNode . IsReachable ) ) == 0 ) {
Buggy code:
public class MonitorModel extends ClipsModel { private String [ ] [ ] map ; private String direction ; private int durlastact ; private Integer time ; private Integer step ; private Integer maxduration ; private String result ; private int score ; private String l_f_waste ; private String l_d_waste ; private Integer l_drink ; private Integer l_food ; public MonitorModel ( ) { } private synchronized void init ( ) { } private synchronized void updateMap ( ) throws ClipsException { } public synchronized String [ ] [ ] getMap ( ) { } public synchronized String getDirection ( ) { } public synchronized int getScore ( ) { } public synchronized String getResult ( ) { } public synchronized int getTime ( ) { } public synchronized int getStep ( ) { } public synchronized int getMaxDuration ( ) { } public synchronized int getDurLastAct ( ) { } @ Override protected void setup ( ) throws ClipsException { } @ Override protected void action ( ) throws ClipsException { } @ Override protected boolean hasDone ( ) { <START_BUG> if ( ( ( time ) >= ( maxduration ) ) || ( ! ( result . equalsIgnoreCase ( "no" ) ) ) ) { <END_BUG> return true ; } return false ; } @ Override protected void dispose ( ) throws ClipsException { } public String [ ] [ ] findAllFacts ( String template , String conditions , String [ ] slots ) throws ClipsException { } public String getL_f_waste ( ) { } public String getL_d_waste ( ) { } public Integer getL_drink ( ) { } public Integer getL_food ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( step ) >= ( maxduration ) ) || ( ! ( result . equalsIgnoreCase ( "no" ) ) ) ) {
Buggy code:
public class AllContentModel implements XMLContentModel { private QName [ ] fAllElements = new QName [ 10 ] ; private boolean [ ] fIsOptionalElement = new boolean [ 10 ] ; private boolean fHasOptionalContent = false ; private boolean fIsMixed = false ; private int fNumElements = 0 ; private int fNumRequired = 0 ; private Hashtable fElementsHash ; private SubstitutionGroupComparator fComparator = null ; private static final boolean DEBUG_VALIDATE_CONTENT = false ; public AllContentModel ( boolean hasOptionalContent ) { } public AllContentModel ( boolean hasOptionalContent , boolean isMixed ) { } void addElement ( QName newElement , boolean isOptional ) { if ( AllContentModel . DEBUG_VALIDATE_CONTENT ) { System . out . println ( "Entering<seq2seq4repair_space>AllContentModel#addElement" ) ; } <START_BUG> if ( ( fNumElements ) < ( fAllElements . length ) ) { <END_BUG> QName [ ] newAllElements = new QName [ 2 * ( fAllElements . length ) ] ; boolean [ ] newIsOptionalElements = new boolean [ 2 * ( fIsOptionalElement . length ) ] ; System . arraycopy ( fAllElements , 0 , newAllElements , 0 , fAllElements . length ) ; System . arraycopy ( fIsOptionalElement , 0 , newIsOptionalElements , 0 , fIsOptionalElement . length ) ; fAllElements = newAllElements ; fIsOptionalElement = newIsOptionalElements ; } fAllElements [ fNumElements ] = newElement ; fIsOptionalElement [ fNumElements ] = isOptional ; ( fNumElements ) ++ ; if ( ! isOptional ) { ( fNumRequired ) ++ ; } if ( AllContentModel . DEBUG_VALIDATE_CONTENT ) { showAllElements ( ) ; System . out . println ( "Leaving<seq2seq4repair_space>AllContentModel#addElement" ) ; } } public void checkUniqueParticleAttribution ( SchemaGrammar gram ) throws Exception { } public int validateContent ( QName [ ] children , int offset , int length ) throws Exception { } public int validateContentSpecial ( QName [ ] children , int offset , int length ) throws Exception { } public void setSubstitutionGroupComparator ( SubstitutionGroupComparator comparator ) { } public int whatCanGoHere ( boolean fullyValid , InsertableElementsInfo info ) throws Exception { } public ContentLeafNameTypeVector getContentLeafNameTypeVector ( ) { } private void createElementsHash ( ) { } private void showAllElements ( ) { } }

Fix:
if ( ( fNumElements ) >= ( fAllElements . length ) ) {
Buggy code:
public class KartuPelangganPdfView extends CustomAbstractPdfView { private Perusahaan perusahaan ; private boolean contained ; private float [ ] columnWidths = new float [ ] { 3.5F , 5.0F , 4.5F , 3.0F } ; protected Font fontTableHeader = new Font ( Font . TIMES_ROMAN , 11 ) ; public static Font fontTableContent = new Font ( Font . TIMES_ROMAN , 11 ) ; @ Override protected void buildPdfDocument ( Map < String , Object > model , Document doc , PdfWriter writer , HttpServletRequest request , HttpServletResponse response ) throws Exception { } @ SuppressWarnings ( "unchecked" ) public Document create ( Map < String , Object > model , Document doc ) throws DocumentException { } private void createCard ( Document doc , List < Pelanggan > listPelanggan ) throws DocumentException { } private void createCard ( Document doc , Pelanggan pelanggan ) throws DocumentException { } public void setPerusahaan ( Perusahaan perusahaan ) { } public void setContained ( boolean bool ) { } public void setContained ( int i ) { } protected void createPage ( Document doc , Pelanggan pelanggan ) throws DocumentException { } protected void createTitle ( Paragraph paragraph ) throws DocumentException { } private void createHeadTable ( Paragraph paragraph , Pelanggan pelanggan ) throws DocumentException { } private void createPembayaranTable ( Paragraph paragraph , Pelanggan pelanggan ) { PdfPTable table = new PdfPTable ( columnWidths ) ; <START_BUG> table . setWidthPercentage ( 100.0F ) ; <END_BUG> insertCell ( table , "Bulan" , ALIGN_CENTER , 1 , fontTableHeader , BOX ) ; insertCell ( table , "Tgl<seq2seq4repair_space>Bayar" , ALIGN_CENTER , 1 , fontTableHeader , BOX ) ; insertCell ( table , "Pelanggan" , ALIGN_CENTER , 1 , fontTableHeader , BOX ) ; insertCell ( table , "Penagih" , ALIGN_CENTER , 1 , fontTableHeader , BOX ) ; if ( contained ) { setContainedTable ( table , pelanggan ) ; } else { insertEmptyCell ( table , 1 ) ; } paragraph . add ( table ) ; } private void setContainedTable ( PdfPTable table , Pelanggan pelanggan ) { } private void insertEmptyCell ( PdfPTable table , int i ) { } @ Override protected void insertCell ( PdfPTable table , String text , int align , int colspan , Font font , int border ) { } @ Override protected Document newDocument ( ) { } }

Fix:
table . setWidthPercentage ( tablePercentage ) ;
Buggy code:
public class HTTPSampleResult extends SampleResult { private String cookies = "" ; private String method ; private String redirectLocation ; private String queryString = "" ; public HTTPSampleResult ( ) { } public HTTPSampleResult ( long elapsed ) { } public HTTPSampleResult ( HTTPSampleResult res ) { } public void setHTTPMethod ( String method ) { } public String getHTTPMethod ( ) { } public void setRedirectLocation ( String redirectLocation ) { } public String getRedirectLocation ( ) { } public boolean isRedirect ( ) { } @ Override public String getSamplerData ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> sb . append ( method ) ; URL u = super . getURL ( ) ; if ( u != null ) { sb . append ( '<seq2seq4repair_space>' ) ; sb . append ( u . toString ( ) ) ; sb . append ( "\n" ) ; if ( ( POST . equals ( method ) ) || ( PUT . equals ( method ) ) ) { sb . append ( "\nPOST<seq2seq4repair_space>data:\n" ) ; sb . append ( queryString ) ; sb . append ( "\n" ) ; } if ( ( cookies . length ( ) ) > 0 ) { sb . append ( "\nCookie<seq2seq4repair_space>Data:\n" ) ; sb . append ( cookies ) ; } else { sb . append ( "\n[no<seq2seq4repair_space>cookies]" ) ; } sb . append ( "\n" ) ; } final String sampData = super . getSamplerData ( ) ; if ( sampData != null ) { sb . append ( sampData ) ; } return sb . toString ( ) ; } public String getCookies ( ) { } public void setCookies ( String string ) { } public String getQueryString ( ) { } public void setQueryString ( String string ) { } @ Override public String getDataEncodingWithDefault ( ) { } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class CharSetUtils { public CharSetUtils ( ) { } public static String squeeze ( final String str , final String ... set ) { } public static boolean containsAny ( final String str , final String ... set ) { } public static int count ( final String str , final String ... set ) { } public static String keep ( final String str , final String ... set ) { if ( str == null ) { return null ; } <START_BUG> if ( ( ( str . length ( ) ) == 0 ) || ( CharSetUtils . deepEmpty ( set ) ) ) { <END_BUG> return StringUtils . EMPTY ; } return CharSetUtils . modify ( str , set , true ) ; } public static String delete ( final String str , final String ... set ) { } private static String modify ( final String str , final String [ ] set , final boolean expect ) { } private static boolean deepEmpty ( final String [ ] strings ) { } }

Fix:
if ( ( str . isEmpty ( ) ) || ( CharSetUtils . deepEmpty ( set ) ) ) {
Buggy code:
public class CollectionSummaryView extends BaseViewWithHandlers < CollectionSummaryUiHandlers > implements IsCollectionSummaryView , ClientConstants { private static CollectionSummaryView . CollectionSummaryViewUiBinder uiBinder = GWT . create ( CollectionSummaryView . CollectionSummaryViewUiBinder . class ) ; interface CollectionSummaryViewUiBinder extends UiBinder < Widget , CollectionSummaryView > { } CollectionSummaryCBundle res ; @ UiField ListBox studentsListDropDown ; @ UiField ListBox sessionsDropDown ; @ UiField Image exportImage ; @ UiField Image sessionsTooltip ; @ UiField Image imgQuestionMark ; @ UiField InlineLabel lastModifiedTime ; @ UiField HTMLPanel collectionSummaryDetails ; @ UiField HTMLPanel sessionspnl ; @ UiField HTMLPanel loadingImageLabel1 ; @ UiField VerticalPanel pnlSummary ; @ UiField Frame downloadFile ; @ UiField Label subText ; @ UiField Label errorMessage ; Map < String , String > sessionData = new HashMap < String , String > ( ) ; ToolTip toolTip ; private static MessageProperties i18n = GWT . create ( MessageProperties . class ) ; String collectionId = null ; String pathwayId = null ; String classpageId = null ; CollectionSummaryWidget collectionSummaryWidget = new CollectionSummaryWidget ( ) ; PrintUserDataDO printUserDataDO = new PrintUserDataDO ( ) ; public CollectionSummaryView ( ) { } void setStaticData ( ) { } void setData ( ) { } public class QuestionMouseToolTip implements MouseOverHandler { String fromString = "" ; Image image ; QuestionMouseToolTip ( String fromString , Image image ) { } @ Override public void onMouseOver ( MouseOverEvent event ) { } } public class QuestionMouseOutToolTip implements MouseOutHandler { @ Override public void onMouseOut ( MouseOutEvent event ) { } } public class StudentsListChangeHandler implements ChangeHandler { @ Override public void onChange ( ChangeEvent event ) { } } public class StudentsSessionsChangeHandler implements ChangeHandler { @ Override public void onChange ( ChangeEvent event ) { } } @ Override public void setUsersData ( ArrayList < CollectionSummaryUsersDataDo > result ) { } @ Override public void setCollectionMetaData ( CollectionSummaryMetaDataDo result , String pathwayId , String classpageId ) { this . classpageId = classpageId ; this . pathwayId = pathwayId ; <START_BUG> if ( StringUtil . checkNull ( result ) ) { <END_BUG> collectionId = result . getGooruOId ( ) ; collectionSummaryWidget . setData ( result ) ; collectionSummaryDetails . add ( collectionSummaryWidget ) ; } } @ Override public void setCollectionResourcesData ( ArrayList < UserDataDo > result ) { } @ Override public void setUserSessionsData ( ArrayList < CollectionSummaryUsersDataDo > result ) { } @ Override public void setInSlot ( Object slot , Widget content ) { } public void setSessionStartTime ( int selectedIndex ) { } @ Override public HTMLPanel getLoadinImage ( ) { } @ UiHandler ( "exportImage" ) public void clickedOnExport ( ClickEvent e ) { } @ Override public Frame getFrame ( ) { } @ Override public void resetDataIfNoSessions ( ) { } }

Fix:
if ( ! ( StringUtil . checkNull ( result ) ) ) {
Buggy code:
public class FieldCameraSystem extends System { QueueMutationList < FieldCameraNode > fieldCameraNodes = new QueueMutationList < FieldCameraNode > ( 2 ) ; public GridSystem gridSystem ; public FieldSystem fieldSystem ; public Vector2 vector = new Vector2 ( ) ; public FieldCameraSystem ( GridSystem gridSystem , FieldSystem fieldSystem ) { } @ Override public void addNode ( Node node ) { } @ Override public void removeNode ( Node node ) { } @ Override public void step ( double ct , double dt ) { QueueMutationList < FieldNode > fieldNodes = fieldSystem . arrowsByGamer . get ( this . getBaseEngine ( ) . currentGamer ) ; if ( fieldNodes == null ) return ; QueueMutationList < FieldNode > agents = fieldSystem . agentsByGamer . get ( this . getBaseEngine ( ) . currentGamer ) ; vector . zero ( ) ; if ( ( agents != null ) && ( ( agents . size ( ) ) > 0 ) ) { int numberAgents = agents . size ( ) ; for ( int i = numberAgents - 1 ; i >= 0 ; i -- ) { vector . translate ( agents . get ( i ) . _fieldAgentNode . coords . pos ) ; } vector . scale ( ( 1.0 // numberAgents ) ) ; } else { <START_BUG> vector = gridSystem . grid . calculateCenterOfMass ( ) ; <END_BUG> } int size = fieldNodes . size ( ) ; if ( size < 1 ) { for ( int i = 0 ; i < ( fieldCameraNodes . size ( ) ) ; i ++ ) { FieldCameraNode fieldCameraNode = fieldCameraNodes . get ( i ) ; Vector2 cameraPos = fieldCameraNode . coords . pos ; Vector2 cog = vector ; Vector2 . subtract ( vector , cog , cameraPos ) ; double dist = vector . magnitude ( ) ; double curve = ( 0.18 * dt ) * ( Math . sqrt ( Math . max ( 5 , Math . min ( ( 5 - dist ) , 0 ) ) ) ) ; vector . scale ( curve , curve ) ; cameraPos . translate ( ( ( vector . x ) * dt ) , ( ( vector . y ) * dt ) ) ; fieldCameraNode . scale . v = ( ( 0.15F * ( ( float ) ( dt ) ) ) * ( ( fieldCameraNode . _originalCameraScale ) - ( fieldCameraNode . scale . v ) ) ) + ( fieldCameraNode . scale . v ) ; } return ; } for ( int i = 0 ; i < ( fieldCameraNodes . size ( ) ) ; i ++ ) { FieldCameraNode fieldCameraNode = fieldCameraNodes . get ( i ) ; vector . zero ( ) ; for ( int k = 0 ; k < size ; k ++ ) { FieldNode . FieldArrowNode fieldArrowNode = fieldNodes . get ( k ) . _fieldArrowNode ; vector . translate ( fieldArrowNode . coords . pos . x , fieldArrowNode . coords . pos . y ) ; vector . translate ( ( 2 * ( fieldArrowNode . coords . rot . x ) ) , ( 2 * ( fieldArrowNode . coords . rot . y ) ) ) ; } vector . scale ( ( 1.0 // size ) , ( 1.0 // size ) ) ; Vector2 cameraPos = fieldCameraNode . coords . pos ; Vector2 . subtract ( vector , vector , cameraPos ) ; double dist = vector . magnitude ( ) ; double curve = ( 0.5 * dt ) * ( Math . sqrt ( Math . max ( 5 , Math . min ( ( 5 - dist ) , 0 ) ) ) ) ; vector . scale ( curve , curve ) ; cameraPos . translate ( ( ( vector . x ) * dt ) , ( ( vector . y ) * dt ) ) ; fieldCameraNode . scale . v = ( ( 0.15F * ( ( float ) ( dt ) ) ) * ( ( fieldCameraNode . zoomScale . v ) - ( fieldCameraNode . scale . v ) ) ) + ( fieldCameraNode . scale . v ) ; } } @ Override public void flushQueues ( ) { } No newline ; at end ; of file ; }

Fix:
vector . copy ( gridSystem . grid . calculateCenterOfMass ( ) ) ;
Buggy code:
public class BeanMethodPolymorphismTests { @ Test public void beanMethodOverloadingWithoutInheritance ( ) { <START_BUG> @ SuppressWarnings ( { "hiding" } ) <END_BUG> @ Configuration class Config { @ Bean String aString ( ) { return "na" ; } @ Bean String aString ( Integer dependency ) { return "na" ; } } try { new AnnotationConfigApplicationContext ( Config . class ) ; fail ( "expected<seq2seq4repair_space>bean<seq2seq4repair_space>method<seq2seq4repair_space>overloading<seq2seq4repair_space>exception" ) ; } catch ( BeanDefinitionParsingException ex ) { assertTrue ( ex . getMessage ( ) , ex . getMessage ( ) . contains ( "2<seq2seq4repair_space>overloaded<seq2seq4repair_space>@Bean<seq2seq4repair_space>methods<seq2seq4repair_space>named<seq2seq4repair_space>'aString'" ) ) ; } } @ Test public void beanMethodOverloadingWithInheritance ( ) { } @ Configuration static class SuperConfig { @ Bean String aString ( ) { } } @ Configuration static class SubConfig { @ Bean Integer anInt ( ) { } @ Bean String aString ( Integer dependency ) { } } @ Test public void beanMethodShadowing ( ) { } @ Import ( BeanMethodPolymorphismTests . SubConfig . class ) @ Configuration static class ShadowConfig { @ Bean String aString ( ) { } } @ Test public void beanMethodsDetectedOnSuperClass ( ) { } @ Configuration static class BaseConfig { @ Bean public TestBean testBean ( ) { } } @ Configuration static class Config extends BeanMethodPolymorphismTests . BaseConfig { } }

Fix:
@ SuppressWarnings ( { "unused" , "hiding" } )
Buggy code:
public class Operations { private static final Log log = LogFactory . getLog ( Operations . class ) ; public void performAction ( String currentUser , String action , int tenantId , String type , String app , String [ ] params ) { Operations . log . debug ( ( ( ( ( ( ( ( "Action:<seq2seq4repair_space>" + action ) + ",<seq2seq4repair_space>tenantId:<seq2seq4repair_space>" ) + tenantId ) + ",<seq2seq4repair_space>type:<seq2seq4repair_space>" ) + type ) + ",<seq2seq4repair_space>app:<seq2seq4repair_space>" ) + app ) ) ; MobileConfigurations configurations = MobileConfigurations . getInstance ( ) ; User user = new User ( ) ; JSONObject userObj = ( ( JSONObject ) ( new JSONValue ( ) . parse ( currentUser ) ) ) ; user . setUsername ( ( ( String ) ( userObj . get ( "username" ) ) ) ) ; user . setTenantDomain ( ( ( String ) ( userObj . get ( "tenantDomain" ) ) ) ) ; user . setTenantId ( Integer . valueOf ( String . valueOf ( userObj . get ( "tenantId" ) ) ) ) ; try { PrivilegedCarbonContext . startTenantFlow ( ) ; PrivilegedCarbonContext . getThreadLocalCarbonContext ( ) . setTenantId ( tenantId , true ) ; PrivilegedCarbonContext . getThreadLocalCarbonContext ( ) . setUsername ( PrivilegedCarbonContext . getThreadLocalCarbonContext ( ) . getUserRealm ( ) . getRealmConfiguration ( ) . getAdminUserName ( ) ) ; CarbonContext cCtx = CarbonContext . getThreadLocalCarbonContext ( ) ; Registry registry = cCtx . getRegistry ( USER_GOVERNANCE ) ; GovernanceUtils . loadGovernanceArtifacts ( ( ( UserRegistry ) ( registry ) ) ) ; GenericArtifactManager artifactManager = new GenericArtifactManager ( ( ( UserRegistry ) ( registry ) ) , "mobileapp" ) ; GenericArtifact artifact = artifactManager . getGenericArtifact ( app ) ; MDMOperations mdmOperations = MDMServiceReferenceHolder . getInstance ( ) . getMDMOperation ( ) ; <START_BUG> App appToInstall = AppDataLoader . load ( new App ( ) , artifact , action ) ; <END_BUG> mdmOperations . performAction ( user , action , appToInstall , tenantId , type , params , configurations . getActiveMDMProperties ( ) ) ; } catch ( UserStoreException e ) { Operations . log . error ( "error<seq2seq4repair_space>occurred<seq2seq4repair_space>at<seq2seq4repair_space>the<seq2seq4repair_space>user<seq2seq4repair_space>store" ) ; Operations . log . debug ( ( "Error:<seq2seq4repair_space>" + e ) ) ; } catch ( GovernanceException e ) { Operations . log . error ( "error<seq2seq4repair_space>occurred<seq2seq4repair_space>from<seq2seq4repair_space>governance<seq2seq4repair_space>registry" ) ; Operations . log . debug ( ( "Error:<seq2seq4repair_space>" + e ) ) ; } catch ( RegistryException e ) { Operations . log . error ( "error<seq2seq4repair_space>occurred<seq2seq4repair_space>from<seq2seq4repair_space>registry" ) ; Operations . log . debug ( ( "Error:<seq2seq4repair_space>" + e ) ) ; } finally { PrivilegedCarbonContext . endTenantFlow ( ) ; } } }

Fix:
App appToInstall = AppDataLoader . load ( new App ( ) , artifact , action , tenantId ) ;
Buggy code:
public class QSUtils { private static boolean sAvailableTilesFiltered ; private static final SparseArray < Context > sSystemUiContextForUser = new SparseArray ( ) ; public interface OnQSChanged { void onQSChanged ( ) { } } private QSUtils ( ) { } public static boolean isStaticQsTile ( String tileSpec ) { } public static boolean isDynamicQsTile ( String tileSpec ) { } public static List < String > getAvailableTiles ( Context context ) { } public static List < String > getDefaultTiles ( Context context ) { } public static String getDefaultTilesAsString ( Context context ) { } private static void filterTiles ( Context context , List < String > tiles ) { } private static void filterTiles ( Context context ) { } public static int getDynamicQSTileResIconId ( Context context , int userId , String tileSpec ) { } public static String getDynamicQSTileLabel ( Context context , int userId , String tileSpec ) { } private static int translateDynamicQsTileSpecToIndex ( Context context , String tileSpec ) { } public static Context getQSTileContext ( Context context , int userId ) { } public static boolean isQSTileEnabledForUser ( Context context , String tileSpec , int userId ) { } public static ContentObserver registerObserverForQSChanges ( Context ctx , final QSUtils . OnQSChanged cb ) { } public static void unregisterObserverForQSChanges ( Context ctx , ContentObserver observer ) { } public static boolean deviceSupportsLte ( Context ctx ) { } public static boolean deviceSupportsDdsSupported ( Context context ) { } public static boolean deviceSupportsMobileData ( Context ctx ) { } public static boolean deviceSupportsBluetooth ( ) { } public static boolean deviceSupportsNfc ( Context context ) { } public static boolean deviceSupportsFlashLight ( Context context ) { CameraManager cameraManager = ( ( CameraManager ) ( context . getSystemService ( CAMERA_SERVICE ) ) ) ; try { String [ ] ids = cameraManager . getCameraIdList ( ) ; for ( String id : ids ) { CameraCharacteristics c = cameraManager . getCameraCharacteristics ( id ) ; Boolean flashAvailable = c . get ( FLASH_INFO_AVAILABLE ) ; Integer lensFacing = c . get ( LENS_FACING ) ; if ( ( ( ( flashAvailable != null ) && flashAvailable ) && ( lensFacing != null ) ) && ( lensFacing == ( CameraCharacteristics . LENS_FACING_BACK ) ) ) { return true ; } } <START_BUG> } catch ( CameraAccessException e ) { <END_BUG> } return false ; } public static boolean deviceSupportsCompass ( Context context ) { } private static boolean isDozeAvailable ( Context context ) { } private static boolean supportsRootAccess ( ) { } }

Fix:
} catch ( CameraAccessException | AssertionError e ) {
Buggy code:
public class HandlerMethod { protected final Log logger = LogFactory . getLog ( HandlerMethod . class ) ; private final Object bean ; private final Method method ; private final BeanFactory beanFactory ; private final MethodParameter [ ] parameters ; private final Method bridgedMethod ; public HandlerMethod ( Object bean , Method method ) { } private MethodParameter [ ] initMethodParameters ( ) { } public HandlerMethod ( Object bean , String methodName , Class < ? > ... parameterTypes ) throws NoSuchMethodException { } public HandlerMethod ( String beanName , BeanFactory beanFactory , Method method ) { } protected HandlerMethod ( HandlerMethod handlerMethod ) { } private HandlerMethod ( HandlerMethod handlerMethod , Object handler ) { } public Object getBean ( ) { } public Method getMethod ( ) { } public Class < ? > getBeanType ( ) { } protected Method getBridgedMethod ( ) { } public MethodParameter [ ] getMethodParameters ( ) { } public MethodParameter getReturnType ( ) { } public MethodParameter getReturnValueType ( Object returnValue ) { } public boolean isVoid ( ) { } public < A extends Annotation > A getMethodAnnotation ( Class < A > annotationType ) { <START_BUG> return AnnotationUtils . findAnnotation ( this . method , annotationType ) ; <END_BUG> } public HandlerMethod createWithResolvedBean ( ) { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } private class HandlerMethodParameter extends MethodParameter { protected HandlerMethodParameter ( int index ) { } @ Override public Class < ? > getDeclaringClass ( ) { } @ Override public < T extends Annotation > T getMethodAnnotation ( Class < T > annotationType ) { return HandlerMethod . this . getMethodAnnotation ( annotationType ) ; } } private class ReturnValueMethodParameter extends HandlerMethod . HandlerMethodParameter { private final Object returnValue ; public ReturnValueMethodParameter ( Object returnValue ) { } @ Override public Class < ? > getParameterType ( ) { } } }

Fix:
return AnnotationUtils . findAnnotation ( this . bridgedMethod , annotationType ) ;
Buggy code:
public class ShowLicenseAction extends FrameAction { public ShowLicenseAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { URLController c = new URLController ( ) ; try { <START_BUG> c . open ( new URL ( "http:////columba.sourceforge.net//index.php?page=license" ) ) ; <END_BUG> } catch ( MalformedURLException mue ) { } } }

Fix:
c . open ( new URL ( "http:////columba.sourceforge.net//license.php" ) ) ;
Buggy code:
public class Test1 { public static void main ( String [ ] args ) { String [ ] header = new String [ ] { "周一" , "周二" , "周三" , "周四" , "周五" , "周六" , "周日" } ; List < Object [ ] > list = new ArrayList < Object [ ] > ( ) ; for ( int i = 0 ; i < 6 ; i ++ ) { Object [ ] data = new Object [ 7 ] ; data [ 1 ] = "String" + i ; data [ 2 ] = new Object ( ) ; data [ 3 ] = 10 + i ; data [ 4 ] = 20.5 + i ; data [ 5 ] = true ; data [ 6 ] = new Date ( ) ; data [ 0 ] = null ; list . add ( data ) ; } Template t = TemplateFactory . createTemplate ( DefaultTemplate . class , header , list ) ; Config config = t . getConfig ( ) ; CellStyle style = config . createStyle ( ) ; StyleDecorate . decorateAsHeader ( style , config . createFont ( ) ) ; StyleDecorate . decorateBgYellow ( style ) ; config . setStyle ( style , new Region ( 0 , 0 , 0 , 6 ) ) ; style = config . createStyle ( ) ; config . setStyle ( StyleDecorate . decorateAs￥ ( style , config . createDataFormat ( ) ) , new Region ( 1 , 6 , 4 , 4 ) ) ; style = config . createStyle ( ) ; config . setStyle ( StyleDecorate . decorateAsPercentate ( style , config . createDataFormat ( ) ) , new Region ( 1 , 6 , 3 , 3 ) ) ; style = config . createStyle ( ) ; config . setStyle ( StyleDecorate . decorateAsDate ( style , config . createDataFormat ( ) ) , new Region ( 1 , 6 , 6 , 6 ) ) ; config . addRowHeight ( 0 , 30.0F ) ; config . addColumnWidth ( 2 , ( ( Config . DEFAULT_WIDTH ) * 3 ) ) ; config . addColumnWidth ( 6 , ( ( Config . DEFAULT_WIDTH ) + 3 ) ) ; FileOutputStream fos = null ; try { <START_BUG> fos = new FileOutputStream ( "D://text.xls" ) ; <END_BUG> t . build ( fos ) ; } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } finally { try { if ( fos != null ) { fos . close ( ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } } } }

Fix:
fos = new FileOutputStream ( "D://text.xlsx" ) ;
Buggy code:
public class testMath { public static void main ( String [ ] args ) throws IOException { System . out . println ( ":D" ) ; <START_BUG> System . out . println ( TheMath . deciToHex ( "10" ) ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
System . out . println ( TheMath . hexToBinary ( "210" ) ) ;
Buggy code:
public class MainActivity extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { <START_BUG> getMenuInflater ( ) . inflate ( menu_main , menu ) ; <END_BUG> return true ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
getMenuInflater ( ) . inflate ( main , menu ) ;
Buggy code:
class RealmAuthenticationProviderService implements Service < RealmAuthenticationProvider > { private final InjectedValue < SecurityRealm > securityRealmInjectedValue = new InjectedValue < SecurityRealm > ( ) ; private final InjectedValue < CallbackHandler > serverCallbackValue = new InjectedValue < CallbackHandler > ( ) ; private RealmAuthenticationProvider realmAuthenticationProvider = null ; public void start ( StartContext startContext ) throws StartException { <START_BUG> realmAuthenticationProvider = new RealmAuthenticationProvider ( securityRealmInjectedValue . getValue ( ) , serverCallbackValue . getValue ( ) ) ; <END_BUG> } public void stop ( StopContext stopContext ) { } public RealmAuthenticationProvider getValue ( ) throws IllegalArgumentException , IllegalStateException { } public InjectedValue < SecurityRealm > getSecurityRealmInjectedValue ( ) { } public InjectedValue < CallbackHandler > getServerCallbackValue ( ) { } }

Fix:
realmAuthenticationProvider = new RealmAuthenticationProvider ( securityRealmInjectedValue . getValue ( ) , serverCallbackValue . getOptionalValue ( ) ) ;
Buggy code:
public class Board { private final int RADIUS = 3 ; private Map < Integer , Collection < Chit > > chits ; private Map < HexLocation , Tile > tiles ; private Map < EdgeLocation , Road > roads ; private Map < VertexLocation , Dwelling > dwellings ; private Collection < Harbor > harbors ; private Robber robber ; public Board ( boolean randomTiles , boolean randomNumbers , boolean randomPorts ) { } public Board ( TransportMap map ) { } private Collection < Road > getAdjacentRoads ( VertexLocation vertex ) { } private Collection < Road > getAdjacentRoads ( EdgeLocation edge ) { } private Collection < Dwelling > getAdjacentDwellings ( HexLocation hex ) { } private Collection < Dwelling > getAdjacentDwellings ( VertexLocation vertex ) { } private Collection < Dwelling > getAdjacentDwellings ( EdgeLocation edge ) { } private boolean isLand ( HexLocation hex ) { } @ SuppressWarnings ( "incomplete-switch" ) private boolean isLand ( EdgeLocation edge ) { } @ SuppressWarnings ( "incomplete-switch" ) private boolean isLand ( VertexLocation vertex ) { } public HexLocation getRobberLocation ( ) { } public boolean canMoveRobber ( HexLocation newLocation ) { } public void moveRobber ( HexLocation newLocation ) throws CatanException { } public Collection < ResourceInvoice > generateInvoices ( int number ) { Collection < ResourceInvoice > invoices = new ArrayList < ResourceInvoice > ( ) ; Collection < Chit > chits = this . chits . get ( number ) ; Collection < Tile > tiles = new ArrayList < Tile > ( ) ; for ( Chit chit : chits ) { HexLocation location = chit . getLocation ( ) ; Tile tile = this . tiles . get ( location ) ; if ( tile != null ) { tiles . add ( tile ) ; } } for ( Tile tile : tiles ) { ResourceType type = tile . getResourceType ( ) ; Collection < Dwelling > dwellings = this . getAdjacentDwellings ( tile . getLocation ( ) ) ; for ( Dwelling dwelling : dwellings ) { int count = dwelling . getVictoryPoints ( ) ; PlayerNumber src = PlayerNumber . BANK ; PlayerNumber dest = dwelling . getOwner ( ) ; boolean invoiceExists = false ; for ( ResourceInvoice invoice : invoices ) { <START_BUG> if ( ( invoice . getDestinationPlayer ( ) ) == dest ) { <END_BUG> invoiceExists = true ; invoice . setCount ( ( ( invoice . getCount ( ) ) + count ) ) ; break ; } } if ( ! invoiceExists ) { ResourceInvoice invoice = new ResourceInvoice ( type , count , src , dest ) ; invoices . add ( invoice ) ; } } } return invoices ; } public boolean canPlaceRoad ( Road road , EdgeLocation edge , boolean setupPhase ) { } public void placeRoad ( Road road , EdgeLocation edge , boolean setupPhase ) throws CatanException { } public boolean canPlaceDwelling ( Dwelling dwelling , VertexLocation vertex , boolean setupPhase ) { } public void placeDwelling ( Dwelling dwelling , VertexLocation vertex , boolean setupPhase ) throws CatanException { } public Map < PlayerNumber , Collection < Harbor > > getHarborsByPlayer ( ) { } }

Fix:
if ( ( ( invoice . getDestinationPlayer ( ) ) == dest ) && ( ( invoice . getResource ( ) ) == type ) ) {
Buggy code:
public class SaveAsAction extends FrameAction implements SelectionListener { public SaveAsAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> processor . addOp ( new org . columba . mail . gui . attachment . command . SaveAttachmentCommand ( getFrameController ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ; <END_BUG> } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
processor . addOp ( new org . columba . mail . gui . attachment . command . SaveAttachmentCommand ( getFrameMediator ( ) . getSelectionManager ( ) . getHandler ( "mail.attachment" ) . getSelection ( ) ) ) ;
Buggy code:
public class IRCContainerInstantiator implements IContainerInstantiator { <START_BUG> public IContainer createInstance ( ContainerTypeDescription description , Class [ ] argTypes , Object [ ] args ) throws ContainerCreateException { <END_BUG> try { return new IRCRootContainer ( IDFactory . getDefault ( ) . createGUID ( ) ) ; } catch ( IDCreateException e ) { throw new ContainerCreateException ( "Exception<seq2seq4repair_space>creating<seq2seq4repair_space>ID" , e ) ; } } }

Fix:
public IContainer createInstance ( ContainerTypeDescription description , Object [ ] args ) throws ContainerCreateException {