nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TestStopFilter extends BaseTokenStreamTestCase { public void testExactCase ( ) throws IOException { } public void testStopFilt ( ) throws IOException { } public void testStopPositons ( ) throws IOException { } public void testEndStopword ( ) throws Exception { CharArraySet stopSet = StopFilter . makeStopSet ( TEST_VERSION_CURRENT , "of" ) ; <START_BUG> StopFilter stpf = new StopFilter ( Version . LUCENE_40 , new MockTokenizer ( new StringReader ( "test<seq2seq4repair_space>of" ) , MockTokenizer . WHITESPACE , false ) , stopSet ) ; <END_BUG> assertTokenStreamContents ( stpf , new String [ ] { "test" } , new int [ ] { 0 } , new int [ ] { 4 } , null , new int [ ] { 1 } , null , 7 , 1 , null , true ) ; } private void doTestStopPositons ( StopFilter stpf , boolean enableIcrements ) throws IOException { } private static void log ( String s ) { } private class MockSynonymFilter extends TokenFilter { State bufferedState ; CharTermAttribute termAtt = addAttribute ( CharTermAttribute . class ) ; PositionIncrementAttribute posIncAtt = addAttribute ( PositionIncrementAttribute . class ) ; MockSynonymFilter ( TokenStream input ) { } @ Override public boolean incrementToken ( ) throws IOException { } @ Override public void reset ( ) throws IOException { } } public void testFirstPosInc ( ) throws Exception { } }

Fix:
StopFilter stpf = new StopFilter ( TEST_VERSION_CURRENT , new MockTokenizer ( new StringReader ( "test<seq2seq4repair_space>of" ) , MockTokenizer . WHITESPACE , false ) , stopSet ) ;
Buggy code:
public class CopyMessageFolderTest extends AbstractFolderTest { public CopyMessageFolderTest ( String arg0 ) { } public CopyMessageFolderTest ( MailboxTstFactory factory , String arg0 ) { } public void testCopyMessageAttribute2 ( ) throws Exception { String input = FolderTstHelper . getString ( 0 ) ; System . out . println ( ( "input=" + input ) ) ; ByteArrayInputStream inputStream = FolderTstHelper . getByteArrayInputStream ( input ) ; Object uid = getSourceFolder ( ) . addMessage ( inputStream ) ; inputStream . close ( ) ; Flags oldFlags = getSourceFolder ( ) . getFlags ( uid ) ; oldFlags . setSeen ( false ) ; <START_BUG> oldFlags . setRecent ( true ) ; <END_BUG> oldFlags . setFlagged ( true ) ; oldFlags . setExpunged ( false ) ; InputStream is = getSourceFolder ( ) . getMessageSourceStream ( uid ) ; Attributes attributes = getSourceFolder ( ) . getAttributes ( uid ) ; uid = getDestFolder ( ) . addMessage ( is , attributes , oldFlags ) ; is . close ( ) ; Flags flags = getDestFolder ( ) . getFlags ( uid ) ; assertEquals ( "copied<seq2seq4repair_space>message<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>not<seq2seq4repair_space>seen" , false , flags . getSeen ( ) ) ; assertEquals ( "copied<seq2seq4repair_space>message<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>flagged" , true , flags . getFlagged ( ) ) ; assertEquals ( "copied<seq2seq4repair_space>message<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>marked<seq2seq4repair_space>as<seq2seq4repair_space>not<seq2seq4repair_space>expunged" , false , flags . getExpunged ( ) ) ; inputStream . close ( ) ; } }

Fix:
oldFlags . setRecent ( false ) ;
Buggy code:
public class TestDualTreeBidiMap2 < K extends Comparable < K > , V extends Comparable < V > > extends AbstractTestSortedBidiMap < K , V > { public static void main ( String [ ] args ) { } public static Test suite ( ) { } public TestDualTreeBidiMap2 ( String testName ) { } public DualTreeBidiMap < K , V > makeObject ( ) { } public TreeMap < K , V > makeConfirmedMap ( ) { } public void testComparator ( ) { } @ SuppressWarnings ( "unchecked" ) public void testSerializeDeserializeCheckComparator ( ) throws Exception { } public void testSortOrder ( ) throws Exception { SortedBidiMap < K , V > sm = TestDualTreeBidiMap2 . makeFullMap ( ) ; <START_BUG> List < K > newSortedKeys = Arrays . asList ( TestDualTreeBidiMap2 . getSampleKeys ( ) ) ; <END_BUG> Collections . sort ( newSortedKeys , new org . apache . commons . collections . comparators . ReverseComparator < K > ( ComparableComparator . < K > getInstance ( ) ) ) ; newSortedKeys = Collections . unmodifiableList ( newSortedKeys ) ; Iterator < K > mapIter = sm . keySet ( ) . iterator ( ) ; Iterator < K > expectedIter = newSortedKeys . iterator ( ) ; while ( expectedIter . hasNext ( ) ) { K expectedKey = expectedIter . next ( ) ; K mapKey = mapIter . next ( ) ; TestDualTreeBidiMap2 . assertNotNull ( "key<seq2seq4repair_space>in<seq2seq4repair_space>sorted<seq2seq4repair_space>list<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" , expectedKey ) ; TestDualTreeBidiMap2 . assertNotNull ( "key<seq2seq4repair_space>in<seq2seq4repair_space>map<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" , mapKey ) ; TestDualTreeBidiMap2 . assertEquals ( "key<seq2seq4repair_space>from<seq2seq4repair_space>sorted<seq2seq4repair_space>list<seq2seq4repair_space>and<seq2seq4repair_space>map<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>equal" , expectedKey , mapKey ) ; } } public String getCompatibilityVersion ( ) { } public String [ ] ignoredTests ( ) { } }

Fix:
List < K > newSortedKeys = getAsList ( TestDualTreeBidiMap2 . getSampleKeys ( ) ) ;
Buggy code:
public interface ISynchConnectionEventHandler extends IConnectionEventHandler { <START_BUG> public Object handleSynchEvent ( ConnectionEvent event ) throws IOException ; <END_BUG> }

Fix:
public Object handleSynchEvent ( SynchConnectionEvent event ) throws IOException ;
Buggy code:
class CLabelTab extends AlignableTab { CLabel label1 ; CLabel label2 ; CLabel label3 ; Group textLabelGroup ; Button shadowInButton ; Button shadowOutButton ; Button shadowNoneButton ; CLabelTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Widget [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Text" , "ToolTipText" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetAlignment ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "BottomMargin" , "LeftMargin" , "RightMargin" , "Text" , "ToolTipText" , "TopMargin" } ;
Buggy code:
public class LdapExtClient { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String CONTEXT_IS_NULL = "Context<seq2seq4repair_space>is<seq2seq4repair_space>null" ; public LdapExtClient ( ) { } public DirContext connect ( String host , String port , String rootdn , String username , String password , String connTimeOut , boolean secure ) throws NamingException { DirContext dirContext ; Hashtable < String , String > env = new Hashtable < String , String > ( ) ; env . put ( Context . INITIAL_CONTEXT_FACTORY , "com.sun.jndi.ldap.LdapCtxFactory" ) ; <START_BUG> StringBuffer sb = new StringBuffer ( 80 ) ; <END_BUG> if ( secure ) { sb . append ( "ldaps:////" ) ; } else { sb . append ( "ldap:////" ) ; } sb . append ( host ) ; if ( ( port . length ( ) ) > 0 ) { sb . append ( ":" ) ; sb . append ( port ) ; } sb . append ( "//" ) ; sb . append ( rootdn ) ; env . put ( Context . PROVIDER_URL , sb . toString ( ) ) ; LdapExtClient . log . info ( ( "prov_url=<seq2seq4repair_space>" + ( env . get ( Context . PROVIDER_URL ) ) ) ) ; if ( ( connTimeOut . length ( ) ) > 0 ) { env . put ( "com.sun.jndi.ldap.connect.timeout" , connTimeOut ) ; } env . put ( Context . REFERRAL , "throw" ) ; env . put ( "java.naming.batchsize" , "0" ) ; env . put ( Context . SECURITY_CREDENTIALS , password ) ; env . put ( Context . SECURITY_PRINCIPAL , username ) ; dirContext = new InitialDirContext ( env ) ; return dirContext ; } public void disconnect ( DirContext dirContext ) { } public NamingEnumeration < SearchResult > searchTest ( DirContext dirContext , String searchBase , String searchFilter , int scope , long countlim , int timelim , String [ ] attrs , boolean retobj , boolean deref ) throws NamingException { } public NamingEnumeration < SearchResult > compare ( DirContext dirContext , String filter , String entrydn ) throws NamingException { } public void moddnOp ( DirContext dirContext , String ddn , String newdn ) throws NamingException { } public void modifyTest ( DirContext dirContext , ModificationItem [ ] mods , String string ) throws NamingException { } public DirContext createTest ( DirContext dirContext , Attributes attributes , String string ) throws NamingException { } public void deleteTest ( DirContext dirContext , String string ) throws NamingException { } }

Fix:
StringBuilder sb = new StringBuilder ( 80 ) ;
Buggy code:
public class DomainServerCommunicationServices implements Serializable , ServiceActivator { private static final OptionMap DEFAULTS = OptionMap . create ( RECEIVE_WINDOW_SIZE , WINDOW_SIZE ) ; private static final long serialVersionUID = 1593964083902839384L ; private final ModelNode endpointConfig ; private final InetSocketAddress managementSocket ; private final String serverName ; private final String serverProcessName ; private final byte [ ] authKey ; private final boolean managementSubsystemEndpoint ; DomainServerCommunicationServices ( ModelNode endpointConfig , InetSocketAddress managementSocket , String serverName , String serverProcessName , byte [ ] authKey , boolean managementSubsystemEndpoint ) { } @ Override public void activate ( final ServiceActivatorContext serviceActivatorContext ) throws ServiceRegistryException { final ServiceTarget serviceTarget = serviceActivatorContext . getServiceTarget ( ) ; final ServiceName endpointName = ( managementSubsystemEndpoint ) ? RemotingServices . SUBSYSTEM_ENDPOINT : ManagementRemotingServices . MANAGEMENT_ENDPOINT ; final EndpointService . EndpointType endpointType = ( managementSubsystemEndpoint ) ? EndpointType . SUBSYSTEM : EndpointType . MANAGEMENT ; try { final OptionMap options = EndpointConfigFactory . create ( DEFAULT , endpointConfig , DomainServerCommunicationServices . DEFAULTS ) ; ManagementRemotingServices . installRemotingEndpoint ( serviceTarget , endpointName , SecurityActions . getSystemProperty ( NODE_NAME ) , endpointType , options , null , null ) ; final int port = managementSocket . getPort ( ) ; final String host = managementSocket . getAddress ( ) . getHostAddress ( ) ; <START_BUG> HostControllerConnectionService service = new HostControllerConnectionService ( host , port , serverName , serverProcessName , authKey ) ; <END_BUG> serviceTarget . addService ( SERVICE_NAME , service ) . addDependency ( endpointName , Endpoint . class , service . getEndpointInjector ( ) ) . addDependency ( ControlledProcessStateService . SERVICE_NAME , ControlledProcessStateService . class , service . getProcessStateServiceInjectedValue ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } catch ( OperationFailedException e ) { throw new ServiceRegistryException ( e ) ; } } public static ServiceActivator create ( final ModelNode endpointConfig , final InetSocketAddress managementSocket , final String serverName , final String serverProcessName , final byte [ ] authKey , final boolean managementSubsystemEndpoint ) { } }

Fix:
HostControllerConnectionService service = new HostControllerConnectionService ( host , port , serverName , serverProcessName , authKey , managementSubsystemEndpoint ) ;
Buggy code:
public class ExtendedResolver { public class Receiver implements ResolverListener { public void receiveMessage ( int id , Message m ) { } } static final int quantum = 15 ; Resolver [ ] resolvers ; boolean [ ] invalid ; ExtendedResolver . Receiver receiver ; Vector queue ; Hashtable idMap ; public ExtendedResolver ( ) throws UnknownHostException { } boolean sendTo ( Message query , int r , int q ) { } public Message send ( Message query ) { int q ; int r ; Message nx = null ; byte rcode ; for ( q = 0 ; q < 20 ; q ++ ) { boolean ok = false ; for ( r = 0 ; r < ( resolvers . length ) ; r ++ ) ok |= sendTo ( query , r , q ) ; if ( ! ok ) <START_BUG> return null ; <END_BUG> Message m = null ; synchronized ( queue ) { try { queue . wait ( ( ( ( ExtendedResolver . quantum ) + 1 ) * 1000 ) ) ; } catch ( InterruptedException e ) { System . out . println ( "interrupted" ) ; } if ( ( queue . size ( ) ) == 0 ) continue ; m = ( ( Message ) ( queue . firstElement ( ) ) ) ; queue . removeElementAt ( 0 ) ; Integer I = ( ( Integer ) ( queue . firstElement ( ) ) ) ; queue . removeElementAt ( 0 ) ; r = I . intValue ( ) ; } if ( m == null ) invalid [ r ] = true ; else { rcode = m . getHeader ( ) . getRcode ( ) ; if ( rcode == ( Rcode . NOERROR ) ) return m ; else { if ( ( rcode == ( Rcode . NXDOMAIN ) ) && ( nx == null ) ) nx = m ; invalid [ r ] = true ; } } } return nx ; } public Resolver getResolver ( int i ) { } public Resolver [ ] getResolvers ( ) { } }

Fix:
break ;
Buggy code:
public class FixPipsTask extends ListenableAsyncTask < String , Void , String > { private final String LOG_TAG = FixPipsTask . class . getSimpleName ( ) ; private Stuff stuff ; private String user ; private Integer pips ; private String comment ; public FixPipsTask ( Stuff newStuff , String newUser , Integer newPips , String newComment ) { } private HttpPatch getHttpatch ( ) throws IOException , JSONException { } private HttpPost getHttpPost ( ) throws IOException , JSONException { JSONObject json = new JSONObject ( ) ; <START_BUG> json . put ( "stuff_id" , stuff . getStuffId ( ) ) ; <END_BUG> json . put ( "pips" , pips ) ; json . put ( "user" , user ) ; json . put ( "comment" , comment ) ; StringEntity se = new StringEntity ( json . toString ( ) ) ; HttpPost httppost = new HttpPost ( "http:////pipfix.herokuapp.com//api//votes//" ) ; httppost . setEntity ( se ) ; httppost . addHeader ( "Content-Type" , "application//json" ) ; Log . v ( LOG_TAG , ( "Responseeeee<seq2seq4repair_space>" + ( httppost . toString ( ) ) ) ) ; return httppost ; } @ Override protected String doInBackground ( String ... params ) { } }

Fix:
json . put ( "stuff" , stuff . getStuffId ( ) ) ;
Buggy code:
public class RegisteredDevices extends Controller { public static Result index ( ) { } private static List < RegisteredDevice > fetchRegisteredDevices ( ) { <START_BUG> return Arrays . asList ( new RegisteredDevice [ ] { new RegisteredDevice ( "yg" , "jsasjsl" , "test" ) , new RegisteredDevice ( "bg" , "aksjdslk" , "test2" ) } ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return Arrays . asList ( new RegisteredDevice [ ] { new RegisteredDevice ( "GM" , "Chevrolet-UVA-001" , "Cvt-OA4" , "10.110.9.144" , "c1" , "Connected" ) , new RegisteredDevice ( "GM" , "Chevrolet-Spark-001" , "Cvt-QJ3" , "10.110.11.134" , "c2" , "Connected" ) } ) ;
Buggy code:
public class TestSingletonMap < K , V > extends AbstractTestOrderedMap < K , V > { private static final Integer ONE = new Integer ( 1 ) ; private static final Integer TWO = new Integer ( 2 ) ; private static final String TEN = "10" ; public TestSingletonMap ( String testName ) { } public static Test suite ( ) { } @ Override public OrderedMap < K , V > makeObject ( ) { <START_BUG> return UnmodifiableOrderedMap . decorate ( ListOrderedMap . decorate ( new HashMap < K , V > ( ) ) ) ; <END_BUG> } @ Override public String [ ] ignoredTests ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public SingletonMap < K , V > makeFullMap ( ) { } @ Override public boolean isPutAddSupported ( ) { } @ Override public boolean isRemoveSupported ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public K [ ] getSampleKeys ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public V [ ] getSampleValues ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public V [ ] getNewSampleValues ( ) { } public void testClone ( ) { } public void testKeyValue ( ) { } public void testBoundedMap ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return UnmodifiableOrderedMap . unmodifiableOrderedMap ( ListOrderedMap . listOrderedMap ( new HashMap < K , V > ( ) ) ) ;
Buggy code:
public class AddObject extends Fragment implements View . OnClickListener , View . OnFocusChangeListener { public static final String SAVED_PHOTO_PATH = "mCapturedPhotoPath" ; public static final String SAVED_IMG_PATH = "mImagePath" ; private EditText mNameEditText ; private EditText mDescripitionEditText ; private Button mAddCategoryButton ; private String [ ] mCategoriesList ; private ImageView mImageView ; private static int RESULT_LOAD_IMAGE = 147 ; private String mCapturedPhotoPath ; String mImagePath ; private static final String IMAGE_DIRECTORY_NAME = "reusame" ; public static final int MEDIA_TYPE_IMAGE = 1 ; public static AddObject newInstance ( ) { } public AddObject ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void sendArticle ( ) { Item item = new Item ( ) ; if ( mNameEditText . getText ( ) . toString ( ) . equals ( "" ) ) { mNameEditText . setError ( getString ( add_item_empty_field ) ) ; } else if ( mDescripitionEditText . getText ( ) . toString ( ) . equals ( "" ) ) { mDescripitionEditText . setError ( getString ( add_item_empty_field ) ) ; } else if ( mAddCategoryButton . getText ( ) . equals ( getResources ( ) . getString ( fragment_add_object_category_chose ) ) ) { Toast . makeText ( getActivity ( ) , getString ( add_item_no_category ) , LENGTH_SHORT ) . show ( ) ; } else <START_BUG> if ( ( mImagePath ) != null ) { <END_BUG> Toast . makeText ( getActivity ( ) , getString ( add_item_no_image ) , LENGTH_SHORT ) . show ( ) ; } else { item . setName ( mNameEditText . getText ( ) . toString ( ) ) ; item . setDescription ( mDescripitionEditText . getText ( ) . toString ( ) ) ; item . setCategory ( mAddCategoryButton . getText ( ) . toString ( ) ) ; item . setImage ( mImagePath ) ; LatLng latLng = Utils . getLastLocation ( getActivity ( ) ) ; Location location = new Location ( ) ; location . setLatPosition ( String . valueOf ( latLng . latitude ) ) ; location . setLongPosition ( String . valueOf ( latLng . longitude ) ) ; location . setLocation ( "" ) ; item . setLocation ( location ) ; Client . createItem ( item ) ; showAlertView ( ) ; } } public void showAlertView ( ) { } public String getPath ( Uri uri ) { } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void onClick ( View v ) { } @ Override public void onFocusChange ( View v , boolean hasFocus ) { } public interface OnFragmentInteractionListener { } public void setCategory ( ) { } private void openImageIntent ( ) { } public Uri getOutputMediaFileUri ( int type ) { } private static File getOutputMediaFile ( int type ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onSaveInstanceState ( Bundle savedInstanceState ) { } }

Fix:
if ( ( mImagePath ) == null ) {
Buggy code:
@ Repository public class ProjectDAOImpl implements ProjectDAO { private static final Logger logger = LoggerFactory . getLogger ( ProjectDAOImpl . class ) ; private SessionFactory sessionFactory ; private DAOHelper daoHelper = new DAOHelper ( ) ; public void setSessionFactory ( SessionFactory sessionFactory ) { } public void create ( Project project ) { } @ SuppressWarnings ( "unchecked" ) public List < Project > list ( Long companyID ) { } @ Override public Project getByID ( long id ) { } @ Override public void update ( Project project ) { } @ Override public void delete ( long id ) { } @ SuppressWarnings ( "unchecked" ) public List < Project > listWithAllCollections ( Long companyID ) { } @ Override public Project getByIDWithAllCollections ( long id ) { } @ SuppressWarnings ( "unchecked" ) @ Override public List < Project > listWithTasks ( Long id ) { } @ Override public String getNameByID ( long projectID ) { } @ SuppressWarnings ( "unchecked" ) @ Override <START_BUG> @ Cacheable ( value = "searchProjectCache" , key = "#root.targetClass" ) <END_BUG> public List < Project > listFromCache ( Long companyID ) { Session session = this . sessionFactory . getCurrentSession ( ) ; List < Project > list = this . daoHelper . getSelectQueryFilterCompany ( session , Project . class . getName ( ) , companyID ) . list ( ) ; return list ; } No newline ; at end ; of file ; }

Fix:
@ Cacheable ( value = "searchProjectCache" , key = "#root.methodName" )
Buggy code:
public class ReplyAsAttachmentCommand extends FolderCommand { ComposerController controller ; public ReplyAsAttachmentCommand ( FrameController frameController , DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { Folder folder = ( ( Folder ) ( ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getFolder ( ) ) ) ; Object [ ] uids = ( ( org . columba . mail . command . FolderCommandReference ) ( getReferences ( ) [ 0 ] ) ) . getUids ( ) ; <START_BUG> Message message = ( ( Message ) ( folder . getMessage ( uids [ 0 ] , worker ) ) ) ; <END_BUG> ColumbaHeader header = ( ( ColumbaHeader ) ( message . getHeader ( ) ) ) ; MimePartTree mimePartTree = folder . getMimePartTree ( uids [ 0 ] , worker ) ; String source = folder . getMessageSource ( uids [ 0 ] , worker ) ; message . setSource ( source ) ; controller = new ComposerController ( frameController ) ; MessageBuilder . getInstance ( ) . createMessage ( message , controller . getModel ( ) , REPLY_AS_ATTACHMENT ) ; } public void undo ( Worker worker ) throws Exception { } public void redo ( Worker worker ) throws Exception { } }

Fix:
Message message = new Message ( ) ;
Buggy code:
public class ClasspathValidation { private JavaProject project ; public ClasspathValidation ( JavaProject project ) { } public void validate ( ) { JavaModelManager . PerProjectInfo perProjectInfo ; try { perProjectInfo = this . project . getPerProjectInfo ( ) ; } catch ( JavaModelException e ) { IProject resource = this . project . getProject ( ) ; if ( resource . isAccessible ( ) ) { this . project . flushClasspathProblemMarkers ( true , true ) ; JavaBuilder . removeProblemsAndTasksFor ( resource ) ; } return ; } IClasspathEntry [ ] rawClasspath ; IPath outputLocation ; IJavaModelStatus status ; synchronized ( perProjectInfo ) { rawClasspath = perProjectInfo . rawClasspath ; outputLocation = perProjectInfo . outputLocation ; status = perProjectInfo . rawClasspathStatus ; } this . project . flushClasspathProblemMarkers ( false , true ) ; if ( ! ( status . isOK ( ) ) ) this . project . createClasspathProblemMarker ( status ) ; this . project . flushClasspathProblemMarkers ( false , false ) ; if ( ( rawClasspath != ( JavaProject . INVALID_CLASSPATH ) ) && ( outputLocation != null ) ) { for ( int i = 0 ; i < ( rawClasspath . length ) ; i ++ ) { <START_BUG> status = ClasspathEntry . validateClasspathEntry ( this . project , rawClasspath [ i ] , false , true ) ; <END_BUG> if ( ! ( status . isOK ( ) ) ) { if ( ( ( status . getCode ( ) ) == ( IJavaModelStatusConstants . INVALID_CLASSPATH ) ) && ( ( ( ClasspathEntry ) ( rawClasspath [ i ] ) ) . isOptional ( ) ) ) continue ; this . project . createClasspathProblemMarker ( status ) ; } } status = ClasspathEntry . validateClasspath ( this . project , rawClasspath , outputLocation ) ; if ( ! ( status . isOK ( ) ) ) this . project . createClasspathProblemMarker ( status ) ; } } }

Fix:
status = ClasspathEntry . validateClasspathEntry ( this . project , rawClasspath [ i ] , false , false ) ;
Buggy code:
public class ElementImpl extends DefaultElement { SchemaDOM schemaDOM ; Attr [ ] attrs ; int row ; int col ; int parentRow ; int line ; int column ; public ElementImpl ( int line , int column ) { } public ElementImpl ( String prefix , String localpart , String rawname , String uri , int line , int column ) { } public Document getOwnerDocument ( ) { } public Node getParentNode ( ) { } public boolean hasChildNodes ( ) { } public Node getFirstChild ( ) { } public Node getLastChild ( ) { } public Node getPreviousSibling ( ) { } public Node getNextSibling ( ) { } public NamedNodeMap getAttributes ( ) { } public boolean hasAttributes ( ) { } public String getTagName ( ) { } public String getAttribute ( String name ) { } public Attr getAttributeNode ( String name ) { } public String getAttributeNS ( String namespaceURI , String localName ) { for ( int i = 0 ; i < ( attrs . length ) ; i ++ ) { <START_BUG> if ( ( attrs [ i ] . getName ( ) . equals ( localName ) ) && ( attrs [ i ] . getNamespaceURI ( ) . equals ( namespaceURI ) ) ) { <END_BUG> return attrs [ i ] . getValue ( ) ; } } return "" ; } public Attr getAttributeNodeNS ( String namespaceURI , String localName ) { } public boolean hasAttribute ( String name ) { } public boolean hasAttributeNS ( String namespaceURI , String localName ) { } public void setAttribute ( String name , String value ) { } public int getLineNumber ( ) { } public int getColumnNumber ( ) { } }

Fix:
if ( ( attrs [ i ] . getLocalName ( ) . equals ( localName ) ) && ( attrs [ i ] . getNamespaceURI ( ) . equals ( namespaceURI ) ) ) {
Buggy code:
public class RotationLockActivity extends Activity { private static final String LOG_TAG = "RL" ; private static final int RETRY_COUNT = 5 ; private static long mTime ; private NotificationManager mNotificationManager ; private boolean mLocked = false ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } private boolean supportAccelerometerRotation ( ) { } private void showPopupMessage ( boolean locked ) { } private void showNotification ( boolean locked ) { int message = ( locked ) ? string . portrait_orientation_locked : string . portrait_orientation_unlocked ; Notification notification = new Notification ( ( locked ? drawable . ic_locked : drawable . ic_unlocked ) , getText ( message ) , System . currentTimeMillis ( ) ) ; PendingIntent contentIntent = PendingIntent . getActivity ( this , 0 , new Intent ( this , RotationLockActivity . class ) , 0 ) ; notification . setLatestEventInfo ( ( ( Context ) ( this ) ) , getText ( app_name ) , ( ( CharSequence ) ( getText ( message ) ) ) , contentIntent ) ; <START_BUG> notification . flags |= Notification . FLAG_ONGOING_EVENT ; <END_BUG> notification . icon = ( locked ) ? drawable . ic_stat_locked : drawable . ic_stat_unlocked ; mNotificationManager . notify ( app_name , notification ) ; } private boolean togglePortraitOrientationLock ( ) { } private boolean isPortraitOrientationLocked ( ) { } private void setPortraitOrientationLock ( boolean lock ) { } private void systemSettingsChange ( ) { } No newline ; at end ; of file ; }

Fix:
notification . flags |= ( Notification . FLAG_NO_CLEAR ) | ( Notification . FLAG_ONGOING_EVENT ) ;
Buggy code:
public class MultisigTransactionViewModel extends TransactionViewModel { private final TransactionViewModel otherTransactionViewModel ; public MultisigTransactionViewModel ( final TransactionMetaDataPair metaDataPair , final Address relativeAccountAddress , final BlockHeight lastBlockHeight ) { } @ Override protected void serializeImpl ( Serializer serializer ) { super . serializeImpl ( serializer ) ; <START_BUG> otherTransactionViewModel . serialize ( serializer ) ; <END_BUG> } }

Fix:
serializer . writeObject ( "inner" , otherTransactionViewModel ) ;
Buggy code:
public class ManagerJobEditActionController extends BaseController { private JobService jobService ; private JobMeta metaJob ; public ManagerJobEditActionController ( ) { } @ Override public Navigation run ( ) throws Exception { Job job = jobService . get ( asKey ( metaJob . key ) ) ; BeanUtil . copy ( request , job ) ; jobService . save ( job ) ; <START_BUG> requestScope ( "jobs" , jobService . getAll ( ) ) ; <END_BUG> return forward ( "manager-uncomplete-job-list.jsp" ) ; } }

Fix:
requestScope ( "jobs" , jobService . getAllUncompleteJobs ( ) ) ;
Buggy code:
public class PeopleAdapter extends RecyclerView . Adapter < PeopleAdapter . ViewHolder > { private final Context mContext ; private List < PeopleResult > popularPeople ; public PeopleAdapter ( Context context ) { } public void setPopularPeople ( List < PeopleResult > people ) { } @ Override public PeopleAdapter . ViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { <START_BUG> View view = LayoutInflater . from ( mContext ) . inflate ( cardview_movie , parent , false ) ; <END_BUG> return new PeopleAdapter . ViewHolder ( view ) ; } @ Override public void onBindViewHolder ( PeopleAdapter . ViewHolder holder , int position ) { } private String getKnowForTexts ( List < KnownFor > knownFor ) { } @ Override public int getItemCount ( ) { } public static class ViewHolder extends RecyclerView . ViewHolder { @ Bind ( id . peopleName ) TextView mPeopleName ; @ Bind ( id . peopleKnownFor ) TextView mKnowFor ; @ Bind ( id . peopleProfileImage ) ImageView mPeopleProfileImage ; public ViewHolder ( View itemView ) { } } }

Fix:
View view = LayoutInflater . from ( mContext ) . inflate ( cardview_people , parent , false ) ;
Buggy code:
public class SimplePageTest extends WicketTestCase { private static final Logger log = LoggerFactory . getLogger ( SimplePageTest . class ) ; public void testRenderHomePage ( ) throws Exception { tester . startComponentInPage ( MyFormComponentPanel . class ) ; String doc = tester . getLastResponseAsString ( ) ; <START_BUG> assertEquals ( doc , "<wicket:panel>test<//wicket:panel>" ) ; <END_BUG> } }

Fix:
assertEquals ( "<wicket:panel>test<//wicket:panel>" , doc ) ;
Buggy code:
public final class ArrayBinding extends TypeBinding { public static final FieldBinding ArrayLength = new FieldBinding ( TypeConstants . LENGTH , TypeBinding . INT , ( ( ClassFileConstants . AccPublic ) | ( ClassFileConstants . AccFinal ) ) , null , Constant . NotAConstant ) ; public TypeBinding leafComponentType ; public int dimensions ; LookupEnvironment environment ; char [ ] constantPoolName ; char [ ] genericTypeSignature ; public ArrayBinding ( TypeBinding type , int dimensions , LookupEnvironment environment ) { } public void collectSubstitutes ( Scope scope , TypeBinding actualType , Map substitutes , int constraint ) { } public char [ ] computeUniqueKey ( boolean isLeaf ) { } public char [ ] constantPoolName ( ) { } public String debugName ( ) { } public int dimensions ( ) { } public TypeBinding elementsType ( ) { } public TypeBinding erasure ( ) { } public LookupEnvironment environment ( ) { } public char [ ] genericTypeSignature ( ) { } public PackageBinding getPackage ( ) { } public int hashCode ( ) { } public boolean isCompatibleWith ( TypeBinding otherType ) { } public int kind ( ) { } public TypeBinding leafComponentType ( ) { } public int problemId ( ) { } public char [ ] qualifiedSourceName ( ) { } public char [ ] readableName ( ) { } public char [ ] shortReadableName ( ) { } public char [ ] sourceName ( ) { } public void swapUnresolved ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType , LookupEnvironment env ) { if ( ( this . leafComponentType ) == unresolvedType ) { <START_BUG> this . leafComponentType = env . convertToRawType ( resolvedType ) ; <END_BUG> this . tagBits |= ( this . leafComponentType . tagBits ) & ( ( TagBits . HasTypeVariable ) | ( TagBits . HasDirectWildcard ) ) ; } } public String toString ( ) { } }

Fix:
this . leafComponentType = env . convertUnresolvedBinaryToRawType ( resolvedType ) ;
Buggy code:
public class TestPlanningDAO extends AbstractSpringUnitTest { @ Autowired PlanningDAO planningDAO ; @ Autowired PersonDAO personDAO ; @ Autowired ParticipantDAO participantDAO ; List < Planning > plannings ; List < Person > persons ; @ Before public void setUp ( ) { } @ After public void after ( ) { } @ Test public void testFindAllByUid ( ) { } @ Test public void testFindAll ( ) { } @ Test public void testFindById ( ) { } @ Test public void testFindParticipants ( ) { Planning p = plannings . get ( 0 ) ; assertTrue ( ( ( p . getId ( ) ) != null ) ) ; Planning retrievedPlanning = planningDAO . findById ( p . getId ( ) ) ; List < Participant > participants = ( ( List < Participant > ) ( planningDAO . findParticipants ( retrievedPlanning ) ) ) ; <START_BUG> assertTrue ( ( ( participants . size ( ) ) > 0 ) ) ; <END_BUG> } }

Fix:
assertEquals ( 3 , participants . size ( ) ) ;
Buggy code:
public class CompilerMessagesPanel extends JPanel implements TaskListManager { private JScrollPane jScrollPane1 = new JScrollPane ( ) ; private JList list = new JList ( ) ; private DefaultListModel listModel = new DefaultListModel ( ) ; private BorderLayout borderLayout1 = new BorderLayout ( ) ; private boolean hasWarning = false ; public CompilerMessagesPanel ( ) { } public void addSourcelineTask ( String message , ISourceLocation sourceLocation , Kind kind ) { } protected void displayMessage ( IMessage message ) { ISourceLocation loc = message . getISourceLocation ( ) ; <START_BUG> Ajde . getDefault ( ) . getEditorManager ( ) . showSourceLine ( loc , true ) ; <END_BUG> Throwable thrown = message . getThrown ( ) ; if ( null != thrown ) { Ajde . getDefault ( ) . getErrorHandler ( ) . handleError ( message . getMessage ( ) , thrown ) ; } } public void addSourcelineTask ( IMessage message ) { } public void addProjectTask ( String message , IMessage . Kind kind ) { } public boolean hasWarning ( ) { } public void clearTasks ( ) { } private void jbInit ( ) throws Exception { } }

Fix:
BrowserManager . getDefault ( ) . getEditorManager ( ) . showSourceLine ( loc , true ) ;
Buggy code:
public class NetworkTestActivity extends AppCompatActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_network_test ) ; Button b = ( ( Button ) ( findViewById ( button ) ) ) ; TextView tv = ( ( TextView ) ( findViewById ( textView ) ) ) ; tv . setText ( Html . fromHtml ( "<p><seq2seq4repair_space><span<seq2seq4repair_space>style=\"color:<seq2seq4repair_space>rgb(0,<seq2seq4repair_space>0,<seq2seq4repair_space>0);<seq2seq4repair_space>font-family:<seq2seq4repair_space>Dotum;<seq2seq4repair_space>font-size:<seq2seq4repair_space>12px;<seq2seq4repair_space>line-height:<seq2seq4repair_space>16.8px;<seq2seq4repair_space>widows:<seq2seq4repair_space>1;\">수업<seq2seq4repair_space>시간에<seq2seq4repair_space>배운<seq2seq4repair_space>2D<seq2seq4repair_space>Graphics와<seq2seq4repair_space>Touch<seq2seq4repair_space>screen<seq2seq4repair_space>event<seq2seq4repair_space>처리기를<seq2seq4repair_space>사용하여,<//span><//p><seq2seq4repair_space><p<seq2seq4repair_space>style=\"widows:<seq2seq4repair_space>1;<seq2seq4repair_space>\"><seq2seq4repair_space><font<seq2seq4repair_space>color=\"#000000\"<seq2seq4repair_space>face=\"Dotum\"><span<seq2seq4repair_space>style=\"line-height:<seq2seq4repair_space>16.799999237060547px;\">간단한<seq2seq4repair_space>라켓볼<seq2seq4repair_space>게임을<seq2seq4repair_space>만들어<seq2seq4repair_space>봅시다.<//span><//font><//p><seq2seq4repair_space><p<seq2seq4repair_space>style=\"widows:<seq2seq4repair_space>1;<seq2seq4repair_space>\"><seq2seq4repair_space><font<seq2seq4repair_space>color=\"#000000\"<seq2seq4repair_space>face=\"Dotum\"><span<seq2seq4repair_space>style=\"line-height:<seq2seq4repair_space>16.799999237060547px;\">실행화면이<seq2seq4repair_space>첨부한<seq2seq4repair_space>수업자료에<seq2seq4repair_space>나와<seq2seq4repair_space>있으니<seq2seq4repair_space>참조<seq2seq4repair_space>바랍니다.<//span><//font><//p>" ) ) ; b . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { <START_BUG> PortalNetworkQueue . sendNoticeRequest ( getApplicationContext ( ) , "20146824" , 99382 , 1 , new Response . Listener ( ) { <END_BUG> @ Override public void onResponse ( Object response ) { try { PortalXmlParser portalXmlParser = new PortalXmlParser ( ) ; portalXmlParser . parseNotice ( response . toString ( ) ) ; Toast . makeText ( NetworkTestActivity . this , "성공" , LENGTH_SHORT ) . show ( ) ; } catch ( Exception e ) { } } } ) ; } } ) ; } }

Fix:
PortalNetworkQueue . sendNoticeRequest ( getApplicationContext ( ) , "20146824" , 99382 , new Response . Listener ( ) {
Buggy code:
public class ConfigAdminExtension implements Extension { public static final String SUBSYSTEM_NAME = "configadmin" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 1 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; private static final String RESOURCE_NAME = ( ConfigAdminExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } static ConfigAdminInternal getConfigAdminService ( OperationContext context ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } @ Override public void initialize ( ExtensionContext context ) { } private void registerTransformers_1_0_0 ( final SubsystemRegistration subsystemRegistration ) { final ModelVersion version = ModelVersion . create ( 1 , 0 , 0 ) ; ResourceTransformationDescriptionBuilder builder = Factory . createSubsystemInstance ( ) ; <START_BUG> builder . addChildResource ( PathElement . pathElement ( CONFIGURATION ) ) . getAttributeBuilder ( ) . addRejectCheck ( SIMPLE_LIST_EXPRESSIONS , ENTRIES ) . end ( ) . addOperationTransformationOverride ( UPDATE ) . setCustomOperationTransformer ( new OperationTransformer ( ) { <END_BUG> @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { ModelNode remove = operation . clone ( ) ; remove . get ( OP ) . set ( REMOVE ) ; remove . remove ( ModelConstants . ENTRIES ) ; ModelNode add = operation . clone ( ) ; add . get ( OP ) . set ( ADD ) ; ModelNode composite = new ModelNode ( ) ; composite . get ( OP ) . set ( COMPOSITE ) ; composite . get ( OP_ADDR ) . setEmptyList ( ) ; composite . get ( STEPS ) . add ( remove ) ; composite . get ( STEPS ) . add ( add ) ; return new TransformedOperation ( composite , OperationResultTransformer . ORIGINAL_RESULT ) ; } } ) ; Tools . register ( builder . build ( ) , subsystemRegistration , version ) ; } }

Fix:
builder . addChildResource ( PathElement . pathElement ( CONFIGURATION ) ) . getAttributeBuilder ( ) . addRejectCheck ( SIMPLE_EXPRESSIONS , ENTRIES ) . end ( ) . addOperationTransformationOverride ( UPDATE ) . setCustomOperationTransformer ( new OperationTransformer ( ) {
Buggy code:
class PackageBinding implements IPackageBinding { private static final String [ ] NO_NAME_COMPONENTS = new String [ 0 ] ; private static final String UNNAMED = "UNNAMED" ; private static final char PACKAGE_NAME_SEPARATOR = '.' ; private org . eclipse . jdt . internal . compiler . lookup . PackageBinding binding ; private BindingResolver resolver ; private String name ; private String [ ] components ; PackageBinding ( BindingResolver resolver , org . eclipse . jdt . internal . compiler . lookup . PackageBinding binding ) { } public String getName ( ) { } public boolean isUnnamed ( ) { } public String [ ] getNameComponents ( ) { } public int getKind ( ) { } public int getModifiers ( ) { } public boolean isDeprecated ( ) { } public boolean isSynthetic ( ) { } public String getKey ( ) { <START_BUG> return null ; <END_BUG> } private String concat ( String [ ] array , char c ) { } private void computeNameAndComponents ( ) { } }

Fix:
return getName ( ) ;
Buggy code:
public class JcrAclNodeHelper implements IAclNodeHelper { private static final Log logger = LogFactory . getLog ( JcrAclNodeHelper . class ) ; private static final String AUTHENTICATED_ROLE = "Authenticated" ; private static final String ACL_STORE = "acl.store" ; private final IUnifiedRepository unifiedRepository ; private final String aclNodeFolder ; public JcrAclNodeHelper ( IUnifiedRepository unifiedRepository , String aclNodeFolder ) { } private String getAclNodePath ( String filename ) { } private String getAclStorePath ( String filename ) { } private RepositoryFile getAclNode ( String filename ) { } private RepositoryFile createAclNodeInternal ( RepositoryFile folder , String filename ) { } private RepositoryFile getAclNodeRepositoryFolder ( ) { } private RepositoryFile createAclNode ( String filename ) { } @ Override public boolean hasAccess ( String dataSourceName , DatasourceType type ) { } @ Override public RepositoryFileAcl getAclFor ( String dataSourceName , DatasourceType type ) { } @ Override public void setAclFor ( String dataSourceName , DatasourceType type , RepositoryFileAcl acl ) { String resolvedName = type . resolveName ( dataSourceName ) ; RepositoryFile aclNode = getAclNode ( resolvedName ) ; if ( acl == null ) { if ( aclNode != null ) { RepositoryFile aclStore = unifiedRepository . getFile ( getAclStorePath ( resolvedName ) ) ; if ( aclStore != null ) { unifiedRepository . deleteFile ( aclStore . getId ( ) , true , Messages . getInstance ( ) . getString ( "AclNodeHelper.WARN_0002_REMOVE_ACL_STORE" , aclStore . getPath ( ) ) ) ; } unifiedRepository . deleteFile ( aclNode . getId ( ) , true , Messages . getInstance ( ) . getString ( "AclNodeHelper.WARN_0001_REMOVE_ACL_NODE" , aclNode . getPath ( ) ) ) ; } } else { if ( aclNode == null ) { aclNode = createAclNode ( resolvedName ) ; } String aclStoreName = getAclStorePath ( resolvedName ) ; <START_BUG> RepositoryFile aclStore = getAclNode ( aclStoreName ) ; <END_BUG> if ( aclStore == null ) { aclStore = unifiedRepository . createFile ( aclNode . getId ( ) , new RepositoryFile . Builder ( JcrAclNodeHelper . ACL_STORE ) . aclNode ( true ) . build ( ) , new SimpleRepositoryFileData ( new ByteArrayInputStream ( new byte [ 0 ] ) , "" , "" ) , "" ) ; } RepositoryFileAcl existing = unifiedRepository . getAcl ( aclStore . getId ( ) ) ; RepositoryFileAcl updated = new RepositoryFileAcl . Builder ( existing ) . aces ( acl . getAces ( ) ) . build ( ) ; unifiedRepository . updateAcl ( updated ) ; } } @ Override public void publishDatasource ( String dataSourceName , DatasourceType type ) { } @ Override public void removeAclNodeFor ( String dataSourceName , DatasourceType type ) { } @ Override public String getAclNodeFolder ( ) { } }

Fix:
RepositoryFile aclStore = unifiedRepository . getFile ( aclStoreName ) ;
Buggy code:
public interface MailboxTestFactory { <START_BUG> Folder createFolder ( int folderId ) ; <END_BUG> }

Fix:
MessageFolder createFolder ( int folderId ) ;
Buggy code:
@ Rule ( key = "SingleQuotedStringContainingVariables" , name = "Variables<seq2seq4repair_space>should<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>single<seq2seq4repair_space>quoted<seq2seq4repair_space>strings" , priority = Priority . CRITICAL , tags = { Tags . BUG } ) @ SqaleSubCharacteristic ( SubCharacteristics . INSTRUCTION_RELIABILITY ) @ SqaleConstantRemediation ( "5min" ) @ ActivatedByDefault public class SingleQuotedStringContainingVariablesCheck extends SquidCheck < LexerlessGrammar > { @ Override public void init ( ) { } @ Override public void visitNode ( AstNode astNode ) { <START_BUG> if ( CheckUtils . doesStringContainsVariables ( astNode . getTokenValue ( ) ) ) { <END_BUG> getContext ( ) . createLineViolation ( this , "Use<seq2seq4repair_space>double<seq2seq4repair_space>quotes<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>single<seq2seq4repair_space>quotes<seq2seq4repair_space>for<seq2seq4repair_space>the<seq2seq4repair_space>string<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>interpolated." , astNode , astNode . getTokenLine ( ) ) ; } } }

Fix:
if ( CheckStringUtils . containsVariable ( astNode . getTokenValue ( ) ) ) {
Buggy code:
public class ServerStartup { static TCPServerSOContainerGroup [ ] serverGroups = null ; static final String SERVER_FILE_NAME = "ServerStartup.xml" ; static List servers = new ArrayList ( ) ; public ServerStartup ( ) { } public void dispose ( ) { } protected synchronized void destroyServers ( ) { } protected synchronized void createServers ( InputStream ins ) throws Exception { } protected void registerServer ( ISharedObjectContainer cont ) throws URISyntaxException { } protected TCPServerSOContainerGroup makeServerGroup ( String name , int port ) { } protected TCPServerSOContainer makeServerContainer ( String id , TCPServerSOContainerGroup group , String path , int keepAlive ) throws IDInstantiationException { <START_BUG> ID newServerID = IDFactory . makeStringID ( id ) ; <END_BUG> SOContainerConfig config = new SOContainerConfig ( newServerID ) ; return new TCPServerSOContainer ( config , group , path , keepAlive ) ; } }

Fix:
ID newServerID = IDFactory . getDefault ( ) . makeStringID ( id ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class DeployedXmlDataSourceManagementTestCase { private static ModelControllerClient client ; private static ServerDeploymentManager manager ; public static final String TEST_DS_XML = "test-ds.xml" ; @ Deployment public static Archive < ? > deploy ( ) { <START_BUG> return ShrinkWrap . create ( JavaArchive . class , "testDsXmlDeployment.jar" ) . addPackage ( DeployedXmlDataSourceManagementTestCase . class . getPackage ( ) ) . addAsManifestResource ( DeployedXmlDataSourceManagementTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) ; <END_BUG> } @ BeforeClass public static void deployDatasource ( ) throws Throwable { } @ AfterClass public static void undeployDatasource ( ) throws IOException { } @ Test public void testDeployedDatasourceInManagementModel ( ) throws IOException { } @ Test public void testDeployedXaDatasourceInManagementModel ( ) throws IOException { } @ Test public void testDeployedXaDatasourcePropertiesInManagementModel ( ) throws IOException { } }

Fix:
return ShrinkWrap . create ( JavaArchive . class , "testDsXmlDeployment.jar" ) . addClass ( DeployedXmlDataSourceManagementTestCase . class ) . addAsManifestResource ( DeployedXmlDataSourceManagementTestCase . class . getPackage ( ) , "MANIFEST.MF" , "MANIFEST.MF" ) ;
Buggy code:
public class InterTypeConstructorDeclaration extends InterTypeDeclaration { private MethodDeclaration preMethod ; private ExplicitConstructorCall explicitConstructorCall = null ; public InterTypeConstructorDeclaration ( CompilationResult result , TypeReference onType ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public void resolve ( ClassScope upperScope ) { } private MethodDeclaration makePreMethod ( ClassScope scope , ExplicitConstructorCall explicitConstructorCall ) { } public void build ( ClassScope classScope , CrosscuttingMembers xcut ) { } private AjAttribute makeAttribute ( EclipseWorld world ) { <START_BUG> if ( ( explicitConstructorCall ) != null ) { <END_BUG> MethodBinding explicitConstructor = explicitConstructorCall . binding ; if ( explicitConstructor . alwaysNeedsAccessMethod ( ) ) { explicitConstructor = explicitConstructor . getAccessMethod ( ) ; } ( ( NewConstructorTypeMunger ) ( munger ) ) . setExplicitConstructor ( world . makeResolvedMember ( explicitConstructor ) ) ; } else { ( ( NewConstructorTypeMunger ) ( munger ) ) . setExplicitConstructor ( new ResolvedMember ( Member . CONSTRUCTOR , EclipseWorld . fromBinding ( onTypeBinding . superclass ( ) ) , 0 , ResolvedTypeX . VOID , "<init>" , TypeX . NONE ) ) ; } return new AjAttribute . TypeMunger ( munger ) ; } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } protected Kind getShadowKindForBody ( ) { } }

Fix:
if ( ( ( explicitConstructorCall ) != null ) && ( ! ( ( explicitConstructorCall . binding ) instanceof ProblemMethodBinding ) ) ) {
Buggy code:
public class ServletWriterFacade extends PrintWriter { Response resA ; RequestImpl req ; protected ServletWriterFacade ( Writer w , Response resp ) { } public void flush ( ) { } public void print ( String str ) { } public void println ( String str ) { in ( ) ; <START_BUG> super . print ( str ) ; <END_BUG> out ( ) ; } public void write ( char [ ] buf , int offset , int count ) { } public void write ( String str ) { } private void in ( ) { } private void out ( ) { } void recycle ( ) { } }

Fix:
super . println ( str ) ;