nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FactorialDigits { private static BigInteger [ ] split ( BigInteger fullNumber ) { } public static boolean checkIfFactEqualsNumber ( BigInteger number ) { } public static void main ( String [ ] args ) { int sum = 0 ; ArrayList < Integer > array = new ArrayList < Integer > ( ) ; for ( int i = 10 ; i < 1000000 ; i ++ ) { <START_BUG> if ( FactorialDigits . checkIfFactEqualsNumber ( new BigInteger ( Integer . toString ( i ) ) ) ) ; <END_BUG> array . add ( i ) ; } for ( int i = 0 ; i < ( array . size ( ) ) ; i ++ ) { sum += array . get ( i ) ; System . out . println ( array . get ( i ) ) ; } System . out . println ( sum ) ; } }

Fix:
if ( FactorialDigits . checkIfFactEqualsNumber ( new BigInteger ( Integer . toString ( i ) ) ) )
Buggy code:
public class Assignment extends Expression { public Expression lhs ; public Expression expression ; public Assignment ( Expression lhs , Expression expression , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } void checkAssignmentEffect ( BlockScope scope ) { } void checkAssignment ( BlockScope scope , TypeBinding lhsType , TypeBinding rhsType ) { FieldBinding leftField = getLastField ( this . lhs ) ; if ( ( ( ( leftField != null ) && ( rhsType != ( NullBinding ) ) ) && ( lhsType . isWildcard ( ) ) ) && ( ( ( ( WildcardBinding ) ( lhsType ) ) . kind ) != ( Wildcard . SUPER ) ) ) { scope . problemReporter ( ) . wildcardAssignment ( lhsType , rhsType , this . expression ) ; } else if ( ( ( ( leftField != null ) && ( ( leftField . declaringClass ) != null ) ) && ( leftField . declaringClass . isRawType ( ) ) ) && ( ( rhsType . isParameterizedType ( ) ) || ( rhsType . isGenericType ( ) ) ) ) { scope . problemReporter ( ) . unsafeRawFieldAssignment ( leftField , rhsType , this . lhs ) ; } else if ( rhsType . needsUncheckedConversion ( lhsType ) ) { <START_BUG> scope . problemReporter ( ) . unsafeRawConversion ( this . expression , rhsType , lhsType ) ; <END_BUG> } } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } Binding getDirectBinding ( Expression someExpression ) { } FieldBinding getLastField ( Expression someExpression ) { } public int nullStatus ( FlowInfo flowInfo ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public StringBuffer printExpressionNoParenthesis ( int indent , StringBuffer output ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public TypeBinding resolveTypeExpecting ( BlockScope scope , TypeBinding expectedType ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
scope . problemReporter ( ) . unsafeTypeConversion ( this . expression , rhsType , lhsType ) ;
Buggy code:
public class TreeTable extends DefaultAbstractTree { public static interface IRenderNodeCallback extends Serializable { public String renderNode ( TreeNode node ) { } } private class TreeFragment extends Fragment { private static final long serialVersionUID = 1L ; public TreeFragment ( MarkupContainer < ? > parent , String id , final TreeNode node , int level , final TreeTable . IRenderNodeCallback renderNodeCallback ) { } } private static final ResourceReference CSS = new ResourceReference ( DefaultAbstractTree . class , "res//tree-table.css" ) ; private static final long serialVersionUID = 1L ; public static final Component newTreeCell ( MarkupContainer < ? > parent , String id , TreeNode node , int level , TreeTable . IRenderNodeCallback callback ) { } private IColumn [ ] columns ; public TreeTable ( MarkupContainer parent , String id , IColumn [ ] columns ) { } public TreeTable ( MarkupContainer parent , String id , IModel < TreeModel > model , IColumn [ ] columns ) { } public TreeTable ( MarkupContainer parent , String id , TreeModel model , IColumn [ ] columns ) { } private boolean hasLeftColumn ( ) { } protected void addHeader ( ) { } @ Override protected ResourceReference getCSS ( ) { } protected Component newTreePanel ( MarkupContainer < ? > parent , String id , final TreeNode node , int level , TreeTable . IRenderNodeCallback renderNodeCallback ) { } @ Override protected void onBeforeAttach ( ) { if ( ( get ( "sideColumns" ) ) == null ) { for ( IColumn column : columns ) { column . setTreeTable ( this ) ; } addHeader ( ) ; } <START_BUG> super . onAttach ( ) ; <END_BUG> } @ Override protected void populateTreeItem ( WebMarkupContainer < TreeNode > item , int level ) { } private void init ( IColumn [ ] columns ) { } }

Fix:
super . onBeforeAttach ( ) ;
Buggy code:
public class ARecord extends Record { private static ARecord member = new ARecord ( ) ; private int addr ; private ARecord ( ) { } private ARecord ( Name name , short dclass , int ttl ) { } static ARecord getMember ( ) { } private static final int fromBytes ( byte b1 , byte b2 , byte b3 , byte b4 ) { } private static final int fromArray ( byte [ ] array ) { } private static final String toDottedQuad ( int addr ) { } public ARecord ( Name name , short dclass , int ttl , InetAddress address ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws TextParseException { ARecord rec = new ARecord ( name , dclass , ttl ) ; <START_BUG> String s = st . nextToken ( ) ; <END_BUG> try { InetAddress address ; if ( s . equals ( "@me@" ) ) { address = InetAddress . getLocalHost ( ) ; if ( address . equals ( InetAddress . getByName ( "127.0.0.1" ) ) ) { String msg = "InetAddress.getLocalHost()<seq2seq4repair_space>is<seq2seq4repair_space>" + "broken.<seq2seq4repair_space>Don't<seq2seq4repair_space>use<seq2seq4repair_space>@me@." ; throw new RuntimeException ( msg ) ; } } else { if ( ! ( Address . isDottedQuad ( s ) ) ) throw new TextParseException ( "invalid<seq2seq4repair_space>dotted<seq2seq4repair_space>quad" ) ; address = Address . getByName ( s ) ; } rec . addr = ARecord . fromArray ( address . getAddress ( ) ) ; } catch ( UnknownHostException e ) { throw new TextParseException ( "invalid<seq2seq4repair_space>address" ) ; } return rec ; } public String rdataToString ( ) { } public InetAddress getAddress ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } }

Fix:
String s = nextString ( st ) ;
Buggy code:
final class Behaviors implements IDetachable { private static final long serialVersionUID = 1L ; private final Component component ; public Behaviors ( Component component ) { } public void add ( Behavior ... behaviors ) { } private void internalAdd ( final Behavior behavior ) { component . data_add ( behavior ) ; <START_BUG> if ( behavior . getStatelessHint ( component ) ) { <END_BUG> getBehaviorId ( behavior ) ; } } @ SuppressWarnings ( "unchecked" ) public < M extends Behavior > List < M > getBehaviors ( Class < M > type ) { } public void remove ( Behavior behavior ) { } public final void detach ( ) { } private boolean internalRemove ( final Behavior behavior ) { } private void removeBehaviorsIdList ( ) { } private Behaviors . BehaviorIdList getBehaviorsIdList ( boolean createIfNotFound ) { } private static class BehaviorIdList extends ArrayList < Behavior > { private static final long serialVersionUID = 1L ; public BehaviorIdList ( ) { } } public final int getBehaviorId ( Behavior behavior ) { } public final Behavior getBehaviorById ( int id ) { } }

Fix:
if ( ! ( behavior . getStatelessHint ( component ) ) ) {
Buggy code:
public class DefaultExecutor extends AbstractLogEnabled implements Serviceable , Executor { private static final Resources REZ = ResourceManager . getPackageResources ( DefaultExecutor . class ) ; private Configurer m_configurer ; public void service ( final ServiceManager serviceManager ) throws ServiceException { } public void execute ( final Configuration taskModel , final ExecutionFrame frame ) throws TaskException { } protected final void debug ( final String key , final String taskName ) { } protected final Task doCreateTask ( final String name , final ExecutionFrame frame ) throws TaskException { try { <START_BUG> final TypeFactory factory = frame . getTypeManager ( ) . getFactory ( Task . class ) ; <END_BUG> return ( ( Task ) ( factory . create ( name ) ) ) ; } catch ( final TypeException te ) { final String message = DefaultExecutor . REZ . getString ( "create.error" , name ) ; throw new TaskException ( message , te ) ; } } protected final void doConfigure ( final Task task , final Configuration taskModel , final TaskContext taskContext ) throws ConfigurationException { } protected final void doContextualize ( final Task task , final Configuration taskModel , final TaskContext context ) throws TaskException { } }

Fix:
final TypeFactory factory = frame . getTypeManager ( ) . getFactory ( ROLE ) ;
Buggy code:
public class ClientSDKAppSSOProvider implements AppSSOTokenProvider { public static final String APP_SSO_PROVIDER_PLUGIN = "com.sun.identity.agents.arch.ClientSDKAppSSOProvider" ; public static final String CLIENT_SDK_ADMIN_TOKEN_PROPERTY = "com.sun.identity.security.AdminToken" ; public ClientSDKAppSSOProvider ( ) { } public SSOToken getAppSSOToken ( ) { SSOToken result = null ; try { CommonFactory cf = new CommonFactory ( BaseModule . getModule ( ) ) ; IApplicationSSOTokenProvider provider = cf . newApplicationSSOTokenProvider ( ) ; result = provider . getApplicationSSOToken ( false ) ; if ( getDebug ( ) . messageEnabled ( ) ) { <START_BUG> getDebug ( ) . message ( ( ( "ClientSDKAppSSOProvider.getAppSSOToken:" + "<seq2seq4repair_space>got<seq2seq4repair_space>SSO<seq2seq4repair_space>Token<seq2seq4repair_space>=" ) + result ) ) ; <END_BUG> } } catch ( AgentException aex ) { getDebug ( ) . error ( ( "ClientSDKAppSSOProvider.getAppSSOToken:<seq2seq4repair_space>Unable" + "<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>AppSSOToken" ) , aex ) ; } return result ; } private void setDebug ( Debug debug ) { } private Debug getDebug ( ) { } private Debug _debug ; }

Fix:
getDebug ( ) . message ( ( ( "ClientSDKAppSSOProvider.getAppSSOToken:" + "<seq2seq4repair_space>got<seq2seq4repair_space>SSO<seq2seq4repair_space>Token<seq2seq4repair_space>=" ) + ( result == null ? result : result . getTokenID ( ) . toString ( ) ) ) ) ;
Buggy code:
public abstract class SingleFragmentActivity extends FragmentActivity { protected abstract Fragment createFragment ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } protected int getLayoutResId ( ) { <START_BUG> return layout . fragment_photo_gallery ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return layout . activity_fragment ;
Buggy code:
public class IRCChatRoomManagerUI { private static final String CHAT_ROOM_MANAGER_VIEWID = "org.eclipse.ecf.ui.views.ChatRoomManagerView" ; IChatRoomManager manager ; boolean viewAlreadyActive = false ; public IRCChatRoomManagerUI ( IChatRoomManager manager ) { } protected String getViewIDFromTargetID ( ID targetID ) { } protected ChatRoomManagerView getChatRoomManagerView ( ID targetID ) throws PartInitException { } private void setupNewView ( final IContainer container , final ID targetID , final ChatRoomManagerView chatroomview ) { IRoomInfo roomInfo = manager . getChatRoomInfo ( null ) ; if ( roomInfo == null ) throw new NullPointerException ( "Chat<seq2seq4repair_space>room<seq2seq4repair_space>manager<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>expose<seq2seq4repair_space>chat<seq2seq4repair_space>room<seq2seq4repair_space>interface.<seq2seq4repair_space>Cannot<seq2seq4repair_space>create<seq2seq4repair_space>UI" ) ; IChatRoomContainer chatRoom = null ; try { chatRoom = roomInfo . createChatRoomContainer ( ) ; } catch ( ContainerCreateException e1 ) { } chatroomview . initialize ( new IChatRoomViewCloseListener ( ) { public void chatRoomViewClosing ( String secondaryID ) { container . dispose ( ) ; } } , chatRoom , manager , targetID , chatRoom . getChatMessageSender ( ) ) ; container . addListener ( new IContainerListener ( ) { public void handleEvent ( IContainerEvent evt ) { if ( evt instanceof IContainerDisconnectedEvent ) { IContainerDisconnectedEvent cd = ( ( IContainerDisconnectedEvent ) ( evt ) ) ; final ID departedContainerID = cd . getTargetID ( ) ; ID connectedID = targetID ; if ( ( connectedID == null ) || ( connectedID . equals ( departedContainerID ) ) ) { chatroomview . disconnected ( ) ; } } else if ( evt instanceof IContainerConnectedEvent ) { chatroomview . joinRoom ( getChannelFromID ( targetID ) ) ; } } <START_BUG> } , "" ) ; <END_BUG> chatRoom . addMessageListener ( new IMessageListener ( ) { public void handleMessage ( ID fromID , ID toID , Type type , String subject , String messageBody ) { chatroomview . handleMessage ( fromID , toID , type , subject , messageBody ) ; } } ) ; } public boolean setup ( final IContainer container , final ID targetID , String username ) { } protected String getChannelFromID ( ID targetID ) { } }

Fix:
} ) ;
Buggy code:
public abstract class CtrlBase implements IControl , IView { @ FunctionalInterface protected interface Getter { String get ( Control ctrl ) { } } @ FunctionalInterface protected interface Validator { Boolean validate ( String content ) { } } @ FunctionalInterface protected interface InvalidParameterHandler { void handle ( Control c , String s ) { } } protected CtrlBase . InvalidParameterHandler focusHandler = ( control , string ) -> { control . requestFocus ( ) ; control . setStyle ( "-fx-border-color:<seq2seq4repair_space>red<seq2seq4repair_space>;<seq2seq4repair_space>-fx-border-width:<seq2seq4repair_space>2px<seq2seq4repair_space>;" ) ; } ; protected CtrlBase . Getter textGetter = ( v ) -> ( ( TextField ) ( v ) ) . getText ( ) ; protected CtrlBase . Getter comboGetter = ( v ) -> { final String value = ( ( ComboBox < String > ) ( v ) ) . getValue ( ) ; return value == null ? "" : value ; } ; protected CtrlBase . Getter textAreaGetter = ( v ) -> ( ( TextArea ) ( v ) ) . getText ( ) ; protected CtrlBase . Getter dateNowGetter = ( v ) -> new SimpleDateFormat ( "yyyy-MM-dd" ) . format ( new Date ( ) ) ; protected CtrlBase . Getter dateGetter = ( v ) -> { final LocalDate date = ( ( DatePicker ) ( v ) ) . getValue ( ) ; return date . toString ( ) ; } ; protected CtrlBase . Validator empty = ( s ) -> ( s != null ) && ( ( s . length ( ) ) > 0 ) ; protected CtrlBase . Validator ok = ( s ) -> true ; protected class SubmitWrapper { public final String propertyName ; public final Control control ; public final CtrlBase . Getter getter ; public final CtrlBase . Validator validator ; public final CtrlBase . InvalidParameterHandler handler ; public SubmitWrapper ( String name , Control ctl , CtrlBase . Getter get , CtrlBase . Validator v ) { } } protected IModel mClerk ; protected ResourceBundle mMessages ; protected ControlRegistry myRegistry ; protected List < CtrlBase . SubmitWrapper > mSubmitWrapper = new ArrayList < > ( ) ; protected CtrlBase ( ) { } protected Properties getProperties ( ) { } protected void setupDateFormat ( final DatePicker p ) { } protected void populateComboBox ( final ComboBox cb , final String [ ] values ) { } protected LocalDate dateFromString ( final String s ) { } protected void loadProperties ( final Properties p ) { } protected void displayErrorMessage ( String message ) { System . err . println ( message ) ; <START_BUG> org . controlsfx . dialog . Dialogs . create ( ) . masthead ( "FastTRAX" ) . message ( message ) . showConfirm ( ) ; <END_BUG> } public void setRegistry ( ControlRegistry registry ) { } public void subscribe ( String key , IModel subscriber ) { } public void unSubscribe ( String key , IModel subscriber ) { } }

Fix:
org . controlsfx . dialog . Dialogs . create ( ) . masthead ( "FastTRAX" ) . message ( message ) . showInformation ( ) ;
Buggy code:
public class KnowledgeList extends AbstractList < KnowledgeRecord > { private native void jni_freeKnowledgeList ( long [ ] records , int length ) { } private long [ ] knowledgeRecords ; public KnowledgeList ( ) { } public KnowledgeList ( long [ ] records ) { } public KnowledgeList ( KnowledgeRecord [ ] records ) { } @ Override public KnowledgeRecord get ( int index ) { <START_BUG> return KnowledgeRecord . fromPointer ( knowledgeRecords [ index ] ) ; <END_BUG> } @ Override public int size ( ) { } public long [ ] toPointerArray ( ) { } public void free ( ) { } }

Fix:
return KnowledgeRecord . fromPointer ( knowledgeRecords [ index ] , false ) ;
Buggy code:
class SingleSignOnAdd extends AbstractAddStepHandler { @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final PathAddress hostAddress = address . subAddress ( 0 , ( ( address . size ( ) ) - 1 ) ) ; final PathAddress serverAddress = hostAddress . subAddress ( 0 , ( ( hostAddress . size ( ) ) - 1 ) ) ; final ModelNode domainModelNode = DOMAIN . resolveModelAttribute ( context , model ) ; final ModelNode pathNode = PATH . resolveModelAttribute ( context , model ) ; final String domain = ( domainModelNode . isDefined ( ) ) ? domainModelNode . asString ( ) : null ; final String path = ( pathNode . isDefined ( ) ) ? pathNode . asString ( ) : null ; final boolean secure = SECURE . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final boolean httpOnly = HTTP_ONLY . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final String cookieName = COOKIE_NAME . resolveModelAttribute ( context , model ) . asString ( ) ; final String serverName = serverAddress . getLastElement ( ) . getValue ( ) ; final String hostName = hostAddress . getLastElement ( ) . getValue ( ) ; final ServiceName serviceName = UndertowService . ssoServiceName ( serverName , hostName ) ; final ServiceName virtualHostServiceName = UndertowService . virtualHostName ( serverName , hostName ) ; final ServiceTarget target = context . getServiceTarget ( ) ; ServiceName managerServiceName = serviceName . append ( "manager" ) ; <START_BUG> SingleSignOnManagerService . build ( target , managerServiceName , serverName , hostName ) . setInitialMode ( ON_DEMAND ) . install ( ) ; <END_BUG> final SingleSignOnService service = new SingleSignOnService ( domain , path , httpOnly , secure , cookieName ) ; target . addService ( serviceName , service ) . addDependency ( virtualHostServiceName , Host . class , service . getHost ( ) ) . addDependency ( managerServiceName , SingleSignOnManager . class , service . getSingleSignOnSessionManager ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } }

Fix:
SingleSignOnManagerService . build ( target , managerServiceName , virtualHostServiceName ) . setInitialMode ( ON_DEMAND ) . install ( ) ;
Buggy code:
class HtmlParserHTMLParser extends HTMLParser { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; protected HtmlParserHTMLParser ( ) { } protected boolean isReusable ( ) { } public Iterator getEmbeddedResourceURLs ( byte [ ] html , URL baseUrl , URLCollection urls ) throws HTMLParseException { } private static class URLPointer { private URLPointer ( URL newUrl ) { } private URL url ; } private void parseNodes ( final NodeIterator e , final HtmlParserHTMLParser . URLPointer baseUrl , final URLCollection urls ) throws HTMLParseException , ParserException { while ( e . hasMoreNodes ( ) ) { Node node = e . nextNode ( ) ; if ( ! ( node instanceof Tag ) ) { continue ; } Tag tag = ( ( Tag ) ( node ) ) ; String tagname = tag . getTagName ( ) ; String binUrlStr = null ; if ( tag instanceof BodyTag ) { binUrlStr = tag . getAttribute ( ATT_BACKGROUND ) ; } else if ( tag instanceof BaseHrefTag ) { BaseHrefTag baseHref = ( ( BaseHrefTag ) ( tag ) ) ; <START_BUG> String baseref = baseHref . getBaseUrl ( ) . toString ( ) ; <END_BUG> try { if ( ! ( baseref . equals ( "" ) ) ) { baseUrl . url = new URL ( baseUrl . url , baseHref . getBaseUrl ( ) ) ; } } catch ( MalformedURLException e1 ) { throw new HTMLParseException ( e1 ) ; } } else if ( tag instanceof ImageTag ) { ImageTag image = ( ( ImageTag ) ( tag ) ) ; binUrlStr = image . getImageURL ( ) ; } else if ( tag instanceof AppletTag ) { AppletTag applet = ( ( AppletTag ) ( tag ) ) ; binUrlStr = applet . getAppletClass ( ) ; } else if ( tag instanceof InputTag ) { if ( ATT_IS_IMAGE . equalsIgnoreCase ( tag . getAttribute ( ATT_TYPE ) ) ) { binUrlStr = tag . getAttribute ( ATT_SRC ) ; } } else if ( tag instanceof LinkTag ) { LinkTag link = ( ( LinkTag ) ( tag ) ) ; if ( ( link . getChild ( 0 ) ) instanceof ImageTag ) { ImageTag img = ( ( ImageTag ) ( link . getChild ( 0 ) ) ) ; binUrlStr = img . getImageURL ( ) ; } } else if ( tag instanceof ScriptTag ) { binUrlStr = tag . getAttribute ( ATT_SRC ) ; } else if ( tag instanceof FrameTag ) { binUrlStr = tag . getAttribute ( ATT_SRC ) ; } else if ( ( tagname . equalsIgnoreCase ( TAG_EMBED ) ) || ( tagname . equalsIgnoreCase ( TAG_BGSOUND ) ) ) { binUrlStr = tag . getAttribute ( ATT_SRC ) ; } else if ( tagname . equalsIgnoreCase ( TAG_LINK ) ) { if ( STYLESHEET . equalsIgnoreCase ( tag . getAttribute ( ATT_REL ) ) ) { binUrlStr = tag . getAttribute ( ATT_HREF ) ; } } else { binUrlStr = tag . getAttribute ( ATT_BACKGROUND ) ; } if ( binUrlStr != null ) { urls . addURL ( binUrlStr , baseUrl . url ) ; } String styleTagStr = tag . getAttribute ( ATT_STYLE ) ; if ( styleTagStr != null ) { HtmlParsingUtils . extractStyleURLs ( baseUrl . url , urls , styleTagStr ) ; } if ( tag instanceof CompositeTag ) { CompositeTag composite = ( ( CompositeTag ) ( tag ) ) ; parseNodes ( composite . elements ( ) , baseUrl , urls ) ; } } } }

Fix:
String baseref = baseHref . getBaseUrl ( ) ;
Buggy code:
@ Component public class AccountEventLog implements ConstantProperties , ParameterProperties { public void getEventLogs ( Identity identity , UserToken userToken , boolean login , String apiKey ) throws JSONException { SessionContextSupport . putLogParameter ( EVENT_NAME , ( login ? USER_LOGIN : USER_LOG_OUT ) ) ; final JSONObject context = ( ( SessionContextSupport . getLog ( ) . get ( CONTEXT ) ) != null ) ? new JSONObject ( SessionContextSupport . getLog ( ) . get ( CONTEXT ) . toString ( ) ) : new JSONObject ( ) ; if ( ( identity != null ) && ( ( identity . getLoginType ( ) ) != null ) ) { context . put ( ( login ? LOGIN_TYPE : LOG_OUT_TYPE ) , ( identity . getLoginType ( ) . equalsIgnoreCase ( CREDENTIAL ) ? GOORU : identity . getLoginType ( ) ) ) ; } SessionContextSupport . putLogParameter ( CONTEXT , context . toString ( ) ) ; final JSONObject payLoadObject = ( ( SessionContextSupport . getLog ( ) . get ( PAY_LOAD_OBJECT ) ) != null ) ? new JSONObject ( SessionContextSupport . getLog ( ) . get ( PAY_LOAD_OBJECT ) . toString ( ) ) : new JSONObject ( ) ; SessionContextSupport . putLogParameter ( PAY_LOAD_OBJECT , payLoadObject . toString ( ) ) ; final JSONObject session = ( ( SessionContextSupport . getLog ( ) . get ( SESSION ) ) != null ) ? new JSONObject ( SessionContextSupport . getLog ( ) . get ( SESSION ) . toString ( ) ) : new JSONObject ( ) ; session . put ( SESSIONTOKEN , userToken . getToken ( ) ) ; <START_BUG> SessionContextSupport . putLogParameter ( API_KEY , apiKey ) ; <END_BUG> SessionContextSupport . putLogParameter ( SESSION , session . toString ( ) ) ; final JSONObject user = ( ( SessionContextSupport . getLog ( ) . get ( USER ) ) != null ) ? new JSONObject ( SessionContextSupport . getLog ( ) . get ( USER ) . toString ( ) ) : new JSONObject ( ) ; if ( login ) { user . put ( GOORU_UID , ( ( identity != null ) && ( ( identity . getUser ( ) ) != null ) ? identity . getUser ( ) . getPartyUid ( ) : null ) ) ; } else { user . put ( GOORU_UID , ( ( userToken != null ) && ( ( userToken . getUser ( ) ) != null ) ? userToken . getUser ( ) . getPartyUid ( ) : null ) ) ; } SessionContextSupport . putLogParameter ( USER , user . toString ( ) ) ; } }

Fix:
session . put ( API_KEY , apiKey ) ;
Buggy code:
public class NamesQueryFilter extends QueryFilter { public final SortedSet < byte [ ] > columns ; public NamesQueryFilter ( String key , QueryPath columnParent , SortedSet < byte [ ] > columns ) { } public NamesQueryFilter ( String key , QueryPath columnParent , byte [ ] column ) { } private static TreeSet < byte [ ] > getSingleColumnSet ( byte [ ] column ) { } public ColumnIterator getMemColumnIterator ( Memtable memtable , AbstractType comparator ) { } public ColumnIterator getSSTableColumnIterator ( SSTableReader sstable ) throws IOException { } public SuperColumn filterSuperColumn ( SuperColumn superColumn , int gcBefore ) { } public void collectReducedColumns ( IColumnContainer container , Iterator < IColumn > reducedColumns , int gcBefore ) { while ( reducedColumns . hasNext ( ) ) { IColumn column = reducedColumns . next ( ) ; <START_BUG> if ( ( ! ( column . isMarkedForDelete ( ) ) ) || ( ( column . getLocalDeletionTime ( ) ) > gcBefore ) ) <END_BUG> container . addColumn ( column ) ; } } }

Fix:
if ( QueryFilter . isRelevant ( column , container , gcBefore ) )
Buggy code:
public interface Converter { String ROLE = Converter . class . getName ( ) ; <START_BUG> Object convert ( Class destination , Object original , Map context ) throws ConverterException ; <END_BUG> }

Fix:
Object convert ( Class destination , Object original , ConverterContext context ) throws ConverterException ;
Buggy code:
public abstract class CompletionRequestor { private int ignoreSet = 0 ; public CompletionRequestor ( ) { } public final boolean isIgnored ( int completionProposalKind ) { <START_BUG> if ( ( completionProposalKind < ( CompletionProposal . ANONYMOUS_CLASS_DECLARATION ) ) || ( completionProposalKind > ( CompletionProposal . VARIABLE_DECLARATION ) ) ) { <END_BUG> throw new IllegalArgumentException ( ) ; } return 0 != ( ( this . ignoreSet ) & ( 1 << completionProposalKind ) ) ; } public final void setIgnored ( int completionProposalKind , boolean ignore ) { } public void beginReporting ( ) { } public void endReporting ( ) { } public void completionFailure ( IProblem problem ) { } public abstract void accept ( CompletionProposal proposal ) { } }

Fix:
if ( ( completionProposalKind < ( CompletionProposal . ANONYMOUS_CLASS_DECLARATION ) ) || ( completionProposalKind > ( CompletionProposal . METHOD_NAME_REFERENCE ) ) ) {
Buggy code:
class HyperSearchRequest extends WorkRequest { public HyperSearchRequest ( View view , SearchMatcher matcher , HyperSearchResults results , Selection [ ] selection ) { } public void run ( ) { } private View view ; private SearchMatcher matcher ; private HyperSearchResults results ; private DefaultMutableTreeNode rootSearchNode ; private Selection [ ] selection ; private String searchString ; private int searchInSelection ( Buffer buffer ) throws Exception { } private int doHyperSearch ( Buffer buffer ) throws Exception { } private int doHyperSearch ( Buffer buffer , int start , int end ) throws Exception { } private int doHyperSearch ( Buffer buffer , int start , int end , DefaultMutableTreeNode bufferNode ) { int resultCount = 0 ; try { buffer . readLock ( ) ; boolean endOfLine = ( ( buffer . getLineEndOffset ( buffer . getLineOfOffset ( end ) ) ) - 1 ) == end ; Segment text = new Segment ( ) ; int offset = start ; HyperSearchResult lastResult = null ; loop : for ( int counter = 0 ; ; counter ++ ) { boolean startOfLine = ( buffer . getLineStartOffset ( buffer . getLineOfOffset ( offset ) ) ) == offset ; buffer . getText ( offset , ( end - offset ) , text ) ; <START_BUG> SearchMatcher . Match match = matcher . nextMatch ( new CharIndexedSegment ( text , false ) , startOfLine , endOfLine , ( counter == 0 ) , false ) ; <END_BUG> if ( match == null ) break loop ; int newLine = buffer . getLineOfOffset ( ( offset + ( match . start ) ) ) ; if ( ( lastResult == null ) || ( ( lastResult . line ) != newLine ) ) { lastResult = new HyperSearchResult ( buffer , newLine ) ; bufferNode . add ( new DefaultMutableTreeNode ( lastResult , false ) ) ; } lastResult . addOccur ( ( offset + ( match . start ) ) , ( offset + ( match . end ) ) ) ; offset += match . end ; resultCount ++ ; } } finally { buffer . readUnlock ( ) ; } return resultCount ; } }

Fix:
SearchMatcher . Match match = matcher . nextMatch ( new SegmentCharSequence ( text , false ) , startOfLine , endOfLine , ( counter == 0 ) , false ) ;
Buggy code:
public class ArrayType extends Type { public static final ChildPropertyDescriptor COMPONENT_TYPE_PROPERTY = new ChildPropertyDescriptor ( ArrayType . class , "componentType" , Type . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Type componentType = null ; ArrayType ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { ArrayType result = new ArrayType ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setComponentType ( ( ( Type ) ( getComponentType ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Type getComponentType ( ) { } public void setComponentType ( Type componentType ) { } public Type getElementType ( ) { } public int getDimensions ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class HTTPSampleResult extends SampleResult { private static final long serialVersionUID = 240L ; private String cookies = "" ; private String method ; private String redirectLocation ; private String queryString = "" ; private static final String HTTP_NO_CONTENT_CODE = Integer . toString ( HttpURLConnection . HTTP_NO_CONTENT ) ; private static final String HTTP_NO_CONTENT_MSG = "No<seq2seq4repair_space>Content" ; 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 ( ) { } public String getCookies ( ) { } public void setCookies ( String string ) { } public String getQueryString ( ) { } public void setQueryString ( String string ) { } @ Override public String getDataEncodingWithDefault ( ) { if ( ( ( getDataEncodingNoDefault ( ) ) == null ) && ( getContentType ( ) . startsWith ( "text//html" ) ) ) { byte [ ] bytes = getResponseData ( ) ; String prefix = new String ( bytes , 0 , Math . min ( bytes . length , 2000 ) ) . toLowerCase ( Locale . ENGLISH ) ; final String METATAG = "<meta<seq2seq4repair_space>http-equiv=\"content-type\"<seq2seq4repair_space>content=\"" ; int tagstart = prefix . indexOf ( METATAG ) ; if ( tagstart != ( - 1 ) ) { tagstart += METATAG . length ( ) ; <START_BUG> int tagend = prefix . indexOf ( "\"" , tagstart ) ; <END_BUG> if ( tagend != ( - 1 ) ) { final String ct = new String ( bytes , tagstart , ( tagend - tagstart ) ) ; setEncodingAndType ( ct ) ; } } } return super . getDataEncodingWithDefault ( DEFAULT_HTTP_ENCODING ) ; } public void setResponseNoContent ( ) { } }

Fix:
int tagend = prefix . indexOf ( '\"' , tagstart ) ;
Buggy code:
public class MinePacks extends JavaPlugin { public Logger log ; public Config config ; public Language lang ; public Database DB ; public static String BackpackTitle ; public String Message_IvalidBackpack ; public void onEnable ( ) { } public void onDisable ( ) { if ( config . getAutoUpdate ( ) ) { <START_BUG> new net . gravitydevelopment . Updater . Bukkit_Updater ( this , 74734 , this . getFile ( ) , UpdateType . DEFAULT , true ) ; <END_BUG> } DB . Close ( ) ; log . info ( lang . Get ( "Console.Disabled" ) ) ; } public void OpenBackpack ( Player opener , OfflinePlayer owener , boolean editable ) { } public void OpenBackpack ( Player opener , Backpack backpack , boolean editable ) { } public int getBackpackPermSize ( Player player ) { } No newline ; at end ; of file ; }

Fix:
new net . gravitydevelopment . Updater . Bukkit_Updater ( this , 83445 , this . getFile ( ) , UpdateType . DEFAULT , true ) ;
Buggy code:
public class CmdDisband extends FCommand { public CmdDisband ( ) { } @ Override public void perform ( ) { Faction faction = this . argAsFaction ( 0 , ( ( fme ) == null ? null : myFaction ) ) ; if ( faction == null ) return ; if ( ! ( DISBAND . has ( sender , faction , true ) ) ) return ; if ( faction . getFlag ( PERMANENT ) ) { msg ( "<i>This<seq2seq4repair_space>faction<seq2seq4repair_space>is<seq2seq4repair_space>designated<seq2seq4repair_space>as<seq2seq4repair_space>permanent,<seq2seq4repair_space>so<seq2seq4repair_space>you<seq2seq4repair_space>cannot<seq2seq4repair_space>disband<seq2seq4repair_space>it." ) ; return ; } for ( FPlayer fplayer : i . getOnline ( ) ) { String who = ( senderIsConsole ) ? "A<seq2seq4repair_space>server<seq2seq4repair_space>admin" : fme . describeTo ( fplayer ) ; if ( ( fplayer . getFaction ( ) ) == faction ) { fplayer . msg ( "<h>%s<i><seq2seq4repair_space>disbanded<seq2seq4repair_space>your<seq2seq4repair_space>faction." , who ) ; } else { fplayer . msg ( "<h>%s<i><seq2seq4repair_space>disbanded<seq2seq4repair_space>the<seq2seq4repair_space>faction<seq2seq4repair_space>%s." , who , faction . getTag ( fplayer ) ) ; } } if ( Conf . logFactionDisband ) p . log ( ( ( ( ( ( ( "The<seq2seq4repair_space>faction<seq2seq4repair_space>" + ( faction . getTag ( ) ) ) + "<seq2seq4repair_space>(" ) + ( faction . getId ( ) ) ) + ")<seq2seq4repair_space>was<seq2seq4repair_space>disbanded<seq2seq4repair_space>by<seq2seq4repair_space>" ) + ( senderIsConsole ? "console<seq2seq4repair_space>command" : fme . getName ( ) ) ) + "." ) ) ; <START_BUG> if ( Econ . shouldBeUsed ( ) ) { <END_BUG> double amount = Econ . getBalance ( faction . getAccountId ( ) ) ; Econ . transferMoney ( fme , faction , fme , amount , false ) ; if ( amount > 0.0 ) { String amountString = Econ . moneyString ( amount ) ; msg ( "<i>You<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>the<seq2seq4repair_space>disbanded<seq2seq4repair_space>faction's<seq2seq4repair_space>bank,<seq2seq4repair_space>totaling<seq2seq4repair_space>%s." , amountString ) ; p . log ( ( ( ( ( ( ( fme . getName ( ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>given<seq2seq4repair_space>bank<seq2seq4repair_space>holdings<seq2seq4repair_space>of<seq2seq4repair_space>" ) + amountString ) + "<seq2seq4repair_space>from<seq2seq4repair_space>disbanding<seq2seq4repair_space>" ) + ( faction . getTag ( ) ) ) + "." ) ) ; } } faction . detach ( ) ; SpoutFeatures . updateAppearances ( ) ; } }

Fix:
if ( ( Econ . shouldBeUsed ( ) ) && ( ! ( senderIsConsole ) ) ) {
Buggy code:
public class ServicePair < T > { private BundleContext ctx ; private ServiceReference ref ; private T serviceObject ; public ServicePair ( BundleContext context , ServiceReference serviceRef ) { } public ServicePair ( BundleContext context , ServiceReference serviceRef , T service ) { } @ SuppressWarnings ( "unchecked" ) public T get ( ) { if ( ( ( serviceObject ) == null ) && ( ( ref . getBundle ( ) ) != null ) ) { <START_BUG> serviceObject = ( ( T ) ( ctx . getService ( ref ) ) ) ; <END_BUG> } return serviceObject ; } public boolean isValid ( ) { } public void unget ( ) { } public ServiceReference getReference ( ) { } }

Fix:
serviceObject = ( ( T ) ( Utils . getServicePrivileged ( ctx , ref ) ) ) ;
Buggy code:
public class MonthDayDV extends AbstractDateTimeDV { private static final int MONTHDAY_SIZE = 7 ; public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { try { <START_BUG> return parse ( content ) ; <END_BUG> } catch ( Exception ex ) { throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "gMonthDay" } ) ; } } protected int [ ] parse ( String str ) throws SchemaDateTimeException { } protected String dateToString ( int [ ] date ) { } }

Fix:
return new DateTimeData ( parse ( content ) , this ) ;
Buggy code:
public class SingleTypeReference extends TypeReference { public char [ ] token ; public SingleTypeReference ( char [ ] source , long pos ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { TypeBinding memberType = scope . getMemberType ( token , enclosingType ) ; if ( ! ( memberType . isValidBinding ( ) ) ) { this . resolvedType = memberType ; scope . problemReporter ( ) . invalidEnclosingType ( this , memberType , enclosingType ) ; return null ; } if ( isTypeUseDeprecated ( memberType , scope ) ) scope . problemReporter ( ) . deprecatedType ( memberType , this ) ; memberType = scope . environment ( ) . convertToRawType ( memberType ) ; <START_BUG> if ( ( memberType . isRawType ( ) ) && ( scope . compilerOptions ( ) . reportRawTypeReference ) ) { <END_BUG> scope . problemReporter ( ) . rawTypeReference ( this , memberType ) ; } return this . resolvedType = memberType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
if ( ( ( memberType . isRawType ( ) ) && ( ( ( this . bits ) & ( ASTNode . IgnoreRawTypeCheck ) ) == 0 ) ) && ( scope . compilerOptions ( ) . reportRawTypeReference ) ) {
Buggy code:
public class VersionedListNodeData implements Releasable { public final VersionedListNode thisNode ; public final int level ; public final int totalSize ; public final long created ; public final long deleted ; public final VersionedListNode leftNode ; public final Object value ; public final VersionedListNode rightNode ; protected final ImmutableFactory valueFactory ; public VersionedListNodeData ( VersionedListNode thisNode ) { } public VersionedListNodeData ( VersionedListNode thisNode , int level , int totalSize , long created , long deleted , VersionedListNode leftNode , Object value , VersionedListNode rightNode ) { } public VersionedListNodeData ( VersionedListNode thisNode , ByteBuffer byteBuffer ) { } public boolean isNil ( ) { } public int getDurableLength ( ) { } public void serialize ( ByteBuffer byteBuffer ) { } public boolean exists ( long time ) { } public int size ( long time ) { } public VersionedListNode getListNode ( int ndx ) { } public Object getExistingValue ( long time ) { } public int getIndex ( Object value , long time ) { } public int getIndexRight ( Object value , long time ) { } public int findIndex ( Object value , long time ) { } public int findIndexRight ( Object value , long time ) { } public int higherIndex ( int ndx , long time ) { } public int ceilingIndex ( int ndx , long time ) { } public int lowerIndex ( int ndx , long time ) { } public int floorIndex ( int ndx , long time ) { } public boolean isEmpty ( long time ) { } public void flatList ( List list , long time ) { } public VersionedListNode skew ( ) { if ( ( isNil ( ) ) || ( leftNode . isNil ( ) ) ) return thisNode ; VersionedListNodeData leftData = leftNode . getData ( ) ; if ( ( leftData . level ) == ( level ) ) { <START_BUG> VersionedListNode t = new VersionedListNodeImpl ( thisNode . getRegistry ( ) , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . leftNode . totalSize ( ) ) ) , created , deleted , leftData . rightNode , value , rightNode ) ; <END_BUG> return new VersionedListNodeImpl ( thisNode . getRegistry ( ) , leftData . level , totalSize , leftData . created , leftData . deleted , leftData . leftNode , leftData . value , t ) ; } else return thisNode ; } public VersionedListNode split ( ) { } public VersionedListNode add ( int ndx , Object value , long created , long deleted ) { } public VersionedListNode remove ( int ndx , long time ) { } public VersionedListNode copyList ( VersionedListNode n , long time ) { } public VersionedListNode clearList ( long time ) { } @ Override public void releaseAll ( ) throws IOException { } }

Fix:
VersionedListNode t = new VersionedListNodeImpl ( thisNode . getRegistry ( ) , level , ( ( ( totalSize ) - ( leftData . totalSize ) ) + ( leftData . rightNode . totalSize ( ) ) ) , created , deleted , leftData . rightNode , value , rightNode ) ;
Buggy code:
final class CollectionToArrayConverter implements ConditionalGenericConverter { private final ConversionService conversionService ; public CollectionToArrayConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public boolean matches ( TypeDescriptor sourceType , TypeDescriptor targetType ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( source == null ) { return null ; } Collection < ? > sourceCollection = ( ( Collection < ? > ) ( source ) ) ; Object array = Array . newInstance ( targetType . getElementType ( ) , sourceCollection . size ( ) ) ; int i = 0 ; for ( Object sourceElement : sourceCollection ) { <START_BUG> Object targetElement = this . conversionService . convert ( sourceElement , sourceType . getElementTypeDescriptor ( sourceElement ) , targetType . getElementTypeDescriptor ( ) ) ; <END_BUG> Array . set ( array , ( i ++ ) , targetElement ) ; } return array ; } }

Fix:
Object targetElement = this . conversionService . convert ( sourceElement , sourceType . getElementTypeDescriptor ( ) , targetType . getElementTypeDescriptor ( ) ) ;
Buggy code:
public class RemoteHeaderCache extends AbstractFolderHeaderCache { public RemoteHeaderCache ( Folder folder ) { } public void load ( ) throws Exception { log . info ( ( "loading<seq2seq4repair_space>header-cache=" + ( headerFile ) ) ) ; headerList = new HeaderList ( ) ; ObjectInputStream p = openInputStream ( ) ; int capacity = 0 ; if ( ( p . available ( ) ) > 0 ) capacity = p . readInt ( ) ; log . info ( ( "capacity=" + capacity ) ) ; if ( ( getObservable ( ) ) != null ) { getObservable ( ) . setMessage ( MailResourceLoader . getString ( "statusbar" , "message" , "load_headers" ) ) ; getObservable ( ) . setMax ( capacity ) ; getObservable ( ) . resetCurrent ( ) ; } for ( int i = 1 ; i <= capacity ; i ++ ) { if ( ( getObservable ( ) ) != null ) getObservable ( ) . setCurrent ( i ) ; ColumbaHeader h = new ColumbaHeader ( ) ; loadHeader ( p , h ) ; headerList . add ( h , ( ( Integer ) ( h . get ( "columba.uid" ) ) ) ) ; } closeInputStream ( ) ; if ( ( getObservable ( ) ) != null ) { <START_BUG> getObservable ( ) . clearMessage ( 500 ) ; <END_BUG> getObservable ( ) . resetCurrent ( ) ; } } public void save ( ) throws Exception { } protected void loadHeader ( ObjectInputStream p , HeaderInterface h ) throws Exception { } protected void saveHeader ( ObjectOutputStream p , HeaderInterface h ) throws Exception { } }

Fix:
getObservable ( ) . clearMessageWithDelay ( ) ;
Buggy code:
public class ExceptionHandlingFlowContext extends FlowContext { public ReferenceBinding [ ] handledExceptions ; public static final int BitCacheSize = 32 ; int [ ] isReached ; int [ ] isNeeded ; UnconditionalFlowInfo [ ] initsOnExceptions ; ObjectCache indexes = new ObjectCache ( ) ; boolean isMethodContext ; public UnconditionalFlowInfo initsOnReturn ; public ArrayList extendedExceptions ; public ExceptionHandlingFlowContext ( FlowContext parent , ASTNode associatedNode , ReferenceBinding [ ] handledExceptions , BlockScope scope , UnconditionalFlowInfo flowInfo ) { } public void complainIfUnusedExceptionHandlers ( AbstractMethodDeclaration method ) { MethodScope scope = method . scope ; <START_BUG> if ( ( ( ( method . binding . modifiers ) & ( ( CompilerModifiers . AccOverriding ) | ( CompilerModifiers . AccImplementing ) ) ) != 0 ) && ( ! ( scope . environment ( ) . options . reportUnusedDeclaredThrownExceptionWhenOverriding ) ) ) { <END_BUG> return ; } for ( int i = 0 , count = handledExceptions . length ; i < count ; i ++ ) { int index = indexes . get ( handledExceptions [ i ] ) ; int cacheIndex = index // ( ExceptionHandlingFlowContext . BitCacheSize ) ; int bitMask = 1 << ( index % ( ExceptionHandlingFlowContext . BitCacheSize ) ) ; if ( ( ( isReached [ cacheIndex ] ) & bitMask ) == 0 ) { scope . problemReporter ( ) . unusedDeclaredThrownException ( handledExceptions [ index ] , method , method . thrownExceptions [ index ] ) ; } } } public void complainIfUnusedExceptionHandlers ( BlockScope scope , TryStatement tryStatement ) { } public String individualToString ( ) { } public UnconditionalFlowInfo initsOnException ( ReferenceBinding exceptionType ) { } public UnconditionalFlowInfo initsOnReturn ( ) { } public void recordHandlingException ( ReferenceBinding exceptionType , UnconditionalFlowInfo flowInfo , TypeBinding raisedException , ASTNode invocationSite , boolean wasAlreadyDefinitelyCaught ) { } public void recordReturnFrom ( FlowInfo flowInfo ) { } public void mergeUnhandledException ( TypeBinding newException ) { } }

Fix:
if ( ( ( ( method . binding . modifiers ) & ( ( CompilerModifiers . AccOverriding ) | ( CompilerModifiers . AccImplementing ) ) ) != 0 ) && ( ! ( scope . compilerOptions ( ) . reportUnusedDeclaredThrownExceptionWhenOverriding ) ) ) {
Buggy code:
public class KalmanFilter { private final ProcessModel processModel ; private final MeasurementModel measurementModel ; private RealMatrix transitionMatrix ; private RealMatrix transitionMatrixT ; private RealMatrix controlMatrix ; private RealMatrix measurementMatrix ; private RealMatrix measurementMatrixT ; private RealVector stateEstimation ; private RealMatrix errorCovariance ; public KalmanFilter ( final ProcessModel process , final MeasurementModel measurement ) { } public int getStateDimension ( ) { } public int getMeasurementDimension ( ) { } public double [ ] getStateEstimation ( ) { <START_BUG> return stateEstimation . getData ( ) ; <END_BUG> } public RealVector getStateEstimationVector ( ) { } public double [ ] [ ] getErrorCovariance ( ) { } public RealMatrix getErrorCovarianceMatrix ( ) { } public void predict ( ) { } public void predict ( final double [ ] u ) { } public void predict ( final RealVector u ) { } public void correct ( final double [ ] z ) { } public void correct ( final RealVector z ) { } }

Fix:
return stateEstimation . toArray ( ) ;
Buggy code:
public class PNGExporter implements ByteExporter , VectorExporter , LongTask { private ProgressTicket progress ; private boolean cancel = false ; private Workspace workspace ; private OutputStream stream ; private int width = 1024 ; private int height = 1024 ; private boolean transparentBackground = false ; private int margin = 4 ; private G2DTarget target ; private Color oldColor ; @ Override public boolean execute ( ) { } public int getHeight ( ) { } public void setHeight ( int height ) { } public int getWidth ( ) { } public void setWidth ( int width ) { } public int getMargin ( ) { } public void setMargin ( int margin ) { } public boolean isTransparentBackground ( ) { } public void setTransparentBackground ( boolean transparentBackground ) { } @ Override public void setWorkspace ( Workspace workspace ) { } @ Override public Workspace getWorkspace ( ) { } @ Override public void setOutputStream ( OutputStream stream ) { } @ Override public boolean cancel ( ) { } @ Override public void setProgressTicket ( ProgressTicket progressTicket ) { } private synchronized void setExportProperties ( PreviewModel m ) { PreviewProperties props = m . getProperties ( ) ; props . putValue ( VISIBILITY_RATIO , 1.0F ) ; props . putValue ( "width" , width ) ; props . putValue ( "height" , height ) ; oldColor = props . getColorValue ( BACKGROUND_COLOR ) ; if ( transparentBackground ) { <START_BUG> props . putValue ( BACKGROUND_COLOR , new Color ( 255 , 255 , 255 , 0 ) ) ; <END_BUG> } props . putValue ( MARGIN , new Float ( margin ) ) ; } private synchronized void discardExportProperties ( PreviewModel m ) { } }

Fix:
props . putValue ( BACKGROUND_COLOR , null ) ;