nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class Diagnostics { private static final String TEST_CLASS = "org.apache.tools.ant.taskdefs.optional.Test" ; private Diagnostics ( ) { } public static boolean isOptionalAvailable ( ) { } public static void validateVersion ( ) throws BuildException { } public static File [ ] listLibraries ( ) { } public static void main ( String [ ] args ) { } private static String getImplementationVersion ( Class clazz ) { } private static String getXmlParserName ( ) { } private static SAXParser getSAXParser ( ) { } private static String getXMLParserLocation ( ) { } private static String getClassLocation ( Class clazz ) { } public static void doReport ( PrintStream out ) { } private static void doReportSystemProperties ( PrintStream out ) { <START_BUG> for ( Enumeration keys = System . getProperties ( ) . keys ( ) ; keys . hasMoreElements ( ) ; ) { <END_BUG> String key = ( ( String ) ( keys . nextElement ( ) ) ) ; out . println ( ( ( key + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( System . getProperty ( key ) ) ) ) ; } } private static void doReportLibraries ( PrintStream out ) { } private static void doReportWhich ( PrintStream out ) { } private static void doReportTasksAvailability ( PrintStream out ) { } private static void doReportParserInfo ( PrintStream out ) { } }

Fix:
for ( Enumeration keys = System . getProperties ( ) . propertyNames ( ) ; keys . hasMoreElements ( ) ; ) {
Buggy code:
public class RegisterCountByFieldStatProcessor extends BaseCountByFieldStatProcessor { @ Override public void addObservation ( OAIRecordMetadata metadata , ValidationResult validationResult ) { Map < String , FieldValidationResult > fvResultMap = validationResult . getFieldResults ( ) ; for ( String fieldName : fieldNames ) { Integer [ ] tmp = countMap . get ( fieldName ) ; incrementFieldCounter ( fieldName , ALL ) ; if ( ( metadata . getFieldOcurrences ( fieldName ) . size ( ) ) > 0 ) incrementFieldCounter ( fieldName , NONEMPTY ) ; <START_BUG> if ( fvResultMap . get ( fieldName ) . isValid ( ) ) <END_BUG> incrementFieldCounter ( fieldName , VALID ) ; } } @ Override public DataTable getStats ( ) { } }

Fix:
if ( ( ( fvResultMap . get ( fieldName ) ) != null ) && ( fvResultMap . get ( fieldName ) . isValid ( ) ) )
Buggy code:
public final class Util { public static String encodePostBody ( Bundle parameters , String boundary ) { } public static String encodeUrl ( Bundle parameters ) { } public static Bundle decodeUrl ( String s ) { Bundle params = new Bundle ( ) ; <START_BUG> if ( s != null ) { <END_BUG> String [ ] array = s . split ( "&" ) ; for ( String parameter : array ) { String [ ] v = parameter . split ( "=" ) ; params . putString ( URLDecoder . decode ( v [ 0 ] ) , URLDecoder . decode ( v [ 1 ] ) ) ; } } return params ; } public static Bundle parseUrl ( String url ) { } public static String openUrl ( String url , String method , Bundle params ) throws IOException , MalformedURLException { } private static String read ( InputStream in ) throws IOException { } public static void clearCookies ( Context context ) { } public static JSONObject parseJson ( String response ) throws FacebookError , JSONException { } public static void showAlert ( Context context , String title , String text ) { } }

Fix:
if ( ( s != null ) && ( ! ( s . equalsIgnoreCase ( "_" ) ) ) ) {
Buggy code:
public class WhichResource extends Task { private Path classpath ; private String classname ; private String resource ; private String property ; public void setClasspath ( Path cp ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } private void validate ( ) { } public void execute ( ) throws BuildException { validate ( ) ; if ( ( classpath ) != null ) { getProject ( ) . log ( ( "using<seq2seq4repair_space>user<seq2seq4repair_space>supplied<seq2seq4repair_space>classpath:<seq2seq4repair_space>" + ( classpath ) ) , MSG_DEBUG ) ; classpath = classpath . concatSystemClasspath ( "ignore" ) ; } else { classpath = new Path ( getProject ( ) ) ; classpath = classpath . concatSystemClasspath ( "only" ) ; getProject ( ) . log ( ( "using<seq2seq4repair_space>system<seq2seq4repair_space>classpath:<seq2seq4repair_space>" + ( classpath ) ) , MSG_DEBUG ) ; } AntClassLoader loader ; <START_BUG> loader = new AntClassLoader ( getProject ( ) . getCoreLoader ( ) , getProject ( ) , classpath , false ) ; <END_BUG> String loc = null ; if ( ( classname ) != null ) { resource = ( classname . replace ( '.' , '//' ) ) + ".class" ; } if ( ( resource ) == null ) { throw new BuildException ( "One<seq2seq4repair_space>of<seq2seq4repair_space>class<seq2seq4repair_space>or<seq2seq4repair_space>resource<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } if ( resource . startsWith ( "//" ) ) { resource = resource . substring ( 1 ) ; } log ( ( "Searching<seq2seq4repair_space>for<seq2seq4repair_space>" + ( resource ) ) , MSG_VERBOSE ) ; URL url ; url = loader . getResource ( resource ) ; if ( url != null ) { loc = url . toExternalForm ( ) ; getProject ( ) . setNewProperty ( property , loc ) ; } } public void setResource ( String resource ) { } public void setClass ( String classname ) { } public void setProperty ( String property ) { } }

Fix:
loader = AntClassLoader . newAntClassLoader ( getProject ( ) . getCoreLoader ( ) , getProject ( ) , classpath , false ) ;
Buggy code:
public class ActionPresentation { private WorkbenchWindow window ; private HashMap mapDescToRec = new HashMap ( 3 ) ; private HashMap invisibleBars = new HashMap ( 3 ) ; private class SetRec { public SetRec ( IActionSetDescriptor desc , IActionSet set , SubActionBars bars ) { } public IActionSetDescriptor desc ; public IActionSet set ; public SubActionBars bars ; } public ActionPresentation ( WorkbenchWindow window ) { } public void clearActionSets ( ) { } public void removeActionSet ( IActionSetDescriptor desc ) { } public void setActionSets ( IActionSetDescriptor [ ] newArray ) { HashSet newList = new HashSet ( ) ; for ( int i = 0 ; i < ( newArray . length ) ; i ++ ) { IActionSetDescriptor descriptor = newArray [ i ] ; newList . add ( descriptor ) ; } List oldList = new ArrayList ( mapDescToRec . keySet ( ) ) ; Iterator iter = oldList . iterator ( ) ; while ( iter . hasNext ( ) ) { IActionSetDescriptor desc = ( ( IActionSetDescriptor ) ( iter . next ( ) ) ) ; if ( ! ( newList . contains ( desc ) ) ) { ActionPresentation . SetRec rec = ( ( ActionPresentation . SetRec ) ( mapDescToRec . get ( desc ) ) ) ; if ( rec != null ) { mapDescToRec . remove ( desc ) ; IActionSet set = rec . set ; SubActionBars bars = rec . bars ; if ( bars != null ) { ActionPresentation . SetRec invisibleRec = new ActionPresentation . SetRec ( desc , set , bars ) ; invisibleBars . put ( desc , invisibleRec ) ; bars . deactivate ( ) ; } } } } ArrayList sets = new ArrayList ( ) ; for ( int i = 0 ; i < ( newArray . length ) ; i ++ ) { IActionSetDescriptor desc = newArray [ i ] ; if ( ! ( mapDescToRec . containsKey ( desc ) ) ) { try { ActionPresentation . SetRec rec ; if ( invisibleBars . containsKey ( desc ) ) { rec = ( ( ActionPresentation . SetRec ) ( invisibleBars . get ( desc ) ) ) ; if ( ( rec . bars ) != null ) { rec . bars . activate ( ) ; } invisibleBars . remove ( desc ) ; } else { IActionSet set = desc . createActionSet ( ) ; SubActionBars bars = new ActionSetActionBars ( window . getActionBars ( ) , desc . getId ( ) ) ; rec = new ActionPresentation . SetRec ( desc , set , bars ) ; set . init ( window , bars ) ; sets . add ( set ) ; } mapDescToRec . put ( desc , rec ) ; } catch ( CoreException e ) { <START_BUG> WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>ActionSet:<seq2seq4repair_space>" + ( desc . getId ( ) ) ) ) ; <END_BUG> } } } PluginActionSetBuilder . processActionSets ( sets , window ) ; iter = sets . iterator ( ) ; while ( iter . hasNext ( ) ) { PluginActionSet set = ( ( PluginActionSet ) ( iter . next ( ) ) ) ; set . getBars ( ) . activate ( ) ; } } public IActionSet [ ] getActionSets ( ) { } }

Fix:
WorkbenchPlugin . log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>ActionSet:<seq2seq4repair_space>" + ( desc . getId ( ) ) ) , e ) ;
Buggy code:
public class DB_StoredProcedure { public static final String copyrightNotice = Copyright . SHORT_2004 ; private static PreparedStatement getSpecificInfoQuery ; public static void doStoredProcedures ( Connection conn ) throws SQLException { DB_StoredProcedure . getSpecificInfoQuery = conn . prepareStatement ( ( "SELECT<seq2seq4repair_space>ALIAS,<seq2seq4repair_space>" + ( "SYSTEMALIAS<seq2seq4repair_space>FROM<seq2seq4repair_space>SYS.SYSALIASES<seq2seq4repair_space>WHERE<seq2seq4repair_space>ALIASTYPE='S'<seq2seq4repair_space>AND<seq2seq4repair_space>" + "(CAST<seq2seq4repair_space>(JAVACLASSNAME<seq2seq4repair_space>AS<seq2seq4repair_space>VARCHAR(128)))<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) ) ; Statement stmt = conn . createStatement ( ) ; ResultSet rs = stmt . executeQuery ( ( "SELECT<seq2seq4repair_space>ALIAS,<seq2seq4repair_space>ALIASINFO,<seq2seq4repair_space>" + ( "ALIASID,<seq2seq4repair_space>SCHEMAID,<seq2seq4repair_space>JAVACLASSNAME,<seq2seq4repair_space>SYSTEMALIAS<seq2seq4repair_space>FROM<seq2seq4repair_space>SYS.SYSALIASES<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>ALIASTYPE='P'" ) ) ) ; boolean firstTime = true ; while ( rs . next ( ) ) { if ( rs . getBoolean ( 6 ) ) continue ; String procSchema = dblook . lookupSchemaId ( rs . getString ( 4 ) ) ; if ( dblook . isIgnorableSchema ( procSchema ) ) continue ; if ( firstTime ) { Logs . reportString ( "----------------------------------------------" ) ; <START_BUG> Logs . reportMessage ( "CSLOOK_Header" , "stored<seq2seq4repair_space>procedures" ) ; <END_BUG> Logs . reportString ( "----------------------------------------------\n" ) ; } String procName = rs . getString ( 1 ) ; String procFullName = dblook . addQuotes ( dblook . expandDoubleQuotes ( procName ) ) ; procFullName = ( procSchema + "." ) + procFullName ; String creationString = DB_StoredProcedure . createProcString ( procFullName , rs ) ; Logs . writeToNewDDL ( creationString ) ; Logs . writeStmtEndToNewDDL ( ) ; Logs . writeNewlineToNewDDL ( ) ; firstTime = false ; } rs . close ( ) ; stmt . close ( ) ; DB_StoredProcedure . getSpecificInfoQuery . close ( ) ; return ; } private static String createProcString ( String procName , ResultSet aProc ) throws SQLException { } }

Fix:
Logs . reportMessage ( "CSLOOK_StoredProcHeader" ) ;
Buggy code:
@ Component public class PageModelFactory { public PageModelFactory ( ) { } public PageModel createPageModel ( BirdModel model ) { Random random = new Random ( ) ; PageModel pageModel = new PageModel ( ) ; pageModel . setBirdModel ( model ) ; pageModel . setCurrentMedia ( getRandomMedia ( model ) ) ; List < BirdModel > familyBirds = model . getFamily ( ) . getBirds ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { if ( familyBirds . isEmpty ( ) ) { break ; } BirdModel remove = familyBirds . remove ( random . nextInt ( familyBirds . size ( ) ) ) ; <START_BUG> if ( remove . equals ( model ) ) { <END_BUG> i -- ; continue ; } pageModel . addSibling ( remove ) ; } int index = 0 ; if ( ! ( pageModel . getSiblings ( ) . isEmpty ( ) ) ) { index = random . nextInt ( pageModel . getSiblings ( ) . size ( ) ) ; } pageModel . getSiblings ( ) . add ( index , model ) ; return pageModel ; } protected MediaModel getRandomMedia ( BirdModel model ) { } No newline ; at end ; of file ; }

Fix:
if ( ( remove . equals ( model ) ) || ( ! ( remove . getNameMap ( ) . containsKey ( "swedish" ) ) ) ) {
Buggy code:
public class SpringApplication extends Application < TaskServerConfig > { private static final Logger logger = LoggerFactory . getLogger ( SpringApplication . class ) ; public static final String SYSTEM_PROP_PREFIX = "ts." ; public static final String ASSETS_MODE_PROPERTY_NAME = "assetsMode" ; public static final String DEFAULT_PROPERTIES_FILE_NAME = "default.properties" ; @ Override public void initialize ( Bootstrap < TaskServerConfig > bootstrap ) { } @ Override public void run ( TaskServerConfig configuration , Environment environment ) throws Exception { <START_BUG> environment . jersey ( ) . setUrlPattern ( "//rest//*" ) ; <END_BUG> registerEnvironmentBeans ( configuration , environment ) ; } protected void registerEnvironmentBeans ( final TaskServerConfig configuration , Environment environment ) throws Exception { } protected Properties getMergedProperties ( TaskServerConfig configuration ) throws IOException { } private Properties extendProps ( Properties mergeTo , Properties mergeFrom , String prefix ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
environment . jersey ( ) . setUrlPattern ( configuration . getJerseyUrlPattern ( ) ) ;
Buggy code:
public class RPInfoAPI { public static final int FIRST_PAGE = 1 ; public static final int DEFAULT_NUM_RESULTS = 20 ; private static final String TAG = "RPInfoAPI" ; private static RPInfoAPI singleton = null ; private static final String URLBASE = "http:////www.rpidirectory.appspot.com//api" ; private static final ResultsCache cache = new ResultsCache ( ) ; private Object requestLock = new Object ( ) ; private static final String PARAM_NAME = "name" ; private static final String PARAM_PAGE = "page_num" ; private static final String PARAM_NUM_RESULTS = "page_size" ; private RPInfoAPI ( ) { } private String decorateUrl ( HashMap < String , String > params ) { } public static RPInfoAPI getInstance ( ) { } private ArrayList < QueryResultModel > parseApiResult ( JSONObject apiResult ) { } private ArrayList < QueryResultModel > doRequest ( String searchTerm , int page , int numResults ) { Log . i ( RPInfoAPI . TAG , ( "Search:<seq2seq4repair_space>" + searchTerm ) ) ; synchronized ( requestLock ) { try { ArrayList < QueryResultModel > rv = RPInfoAPI . cache . extract ( searchTerm ) ; if ( rv == null ) { HttpClient httpClient = new DefaultHttpClient ( ) ; HttpContext localContext = new BasicHttpContext ( ) ; HashMap < String , String > params = new HashMap < String , String > ( ) ; params . put ( RPInfoAPI . PARAM_NAME , searchTerm ) ; params . put ( RPInfoAPI . PARAM_PAGE , Integer . toString ( page ) ) ; <START_BUG> params . put ( RPInfoAPI . PARAM_NUM_RESULTS , Integer . toString ( page ) ) ; <END_BUG> String url = decorateUrl ( params ) ; HttpGet httpGet = new HttpGet ( url ) ; HttpResponse response = httpClient . execute ( httpGet , localContext ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( response . getEntity ( ) . getContent ( ) ) ) ; rv = parseApiResult ( new JSONObject ( in . readLine ( ) ) ) ; RPInfoAPI . cache . insert ( searchTerm , rv ) ; } return rv ; } catch ( ClientProtocolException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } } return null ; } public ArrayList < QueryResultModel > request ( String searchTerm , int page , int numResults ) { } No newline ; at end ; of file ; }

Fix:
params . put ( RPInfoAPI . PARAM_NUM_RESULTS , Integer . toString ( numResults ) ) ;
Buggy code:
public abstract class CBFragmentMvpRecyclerViewPtrViewState < AD , D , V extends MvpLceView < D > , P extends MvpPresenter < V > , A extends CBAdapterRecyclerView < AD , List < AD > > > extends CBFragmentMvpRecyclerViewViewState < AD , D , V , P , A > { protected SwipeRefreshLayout swipeRefreshLayout ; @ Override protected int getLayoutRes ( ) { } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; <START_BUG> swipeRefreshLayout = ( ( SwipeRefreshLayout ) ( view . findViewById ( pull_to_refresh ) ) ) ; <END_BUG> if ( ( swipeRefreshLayout ) == null ) { throw new IllegalStateException ( ( "The<seq2seq4repair_space>swipe<seq2seq4repair_space>refresh<seq2seq4repair_space>layout<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>specified.<seq2seq4repair_space>" + "You<seq2seq4repair_space>have<seq2seq4repair_space>to<seq2seq4repair_space>provide<seq2seq4repair_space>a<seq2seq4repair_space>View<seq2seq4repair_space>with<seq2seq4repair_space>R.id.pull_to_refresh<seq2seq4repair_space>in<seq2seq4repair_space>your<seq2seq4repair_space>inflated<seq2seq4repair_space>xml<seq2seq4repair_space>layout" ) ) ; } swipeRefreshLayout . setOnRefreshListener ( new SwipeRefreshLayout . OnRefreshListener ( ) { @ Override public void onRefresh ( ) { onRefreshStarted ( ) ; } } ) ; } @ Override public void showContent ( ) { } @ Override public void showLoading ( boolean isContentVisible ) { } @ Override public void showError ( Throwable e , boolean isContentVisible ) { } protected void onRefreshStarted ( ) { } }

Fix:
swipeRefreshLayout = ( ( SwipeRefreshLayout ) ( view . findViewById ( pullToRefresh ) ) ) ;
Buggy code:
public class IndexedParamTest extends WicketTestCase { public IndexedParamTest ( String name ) { } public void testPage ( ) throws Exception { application . setHomePage ( Page1 . class ) ; <START_BUG> application . mount ( new IndexedParamUrlCodingStrategy ( "//page2" , Page2 . class ) ) ; <END_BUG> executeTest ( Page1 . class , "IndexedParamTest_ExpectedResult-1.html" ) ; application . setupRequestAndResponse ( ) ; WebRequestCycle cycle = application . createRequestCycle ( ) ; ( ( wicket . protocol . http . MockHttpServletRequest ) ( application . getWicketRequest ( ) . getHttpServletRequest ( ) ) ) . setURL ( "//WicketTester//WicketTester//page2//abc" ) ; application . processRequestCycle ( cycle ) ; assertEquals ( Page2 . class , application . getLastRenderedPage ( ) . getClass ( ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , "IndexedParamTest_ExpectedResult-2.html" ) ) ; } }

Fix:
application . mount ( "//page2" , new IndexedParamUrlCodingStrategy ( "//page2" , Page2 . class ) ) ;
Buggy code:
public class CertCompat { public Object getX509Certificates ( Socket s ) { } public static CertCompat getCertCompat ( ) { } static CertCompat compat ; static final String JSSE_SUPPORT = "org.apache.tomcat.util.compat.JSSECertCompat" ; private static void init ( ) { try { Class c = Class . forName ( CertCompat . JSSE_SUPPORT ) ; CertCompat . compat = ( ( CertCompat ) ( c . newInstance ( ) ) ) ; <START_BUG> } catch ( Exception ex ) { <END_BUG> CertCompat . compat = new CertCompat ( ) ; } } }

Fix:
} catch ( Throwable t ) {
Buggy code:
public class AbstractMultiValuedMapDecorator < K , V > implements Serializable , MultiValuedMap < K , V > { private static final long serialVersionUID = - 9184930955231260637L ; private final MultiValuedMap < K , V > map ; protected AbstractMultiValuedMapDecorator ( final MultiValuedMap < K , V > map ) { } protected MultiValuedMap < K , V > decorated ( ) { } public int size ( ) { } public boolean isEmpty ( ) { } public boolean containsKey ( Object key ) { } public boolean containsValue ( Object value ) { } public boolean containsMapping ( Object key , Object value ) { } public Collection < V > get ( Object key ) { } public Collection < V > remove ( Object key ) { } public boolean removeMapping ( K key , V item ) { } public void clear ( ) { } <START_BUG> public V put ( K key , V value ) { <END_BUG> return decorated ( ) . put ( key , value ) ; } public Set < K > keySet ( ) { } public Collection < Map . Entry < K , V > > entries ( ) { } public Bag < K > keys ( ) { } public Collection < V > values ( ) { } public Map < K , Collection < V > > asMap ( ) { } public boolean putAll ( K key , Iterable < ? extends V > values ) { } public void putAll ( Map < ? extends K , ? extends V > m ) { } public void putAll ( MultiValuedMap < ? extends K , ? extends V > m ) { } public MapIterator < K , V > mapIterator ( ) { } @ Override public boolean equals ( final Object object ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
public boolean put ( K key , V value ) {
Buggy code:
public abstract class AbstractEndpointUpgradeStrategy implements RequestUpgradeStrategy { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private final Map < WebSocketHandler , Endpoint > webSocketHandlers = new HashMap < WebSocketHandler , Endpoint > ( ) ; @ Override public void registerWebSocketHandlers ( Collection < WebSocketHandler > webSocketHandlers ) { } protected Endpoint adaptWebSocketHandler ( WebSocketHandler handler ) { } @ Override public void upgrade ( ServerHttpRequest request , ServerHttpResponse response , String protocol , WebSocketHandler webSocketHandler ) throws Exception { } <START_BUG> protected abstract void upgradeInternal ( ServerHttpRequest request , ServerHttpResponse response , String protocol , Endpoint endpoint ) throws Exception ; <END_BUG> }

Fix:
protected abstract void upgradeInternal ( ServerHttpRequest request , ServerHttpResponse response , String selectedProtocol , Endpoint endpoint ) throws Exception ;
Buggy code:
public class OpenFileDescriptor implements Navigatable { public static final DataKey < Editor > NAVIGATE_IN_EDITOR = DataKey . create ( "NAVIGATE_IN_EDITOR" ) ; private final Project myProject ; private final VirtualFile myFile ; private final int myLogicalLine ; private final int myLogicalColumn ; private final int myOffset ; private final RangeMarker myRangeMarker ; private boolean myUseCurrentWindow = false ; private ScrollType myScrollType = ScrollType . CENTER ; public OpenFileDescriptor ( @ NotNull Project project , @ NotNull VirtualFile file , int offset ) { } public OpenFileDescriptor ( @ NotNull Project project , @ NotNull VirtualFile file , int logicalLine , int logicalColumn ) { } public OpenFileDescriptor ( @ NotNull Project project , @ NotNull VirtualFile file , int logicalLine , int logicalColumn , boolean persistent ) { } public OpenFileDescriptor ( @ NotNull Project project , @ NotNull VirtualFile file ) { } private OpenFileDescriptor ( @ NotNull Project project , @ NotNull VirtualFile file , int logicalLine , int logicalColumn , int offset , boolean persistent ) { } @ NotNull public VirtualFile getFile ( ) { } @ Nullable public RangeMarker getRangeMarker ( ) { } public int getOffset ( ) { } public int getLine ( ) { } public int getColumn ( ) { } @ Override public void navigate ( boolean requestFocus ) { if ( ! ( canNavigate ( ) ) ) { <START_BUG> throw new IllegalStateException ( "Navigation<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>possible<seq2seq4repair_space>with<seq2seq4repair_space>null<seq2seq4repair_space>project" ) ; <END_BUG> } if ( ( ! ( myFile . isDirectory ( ) ) ) && ( navigateInEditorOrNativeApp ( myProject , requestFocus ) ) ) return ; navigateInProjectView ( requestFocus ) ; } private boolean navigateInEditorOrNativeApp ( @ NotNull Project project , boolean requestFocus ) { } public boolean navigateInEditor ( @ NotNull Project project , boolean requestFocus ) { } private boolean navigateInRequestedEditor ( ) { } private boolean navigateInAnyFileEditor ( Project project , boolean focusEditor ) { } private void navigateInProjectView ( boolean requestFocus ) { } public void navigateIn ( @ NotNull Editor e ) { } private static void unfoldCurrentLine ( @ NotNull final Editor editor ) { } @ NotNull public static TextRange getRangeToUnfoldOnNavigation ( @ NotNull Editor editor ) { } private void scrollToCaret ( @ NotNull Editor e ) { } @ Override public boolean canNavigate ( ) { } @ Override public boolean canNavigateToSource ( ) { } @ NotNull public Project getProject ( ) { } public OpenFileDescriptor setUseCurrentWindow ( boolean search ) { } public boolean isUseCurrentWindow ( ) { } public void setScrollType ( @ NotNull ScrollType scrollType ) { } public void dispose ( ) { } }

Fix:
throw new IllegalStateException ( "target<seq2seq4repair_space>not<seq2seq4repair_space>valid" ) ;
Buggy code:
public class Weibo extends CordovaPlugin { private SsoHandler mSsoHandler = null ; private static final int WEIBO_NOT_INSTALLED = 1 ; private static final int AUTHORIZE_CANCELED = 2 ; private static final int UNKNOWN_ERROR = 99 ; @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) throws JSONException { } private AuthInfo createAuthInfo ( ) { Activity activity = this . cordova . getActivity ( ) ; String ns = activity . getPackageName ( ) ; Resources resources = activity . getResources ( ) ; int resKey = resources . getIdentifier ( "wb_app_key" , "string" , ns ) ; int resUrl = resources . getIdentifier ( "wb_redirect_url" , "string" , ns ) ; int resScope = resources . getIdentifier ( "wb_scope" , "string" , ns ) ; String key = activity . getString ( resKey ) ; String url = activity . getString ( resUrl ) ; String scope = ( resScope == 0 ) ? "" : activity . getString ( resScope ) ; <START_BUG> AuthInfo authInfo = new AuthInfo ( activity , key , resUrl , scope ) ; <END_BUG> return authInfo ; } private void login ( AuthInfo authInfo , final CallbackContext context ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } class ErrorMessage { private int code ; private String message ; public ErrorMessage ( int code , String message ) { } JSONObject toJSON ( ) { } } class AuthListener implements WeiboAuthListener { private CallbackContext context ; public AuthListener ( CallbackContext context ) { } @ Override public void onComplete ( Bundle values ) { } @ Override public void onWeiboException ( WeiboException e ) { } @ Override public void onCancel ( ) { } } }

Fix:
AuthInfo authInfo = new AuthInfo ( activity , key , url , scope ) ;
Buggy code:
public class ASTNodeFinder { private CompilationUnitDeclaration unit ; public ASTNodeFinder ( CompilationUnitDeclaration unit ) { } public FieldDeclaration findField ( IField fieldHandle ) { } public Initializer findInitializer ( IInitializer initializerHandle ) { } public AbstractMethodDeclaration findMethod ( IMethod methodHandle ) { } public TypeDeclaration findType ( IType typeHandle ) { IJavaElement parent = typeHandle . getParent ( ) ; final char [ ] typeName = typeHandle . getElementName ( ) . toCharArray ( ) ; final int occurenceCount = ( ( SourceType ) ( typeHandle ) ) . occurrenceCount ; final boolean findAnonymous = ( typeName . length ) == 0 ; class Visitor extends ASTVisitor { TypeDeclaration result ; int count = 0 ; public boolean visit ( TypeDeclaration typeDeclaration , BlockScope scope ) { if ( ( result ) != null ) return false ; <START_BUG> if ( ( ( typeDeclaration . bits ) & ( IsAnonymousTypeMASK ) ) != 0 ) { <END_BUG> if ( findAnonymous && ( ( ++ ( count ) ) == occurenceCount ) ) { result = typeDeclaration ; } } else { if ( ( ! findAnonymous ) && ( CharOperation . equals ( typeName , typeDeclaration . name ) ) ) { result = typeDeclaration ; } } return false ; } } switch ( parent . getElementType ( ) ) { case IJavaElement . COMPILATION_UNIT : TypeDeclaration [ ] types = this . unit . types ; if ( types != null ) { for ( int i = 0 , length = types . length ; i < length ; i ++ ) { TypeDeclaration type = types [ i ] ; if ( CharOperation . equals ( typeName , type . name ) ) { return type ; } } } break ; case IJavaElement . TYPE : TypeDeclaration parentDecl = findType ( ( ( IType ) ( parent ) ) ) ; if ( parentDecl == null ) return null ; types = parentDecl . memberTypes ; if ( types != null ) { for ( int i = 0 , length = types . length ; i < length ; i ++ ) { TypeDeclaration type = types [ i ] ; if ( CharOperation . equals ( typeName , type . name ) ) { return type ; } } } break ; case IJavaElement . FIELD : FieldDeclaration fieldDecl = findField ( ( ( IField ) ( parent ) ) ) ; if ( fieldDecl == null ) return null ; Visitor visitor = new Visitor ( ) ; fieldDecl . traverse ( visitor , null ) ; return visitor . result ; case IJavaElement . INITIALIZER : Initializer initializer = findInitializer ( ( ( IInitializer ) ( parent ) ) ) ; if ( initializer == null ) return null ; visitor = new Visitor ( ) ; initializer . traverse ( visitor , null ) ; return visitor . result ; case IJavaElement . METHOD : AbstractMethodDeclaration methodDecl = findMethod ( ( ( IMethod ) ( parent ) ) ) ; if ( methodDecl == null ) return null ; visitor = new Visitor ( ) ; methodDecl . traverse ( visitor , ( ( ClassScope ) ( null ) ) ) ; return visitor . result ; } return null ; } }

Fix:
if ( ( ( typeDeclaration . bits ) & ( ASTNode . IsAnonymousType ) ) != 0 ) {
Buggy code:
public class TestQueryPagination extends SQLListenerTestCase { public void setUp ( ) { <START_BUG> setUp ( SimpleEntity . class , CLEAR_TABLES , "openjpa.Log" , "SQL=TRACE" ) ; <END_BUG> EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 0 ) ) ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 1 ) ) ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 2 ) ) ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 3 ) ) ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 4 ) ) ) ; em . persist ( new SimpleEntity ( "foo" , ( "bar" + 5 ) ) ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } public void testFirstThenMax ( ) { } public void testMaxThenFirst ( ) { } public void testNoResultsFirstFirst ( ) { } public void testNoResultsFirstLast ( ) { } public void testAllResultsFirstFirst ( ) { } public void testAllResultsFirstLast ( ) { } private void helper ( boolean firstFirst , int first , int max , int expected ) { } private void checkSQL ( ) { } }

Fix:
setUp ( SimpleEntity . class , CLEAR_TABLES ) ;
Buggy code:
public class BaseChannel extends TransactionSharedObject implements IChannel { public static final String RECEIVER_ID_PROPERTY = BaseChannel . class . getName ( ) ; static class ChannelMsg implements Serializable { private static final long serialVersionUID = 9065358269778864152L ; byte [ ] channelData = null ; ChannelMsg ( ) { } ChannelMsg ( byte [ ] data ) { } byte [ ] getData ( ) { } public String toString ( ) { } } protected IChannelListener listener ; public BaseChannel ( ISharedObjectTransactionConfig config , IChannelListener listener ) { } public BaseChannel ( ) { } protected void setChannelListener ( IChannelListener l ) { } protected void trace ( String msg ) { <START_BUG> Trace . trace ( Activator . getDefault ( ) , msg ) ; <END_BUG> } protected void initialize ( ) throws SharedObjectInitException { } public Object getAdapter ( Class clazz ) { } private IChannelConnectEvent createChannelGroupJoinEvent ( final boolean hasJoined , final ID targetID ) { } private IChannelDisconnectEvent createChannelGroupDepartEvent ( final boolean hasJoined , final ID targetID ) { } private Event handleMessageEvent ( final ISharedObjectMessageEvent event ) { } public void sendMessage ( byte [ ] message ) throws ECFException { } public void sendMessage ( ID receiver , byte [ ] message ) throws ECFException { } public synchronized IChannelListener getListener ( ) { } public IChannelListener setListener ( IChannelListener listener ) { } protected void receiveUndeliveredChannelEvent ( IChannelEvent channelEvent ) { } protected ReplicaSharedObjectDescription getReplicaDescription ( ID targetContainerID ) { } protected void initializeReplicaChannel ( ) throws SharedObjectInitException { } }

Fix:
Trace . trace ( PLUGIN_ID , msg ) ;
Buggy code:
public class PropertyConverterManager { private static final Logger LOG = Logger . getLogger ( PropertyConverterManager . class . getName ( ) ) ; private Map < TypeLiteral < ? > , List < PropertyConverter < ? > > > converters = new ConcurrentHashMap < > ( ) ; private ReadWriteLock lock = new ReentrantReadWriteLock ( ) ; public PropertyConverterManager ( ) { } public PropertyConverterManager ( boolean init ) { } protected void initConverters ( ) { for ( PropertyConverter conv : ServiceContextManager . getServiceContext ( ) . getServices ( PropertyConverter . class ) ) { <START_BUG> Type type = TypeLiteral . getTypeParameter ( conv . getClass ( ) , PropertyConverter . class ) ; <END_BUG> register ( TypeLiteral . of ( type ) , conv ) ; } } public < T > void register ( TypeLiteral < T > targetType , PropertyConverter < T > converter ) { } public boolean isTargetTypeSupported ( TypeLiteral < ? > targetType ) { } public Map < TypeLiteral < ? > , List < PropertyConverter < ? > > > getPropertyConverters ( ) { } public < T > List < PropertyConverter < T > > getPropertyConverters ( TypeLiteral < T > targetType ) { } private < T > TypeLiteral < T > mapBoxedType ( TypeLiteral < T > targetType ) { } protected < T > PropertyConverter < T > createDefaultPropertyConverter ( final TypeLiteral < T > targetType ) { } private Method getFactoryMethod ( Class < ? > type , String ... methodNames ) { } }

Fix:
Type type = TypeLiteral . getGenericInterfaceTypeParameters ( conv . getClass ( ) , PropertyConverter . class ) [ 0 ] ;
Buggy code:
class Direct8 extends PackedInts . ReaderImpl implements PackedInts . Mutable { private byte [ ] values ; private static final int BITS_PER_VALUE = 8 ; public Direct8 ( int valueCount ) { } public Direct8 ( DataInput in , int valueCount ) throws IOException { } public Direct8 ( byte [ ] values ) { } public long get ( final int index ) { } public void set ( final int index , final long value ) { } public long ramBytesUsed ( ) { <START_BUG> return ( RamUsageEstimator . NUM_BYTES_ARRAY_HEADER ) + ( values . length ) ; <END_BUG> } public void clear ( ) { } @ Override public Object getArray ( ) { } @ Override public boolean hasArray ( ) { } }

Fix:
return RamUsageEstimator . sizeOf ( values ) ;
Buggy code:
@ Deprecated public class SortableIntField extends FieldType { @ Override protected void init ( IndexSchema schema , Map < String , String > args ) { } @ Override public SortField getSortField ( SchemaField field , boolean reverse ) { } @ Override public ValueSource getValueSource ( SchemaField field , QParser qparser ) { } @ Override public String toInternal ( String val ) { } @ Override public String toExternal ( IndexableField f ) { } @ Override public String indexedToReadable ( String indexedForm ) { } public CharsRef indexedToReadable ( BytesRef input , CharsRef charsRef ) { final char [ ] indexedToReadable = indexedToReadable ( input . utf8ToChars ( charsRef ) . toString ( ) ) . toCharArray ( ) ; <START_BUG> charsRef . copy ( indexedToReadable , 0 , indexedToReadable . length ) ; <END_BUG> return charsRef ; } @ Override public Integer toObject ( IndexableField f ) { } @ Override public void write ( TextResponseWriter writer , String name , IndexableField f ) throws IOException { } }

Fix:
charsRef . copyChars ( indexedToReadable , 0 , indexedToReadable . length ) ;
Buggy code:
public interface ImageRepository { <START_BUG> public void create ( Image entity ) ; <END_BUG> public Image read ( Integer primaryKey ) { } public void update ( Image entity ) { } public void delete ( Integer primaryKey ) { } public Image readByAddress ( String address ) { } public List < String > readNextPrev ( Date id , int points , String order ) { } public List < Image > readByUserId ( int userId ) { } public List < Image > readAll ( String order ) { } public List < Image > readByQuery ( String query , String order ) { } public List < Image > readByTag ( String query , String order ) { } public String randomImage ( ) { } public List < Image > readByUsername ( String username , String order ) { } }

Fix:
public int create ( Image entity ) ;
Buggy code:
public class RestConnection2Test extends AbstractTest { private static final String DEVELOPMENT_SQL_SEED_FILE = "src//main//resources//JEngineV2.sql" ; @ AfterClass public static void resetDatabase ( ) throws IOException , SQLException { clearDatabase ( ) ; ScriptRunner runner = new ScriptRunner ( Connection . getInstance ( ) . connect ( ) , false , false ) ; <START_BUG> runner . runScript ( new FileReader ( TEST_SQL_SEED_FILE ) ) ; <END_BUG> } @ Override protected Application configure ( ) { } @ Test public void testGetAllScenarios ( ) { } @ Test public void testGetScenarioInstances ( ) { } @ Test public void testGetAllActivitiesForScenarioInstance ( ) { } @ Test public void testGetAllDataobjectForScenarioInstance ( ) { } @ Test public void testPostActivityStatusUpdate ( ) { } @ Test public void testPostNewInstanceForScenario ( ) { } }

Fix:
runner . runScript ( new FileReader ( RestConnection2Test . DEVELOPMENT_SQL_SEED_FILE ) ) ;
Buggy code:
public class TestAtomicUpdate extends LuceneTestCase { private static final Analyzer ANALYZER = new SimpleAnalyzer ( ) ; private static final Random RANDOM = new Random ( ) ; private abstract static class TimedThread extends Thread { boolean failed ; int count ; private static int RUN_TIME_SEC = 3 ; private TestAtomicUpdate . TimedThread [ ] allThreads ; public abstract void doWork ( ) throws Throwable { } TimedThread ( TestAtomicUpdate . TimedThread [ ] threads ) { } public void run ( ) { } private boolean anyErrors ( ) { } } private static class IndexerThread extends TestAtomicUpdate . TimedThread { IndexWriter writer ; public int count ; public IndexerThread ( IndexWriter writer , TestAtomicUpdate . TimedThread [ ] threads ) { } public void doWork ( ) throws Exception { } } private static class SearcherThread extends TestAtomicUpdate . TimedThread { private Directory directory ; public SearcherThread ( Directory directory , TestAtomicUpdate . TimedThread [ ] threads ) { } public void doWork ( ) throws Throwable { } } public void runTest ( Directory directory ) throws Exception { } public void testAtomicUpdates ( ) throws Exception { Directory directory ; directory = new MockRAMDirectory ( ) ; runTest ( directory ) ; directory . close ( ) ; String tempDir = System . getProperty ( "java.io.tmpdir" ) ; File dirPath = new File ( tempDir , "lucene.test.atomic" ) ; <START_BUG> directory = FSDirectory . getDirectory ( dirPath ) ; <END_BUG> runTest ( directory ) ; directory . close ( ) ; _TestUtil . rmDir ( dirPath ) ; } }

Fix:
directory = FSDirectory . getDirectory ( dirPath , null , false ) ;
Buggy code:
public class RestApiSharingPolicyServerStub implements SharingPolicyServer { private final HttpMethods http = new HttpMethods ( ) ; private final RestUrlsSharingPolicy urls ; public RestApiSharingPolicyServerStub ( RestApiConfig config ) { } @ Override public Set < SharingPolicyEntry > getAllOwned ( User owner ) { } @ Override public Set < SharingPolicyEntry > getAllIncoming ( User currUser ) { } @ Override public SharingPolicyEntry add ( User currUser , User sharingWith , SharingPolicyTypeEntry policy , String sharedElementID ) { try { URI url = this . urls . forAdd ( currUser , sharingWith , policy , sharedElementID ) ; <START_BUG> String body = this . http . get ( url , 200 ) ; <END_BUG> return Json . deserialize ( body , SharingPolicyEntry . class ) ; } catch ( IOException | URISyntaxException e ) { throw failedToContactServer ( e ) ; } } @ Override public String removeOwned ( User owner , Long policyID ) { } @ Override public String removeAllOwned ( User owner ) { } private IndexClientException failedToContactServer ( Exception problem ) { } }

Fix:
String body = this . http . post ( url , "" , 200 ) ;
Buggy code:
final class JPEGQuantizationTable extends JPEGVariableSizeSegment { public static byte [ ] DefaultLuminanceQTable = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 219 ) ) , 0 , 67 , 0 , 16 , 11 , 10 , 16 , 24 , 40 , 51 , 61 , 12 , 12 , 14 , 19 , 26 , 58 , 60 , 55 , 14 , 13 , 16 , 24 , 40 , 57 , 69 , 56 , 14 , 17 , 22 , 29 , 51 , 87 , 80 , 62 , 18 , 22 , 37 , 56 , 68 , 109 , 103 , 77 , 24 , 35 , 55 , 64 , 81 , 104 , 113 , 92 , 49 , 64 , 78 , 87 , 103 , 121 , 120 , 101 , 72 , 92 , 95 , 98 , 112 , 100 , 103 , 99 } ; public static byte [ ] DefaultChrominanceQTable = new byte [ ] { ( ( byte ) ( 255 ) ) , ( ( byte ) ( 219 ) ) , 0 , 67 , 1 , 17 , 18 , 24 , 47 , 99 , 99 , 99 , 99 , 18 , 21 , 26 , 66 , 99 , 99 , 99 , 99 , 24 , 26 , 56 , 99 , 99 , 99 , 99 , 99 , 47 , 66 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 , 99 } ; public JPEGQuantizationTable ( byte [ ] reference ) { } public JPEGQuantizationTable ( LEDataInputStream byteStream ) { } public static JPEGQuantizationTable defaultChrominanceTable ( ) { } public static JPEGQuantizationTable defaultLuminanceTable ( ) { } public int [ ] getQuantizationTablesKeys ( ) { } public int [ ] [ ] getQuantizationTablesValues ( ) { int [ ] [ ] values = new int [ 4 ] [ ] ; int valuesIndex = 0 ; int totalLength = ( getSegmentLength ( ) ) - 2 ; int ofs = 4 ; while ( totalLength > 64 ) { int [ ] qk = new int [ 64 ] ; int pq = ( ( reference [ ofs ] ) & 255 ) > > 4 ; if ( pq == 0 ) { for ( int i = 0 ; i < ( qk . length ) ; i ++ ) { <START_BUG> qk [ i ] = reference [ ( ( ofs + i ) + 1 ) ] ; <END_BUG> } ofs += 65 ; totalLength -= 65 ; } else { for ( int i = 0 ; i < ( qk . length ) ; i ++ ) { int idx = ( i - 1 ) * 2 ; qk [ i ] = ( ( ( reference [ ( ( ofs + idx ) + 1 ) ] ) & 255 ) * 256 ) + ( ( reference [ ( ( ofs + idx ) + 2 ) ] ) & 255 ) ; } ofs += 129 ; totalLength -= 129 ; } if ( valuesIndex >= ( values . length ) ) { int [ ] [ ] newValues = new int [ ( values . length ) + 4 ] [ ] ; System . arraycopy ( values , 0 , newValues , 0 , values . length ) ; values = newValues ; } values [ valuesIndex ] = qk ; valuesIndex ++ ; } int [ ] [ ] newValues = new int [ valuesIndex ] [ ] ; System . arraycopy ( values , 0 , newValues , 0 , valuesIndex ) ; return newValues ; } public void scaleBy ( int qualityFactor ) { } public int signature ( ) { } }

Fix:
qk [ i ] = ( reference [ ( ( ofs + i ) + 1 ) ] ) & 255 ;
Buggy code:
public class Main extends Application { @ Override public void start ( Stage primaryStage ) throws Exception { <START_BUG> Parent root = FXMLLoader . load ( getClass ( ) . getResource ( "filelist.fxml" ) ) ; <END_BUG> primaryStage . setTitle ( "Hello<seq2seq4repair_space>World" ) ; final Scene scene = new Scene ( root , 300 , 275 ) ; primaryStage . setScene ( scene ) ; primaryStage . show ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
Parent root = FXMLLoader . load ( getClass ( ) . getClassLoader ( ) . getResource ( "filelist.fxml" ) ) ;
Buggy code:
public class WebComponentProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) ) { return ; } final Map < String , AbstractComponentDescription > componentByClass = new HashMap < String , AbstractComponentDescription > ( ) ; final Map < String , ComponentInstantiator > webComponents = new HashMap < String , ComponentInstantiator > ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; final String applicationName = ( ( deploymentUnit . getParent ( ) ) == null ) ? deploymentUnit . getName ( ) : deploymentUnit . getParent ( ) . getName ( ) ; if ( moduleDescription == null ) { return ; } for ( AbstractComponentDescription component : moduleDescription . getComponentDescriptions ( ) ) { componentByClass . put ( component . getComponentClassName ( ) , component ) ; } final WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; final TldsMetaData tldsMetaData = deploymentUnit . getAttachment ( TldsMetaData . ATTACHMENT_KEY ) ; final Set < String > classes = getAllComponentClasses ( warMetaData , tldsMetaData ) ; for ( String clazz : classes ) { AbstractComponentDescription description = componentByClass . get ( clazz ) ; if ( description != null ) { if ( ! ( ( description . getViewClassNames ( ) . size ( ) ) == 1 ) ) { throw new RuntimeException ( ( clazz + "<seq2seq4repair_space>has<seq2seq4repair_space>the<seq2seq4repair_space>wrong<seq2seq4repair_space>component<seq2seq4repair_space>type,<seq2seq4repair_space>is<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>web<seq2seq4repair_space>component" ) ) ; } ManagedBeanComponentInstantiator instantiator = new ManagedBeanComponentInstantiator ( deploymentUnit , description ) ; webComponents . put ( clazz , instantiator ) ; } else { <START_BUG> description = new WebComponentDescription ( clazz , clazz , moduleDescription . getModuleName ( ) , moduleDescription . getAppName ( ) ) ; <END_BUG> moduleDescription . addComponent ( description ) ; webComponents . put ( clazz , new WebComponentInstantiator ( deploymentUnit , description ) ) ; } } deploymentUnit . putAttachment ( WEB_COMPONENT_INSTANTIATORS , webComponents ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } private Set < String > getAllComponentClasses ( WarMetaData metaData , TldsMetaData tldsMetaData ) { } private void getAllComponentClasses ( WebCommonMetaData metaData , Set < String > classes ) { } private void getAllComponentClasses ( TldMetaData metaData , Set < String > classes ) { } }

Fix:
description = new WebComponentDescription ( clazz , clazz , moduleDescription ) ;
Buggy code:
public class RelationOp extends BooleanOp { public RelationOp ( String op_symbol ) { } public STO checkOperands ( STO a , STO b ) { Type aType = a . getType ( ) ; Type bType = b . getType ( ) ; if ( ! ( aType instanceof BoolType ) ) { <START_BUG> return new ErrorSTO ( Formatter . toString ( error1n_Expr , aType . getName ( ) , getName ( ) ) ) ; <END_BUG> } if ( ! ( bType instanceof BoolType ) ) { return new ErrorSTO ( Formatter . toString ( error1w_Expr , bType . getName ( ) , getName ( ) , new BoolType ( ) . getName ( ) ) ) ; } else { if ( ( a instanceof ConstSTO ) && ( b instanceof ConstSTO ) ) { boolean result = getResult ( ( ( ConstSTO ) ( a ) ) , ( ( ConstSTO ) ( b ) ) ) ; return new ConstSTO ( ( ( ( ( ( a . getName ( ) ) + "<seq2seq4repair_space>" ) + ( getSymbol ( ) ) ) + "<seq2seq4repair_space>" ) + ( b . getName ( ) ) ) , new BoolType ( ) , BoolType . dub ( result ) ) ; } return new ExprSTO ( ( ( a . getName ( ) ) + ( b . getName ( ) ) ) , new BoolType ( ) ) ; } } private boolean getResult ( ConstSTO aa , ConstSTO bb ) { } }

Fix:
return new ErrorSTO ( Formatter . toString ( error1w_Expr , aType . getName ( ) , getName ( ) , new BoolType ( ) . getName ( ) ) ) ;
Buggy code:
public class SnapshotTakeHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "take-snapshot" ; private final ConfigurationPersister persister ; public SnapshotTakeHandler ( ConfigurationPersister persister ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { try { String name = persister . snapshot ( ) ; <START_BUG> context . getResult ( ) . get ( ) . set ( name ) ; <END_BUG> context . completeStep ( ) ; } catch ( ConfigurationPersistenceException e ) { throw new OperationFailedException ( e . getMessage ( ) , new ModelNode ( ) . set ( e . getMessage ( ) ) ) ; } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . getResult ( ) . set ( name ) ;