nus-yam/ex-repair huggingface dataset:
Buggy code:
@ Entity public class User extends Model { @ Id @ GeneratedValue private long id ; @ Required private String username ; @ Required private String email ; @ Required private String password ; private Integer age ; private char gender ; private Location location ; private MessageBox msgBox ; private ArrayList < Interests > interests ; public User ( String username , String email , String password , Integer age , char gender ) { } public String getUsername ( ) { } public String getEmail ( ) { } public String getPassword ( ) { } public Integer getAge ( ) { } public char getGender ( ) { } public Location getLocation ( ) { } public void setEmail ( String email ) { } public void setPassword ( String password ) { } public void setAge ( Integer age ) { } public void setGender ( char gender ) { } public void setLocation ( Location location ) { } private class XlsParser { String seperator ; int start ; File xls ; boolean [ ] readRows ; public XlsParser ( String seperator , int start , String filepath ) { } public ArrayList < Interests > parseInterests ( ) { } private Interests parseInterest ( int r , Sheet sheet ) { String title = sheet . getCell ( 0 , r ) . getContents ( ) ; String arr = sheet . getCell ( 1 , r ) . getContents ( ) ; String [ ] items = arr . split ( seperator ) ; ArrayList < Interests > subs = null ; <START_BUG> if ( ( items . length ) > 0 ) { <END_BUG> subs = new ArrayList ( ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { try { int subcell = Integer . parseInt ( items [ i ] ) ; subs . add ( parseInterest ( ( subcell - 1 ) , sheet ) ) ; } catch ( NumberFormatException nfe ) { } } } readRows [ r ] = true ; return new Interests ( title , subs ) ; } } public void updateInterests ( ) { } private void rUpdateInterests ( ArrayList < Interests > thiss , ArrayList < Interests > that ) { } public void resetInterests ( ) { } public void recieveMsg ( Message msg ) { } public void sendMsg ( String msg , User to ) { } }

Fix:
if ( ! ( items [ 0 ] . equals ( "" ) ) ) {
Buggy code:
public class GoProjectMachine extends AbstractGoRule { public String getRuleName ( ) { } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public Collection getChildren ( Object parent ) { if ( ! ( parent instanceof Project ) ) return null ; Vector res = new Vector ( ) ; <START_BUG> Vector models = ( ( Project ) ( parent ) ) . getModels ( ) ; <END_BUG> if ( models == null ) return null ; util . Enumeration = models . elements ( ) ; } public void accumMachines ( MNamespace m , Vector res ) { } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } }

Fix:
Vector models = ( ( Project ) ( parent ) ) . getUserDefinedModels ( ) ;
Buggy code:
public class MHFolderFactory implements MailboxTstFactory { public MHFolderFactory ( ) { } <START_BUG> public MessageFolder createFolder ( int folderId ) { <END_BUG> return new org . columba . mail . folder . mh . CachedMHFolder ( ( "test" + folderId ) , "CachedMHFolder" , ( ( FolderTstHelper . homeDirectory ) + "//folders//" ) ) ; } }

Fix:
public AbstractMessageFolder createFolder ( int folderId ) {
Buggy code:
public abstract class AbstractStartToolkitAut implements IStartAut { private static Logger log = LoggerFactory . getLogger ( AbstractStartToolkitAut . class ) ; private static final String SOURCE_BUNDLE_MANIFEST_ATTR = "Eclipse-SourceBundle" ; private StartAUTServerStateMessage m_errorMessage ; private boolean m_isAgentSet = false ; public StartAUTServerStateMessage startAut ( Map < String , String > parameters ) throws IOException { } protected StartAUTServerStateMessage validateEnvironment ( ) { } protected File getWorkingDir ( Map parameters ) { } protected String [ ] createEnvArray ( Map < String , String > parameters , boolean isAgentSet ) { } protected abstract String createBaseCmd ( Map < String , String > parameters ) throws IOException { } protected abstract String [ ] createCmdArray ( String baseCmd , Map < String , String > parameters ) { } protected StartAUTServerStateMessage executeCommand ( String [ ] cmdArray , String [ ] envArray , File workingDir ) throws IOException { } protected void setErrorMessage ( StartAUTServerStateMessage errorMessage ) { } protected StartAUTServerStateMessage getErrorMessage ( ) { } protected boolean isErrorMessage ( ) { } protected StartAUTServerStateMessage createBusyMessage ( ) { } public static String [ ] getClasspathEntriesForBundleId ( String bundleId ) { } private static List < Bundle > fragmentLookupWithInactive ( Bundle mainBundle ) { } private static Bundle bundleLookupWithInactive ( String bundleId ) { Bundle [ ] bundles = EclipseStarter . getSystemBundleContext ( ) . getBundles ( ) ; Bundle result = null ; Version currVersion = Version . emptyVersion ; for ( Bundle bundle : bundles ) { <START_BUG> if ( ( bundle . getSymbolicName ( ) . contains ( bundleId ) ) && ( ( bundle . getVersion ( ) . compareTo ( currVersion ) ) > 0 ) ) { <END_BUG> result = bundle ; currVersion = bundle . getVersion ( ) ; } } return result ; } private static boolean isJarFileWithManifestAttr ( File file , String manifestAttr ) { } public static String getClasspathForBundleId ( String bundleId ) { } protected void addDebugParams ( List < String > cmds , boolean isDirectExec ) { } No newline ; at end ; of file ; }

Fix:
if ( ( bundle . getSymbolicName ( ) . equals ( bundleId ) ) && ( ( bundle . getVersion ( ) . compareTo ( currVersion ) ) > 0 ) ) {
Buggy code:
public class StartProgramView { public void startProgram ( ) { this . displayBanner ( ) ; String playerName = this . getPlayerName ( ) ; Player player = ProgramControl . createPlayer ( playerName ) ; this . displayWelcomeMessage ( player ) ; MainMenuView mainMenu = new MainMenuView ( ) ; <START_BUG> mainMenu . displayMenu ( ) ; <END_BUG> } private void displayBanner ( ) { } public String getPlayerName ( ) { } private void displayWelcomeMessage ( Player player ) { } }

Fix:
mainMenu . display ( ) ;
Buggy code:
@ SuppressLint ( "SimpleDateFormat" ) public class GenerateFakeData { public static ArrayList < MagicMedRecord > MakeData ( ) { } private static long dateToMilLiseconds ( int year , int month , int dayOfMonth , int hour , int minute , int second ) { <START_BUG> GregorianCalendar date = new GregorianCalendar ( year , month , dayOfMonth , hour , minute , second ) ; <END_BUG> return date . getTimeInMillis ( ) ; } }

Fix:
GregorianCalendar date = new GregorianCalendar ( year , ( month - 1 ) , dayOfMonth , hour , minute , second ) ;
Buggy code:
public class DropTargetEffect extends DropTargetAdapter { Control control ; public DropTargetEffect ( Control control ) { } public Control getControl ( ) { } public Widget getItem ( int x , int y ) { } Widget getItem ( Table table , int x , int y ) { } Widget getItem ( Tree tree , int x , int y ) { } TreeItem nextItem ( Tree tree , TreeItem item ) { if ( item == null ) return null ; <START_BUG> if ( item . getExpanded ( ) ) <END_BUG> return item . getItem ( 0 ) ; TreeItem childItem = item ; TreeItem parentItem = childItem . getParentItem ( ) ; int index = ( parentItem == null ) ? tree . indexOf ( childItem ) : parentItem . indexOf ( childItem ) ; int count = ( parentItem == null ) ? tree . getItemCount ( ) : parentItem . getItemCount ( ) ; while ( true ) { if ( ( index + 1 ) < count ) return parentItem == null ? tree . getItem ( ( index + 1 ) ) : parentItem . getItem ( ( index + 1 ) ) ; if ( parentItem == null ) return null ; childItem = parentItem ; parentItem = childItem . getParentItem ( ) ; index = ( parentItem == null ) ? tree . indexOf ( childItem ) : parentItem . indexOf ( childItem ) ; count = ( parentItem == null ) ? tree . getItemCount ( ) : parentItem . getItemCount ( ) ; } } TreeItem previousItem ( Tree tree , TreeItem item ) { } }

Fix:
if ( ( item . getExpanded ( ) ) && ( ( item . getItemCount ( ) ) > 0 ) )
Buggy code:
public class GLNode { static final float CIRCLE_CENTER_X = 0.0F ; static final float CIRCLE_CENTER_Y = - 0.25F ; private static final float RECT_SIZE = 0.1F ; static final int CIRCLE_RADIUS = 10 ; private float id ; private float xCoord ; private float yCoord ; private int searchRequests ; private List < Integer > edges ; private List < Float > virtualEdges ; private List < Float > deBruijnEdges ; private Color color ; private Lock lock ; public GLNode ( float id , Color color ) { } Pair < Float , Float > getCoordinateOnCircle ( float id ) { } private void draw2DQuad ( GL gl ) { } private void draw2DLine ( float targetX , float targetY , Color color , GL gl ) { gl . glColor3f ( color . getRed ( ) , color . getGreen ( ) , color . getBlue ( ) ) ; <START_BUG> gl . glLineWidth ( 1.0F ) ; <END_BUG> gl . glBegin ( GL_LINES ) ; gl . glVertex3f ( xCoord , yCoord , 0.0F ) ; gl . glVertex3f ( targetX , targetY , 0.0F ) ; gl . glEnd ( ) ; } public void draw ( GL gl ) { } public void update ( SubjectInformation subjectInfo ) { } public float getId ( ) { } }

Fix:
gl . glLineWidth ( 0.1F ) ;
Buggy code:
public class TestPessimisticPNonTransToPDirty extends SingleEMTestCase { public void setUp ( ) { <START_BUG> setUp ( UnenhancedPropertyAccess . class , CLEAR_TABLES ) ; <END_BUG> UnenhancedPropertyAccess o = new UnenhancedPropertyAccess ( ) ; EntityManager em = emf . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; em . persist ( o ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; } public void testPNonTransToPDirty ( ) { } }

Fix:
setUp ( UnenhancedPropertyAccess . class , CLEAR_TABLES , "openjpa.RuntimeUnenhancedClasses" , "supported" ) ;
Buggy code:
public class PostView extends BaseView { private UUID groupId ; private UUID id ; public PostView ( Context context , UUID groupId , UUID id ) { } private void init ( ) { BaseItem item = ServerWorker . Instance ( ) . getPostById ( groupId , id ) ; if ( item == null ) return ; WebView webView = ( ( WebView ) ( contentView . findViewById ( webview ) ) ) ; webView . setScrollBarStyle ( SCROLLBARS_OUTSIDE_OVERLAY ) ; String header = "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>?>" ; <START_BUG> webView . loadData ( ( header + ( ( ( Post ) ( item ) ) . Html ) ) , "text//html" , "UTF-8" ) ; <END_BUG> } @ Override public void OnExit ( ) { } }

Fix:
webView . loadDataWithBaseURL ( "" , ( header + ( ( ( Post ) ( item ) ) . Html ) ) , "text//html" , "UTF-8" , null ) ;
Buggy code:
@ Singleton public class EditorAgentImpl implements EditorAgent { private final StringMap < EditorPartPresenter > openedEditors ; private final EditorPartCloseHandler editorClosed = new EditorPartCloseHandler ( ) { @ Override public void onClose ( EditorPartPresenter editor ) { } } ; private final FileEventHandler fileEventHandler = new FileEventHandler ( ) { @ Override public void onFileOperation ( final FileEvent event ) { } } ; private final EventBus eventBus ; private final WorkspaceAgent workspace ; private Array < EditorPartPresenter > dirtyEditors ; private FileTypeRegistry fileTypeRegistry ; private EditorRegistry editorRegistry ; private EditorPartPresenter activeEditor ; private final ActivePartChangedHandler activePartChangedHandler = new ActivePartChangedHandler ( ) { @ Override public void onActivePartChanged ( ActivePartChangedEvent event ) { } } ; private NotificationManager notificationManager ; private CoreLocalizationConstant coreLocalizationConstant ; private final WindowActionHandler windowActionHandler = new WindowActionHandler ( ) { @ Override public void onWindowClosing ( final WindowActionEvent event ) { } @ Override public void onWindowClosed ( WindowActionEvent event ) { } } ; @ Inject public EditorAgentImpl ( EventBus eventBus , FileTypeRegistry fileTypeRegistry , EditorRegistry editorRegistry , final WorkspaceAgent workspace , final NotificationManager notificationManager , CoreLocalizationConstant coreLocalizationConstant ) { } protected void bind ( ) { } private void closeAllFilesByPath ( String path ) { } @ Override public void openEditor ( @ Nonnull final VirtualFile file ) { } @ Override public void openEditor ( @ Nonnull VirtualFile file , @ Nonnull OpenEditorCallback callback ) { } private void doOpen ( final VirtualFile file , final OpenEditorCallback callback ) { } @ Override public void activateEditor ( @ Nonnull EditorPartPresenter editor ) { } @ Override public Array < EditorPartPresenter > getDirtyEditors ( ) { } protected void editorClosed ( EditorPartPresenter editor ) { String closedFilePath = editor . getEditorInput ( ) . getFile ( ) . getPath ( ) ; openedEditors . remove ( closedFilePath ) ; editor . close ( false ) ; String activeFilePath = activeEditor . getEditorInput ( ) . getFile ( ) . getPath ( ) ; <START_BUG> if ( activeFilePath == closedFilePath ) { <END_BUG> activeEditor = null ; } } @ Override public StringMap < EditorPartPresenter > getOpenedEditors ( ) { } @ Override public void saveAll ( final AsyncCallback callback ) { } private void doSave ( final AsyncCallback callback ) { } @ Override public EditorPartPresenter getActiveEditor ( ) { } }

Fix:
if ( activeFilePath . equals ( closedFilePath ) ) {
Buggy code:
@ Controller @ RequestMapping ( "//user//join" ) public class JoinController extends BaseController { public String register ( HttpServletRequest req , HttpServletResponse response ) throws Exception { HttpServletReqEx request = ( ( HttpServletReqEx ) ( req ) ) ; String username = request . getParameter ( "username" ) ; if ( ! ( StringUtils . isNotEmpty ( username ) ) ) { throw new RuntimeException ( "用户名不能为空" ) ; } String password = request . getParameter ( "password" ) ; if ( ! ( StringUtils . isNotEmpty ( password ) ) ) { throw new RuntimeException ( "密码不能为空" ) ; } String email = request . getParameter ( "email" ) ; if ( ! ( StringUtils . isNotEmpty ( email ) ) ) { throw new RuntimeException ( "邮箱不能为空" ) ; } boolean isMultipart = ServletFileUpload . isMultipartContent ( request ) ; if ( isMultipart == true ) { List < FileItem > items = request . getItems ( ) ; Iterator < FileItem > itr = items . iterator ( ) ; while ( itr . hasNext ( ) ) { FileItem item = ( ( FileItem ) ( itr . next ( ) ) ) ; if ( item . isFormField ( ) ) { continue ; } InputStream stm = item . getInputStream ( ) ; try { User user = new User ( ) ; user . setId ( username ) ; user . setEmail ( email ) ; user . setCreateDate ( new Date ( ) ) ; user . setPwd ( StringTools . encryptPassword ( password ) ) ; byte [ ] img = new byte [ stm . available ( ) ] ; user . setCardImgBytes ( img ) ; Server . getInstance ( ) . userMgr ( ) . add ( user ) ; Login login = ControlUtil . getLogin ( request ) ; if ( ! ( login . isLogined ( ) ) ) { login . login ( username , password ) ; } String contextPath = req . getContextPath ( ) ; if ( ! ( StringUtils . isNotEmpty ( contextPath ) ) ) { contextPath = "//" ; } if ( ! ( StringUtils . endsWith ( contextPath , "//" ) ) ) { contextPath = contextPath + "//" ; } <START_BUG> response . sendRedirect ( ( ( contextPath + "user//userinfo.do?userid=" ) + username ) ) ; <END_BUG> return null ; } finally { stm . close ( ) ; } } } return null ; } @ Override protected String hanldleReq ( HttpServletRequest req , HttpServletResponse res ) throws Exception { } private void checkIdExist ( HttpServletRequest req , HttpServletResponse res ) throws Exception { } }

Fix:
response . sendRedirect ( ( contextPath + "user//userinfo.do?fromLogin=true" ) ) ;
Buggy code:
public class ClasspathSourceDirectory extends ClasspathLocation { IContainer sourceFolder ; String sourceLocation ; String encoding ; SimpleLookupTable directoryCache ; String [ ] missingPackageHolder = new String [ 1 ] ; ClasspathSourceDirectory ( IContainer sourceFolder ) { } public void cleanup ( ) { } String [ ] directoryList ( String qualifiedPackageName ) { } boolean doesFileExist ( String fileName , String qualifiedPackageName ) { } public boolean equals ( Object o ) { } public NameEnvironmentAnswer findClass ( String sourceFileWithoutExtension , String qualifiedPackageName , String qualifiedSourceFileWithoutExtension ) { for ( int i = 0 , length = Util . JAVA_LIKE_EXTENSIONS ; i < length ; i ++ ) { String extension = new String ( Util . JAVA_LIKE_EXTENSIONS [ i ] ) ; String sourceFileName = sourceFileWithoutExtension + extension ; if ( ! ( doesFileExist ( sourceFileName , qualifiedPackageName ) ) ) continue ; String qualifiedSourceFileName = qualifiedSourceFileWithoutExtension + extension ; String fullSourcePath = ( this . sourceLocation ) + qualifiedSourceFileName ; IPath path = new Path ( qualifiedSourceFileName ) ; IFile file = this . sourceFolder . getFile ( path ) ; String fileEncoding = this . encoding ; try { fileEncoding = file . getCharset ( ) ; } catch ( CoreException ce ) { } <START_BUG> return new NameEnvironmentAnswer ( new CompilationUnit ( null , fullSourcePath , fileEncoding ) ) ; <END_BUG> } return null ; } public IPath getProjectRelativePath ( ) { } public boolean isPackage ( String qualifiedPackageName ) { } public void reset ( ) { } public String toString ( ) { } }

Fix:
return new NameEnvironmentAnswer ( new CompilationUnit ( null , fullSourcePath , fileEncoding ) , null ) ;
Buggy code:
public class StatefulPage extends WebPage { private int linkClickCount = 0 ; public StatefulPage ( ) { } public int getLinkClickCount ( ) { } <START_BUG> public void setLinkClickCount ( int linkClickCount ) { <END_BUG> this . linkClickCount = linkClickCount ; } }

Fix:
public void setLinkClickCount ( final int linkClickCount ) {
Buggy code:
public class Flow { private Mat prev ; private Mat flow ; private boolean hasFlow = false ; private double pyramidScale = 0.5 ; private int nLevels = 4 ; private int windowSize = 8 ; private int nIterations = 2 ; private int polyN = 7 ; private double polySigma = 1.5 ; private int runningFlags = Video . OPTFLOW_FARNEBACK_GAUSSIAN ; private PApplet parent ; public Flow ( PApplet parent ) { } public int width ( ) { } public int height ( ) { } public boolean hasFlow ( ) { } public void calculateOpticalFlow ( Mat m ) { } public PVector getTotalFlowInRegion ( int x , int y , int w , int h ) { } public PVector getAverageFlowInRegion ( int x , int y , int w , int h ) { PVector total = getTotalFlowInRegion ( x , y , w , h ) ; <START_BUG> return new PVector ( ( ( total . x ) // ( ( flow . width ( ) ) * ( flow . height ( ) ) ) ) , ( ( total . y ) // ( ( flow . width ( ) ) * ( flow . height ( ) ) ) ) ) ; <END_BUG> } public PVector getTotalFlow ( ) { } public PVector getAverageFlow ( ) { } public PVector getFlowAt ( int x , int y ) { } public void draw ( ) { } public void setPyramidScale ( double v ) { } public double getPyramidScale ( ) { } public void setLevels ( int n ) { } public int getLevels ( ) { } public void setWindowSize ( int s ) { } public int getWindowSize ( ) { } public void setIterations ( int i ) { } public int getIterations ( ) { } public void setPolyN ( int n ) { } public int getPolyN ( ) { } public void setPolySigma ( double s ) { } public double getPolySigma ( ) { } No newline ; at end ; of file ; }

Fix:
return new PVector ( ( ( total . x ) // ( w * h ) ) , ( ( total . y ) // ( w * h ) ) ) ;
Buggy code:
public class Label extends Control { String text = "" ; Image image ; boolean isImage ; public Label ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { checkWidget ( ) ; int width = 0 ; int height = 0 ; if ( ( ( style ) & ( SWT . SEPARATOR ) ) != 0 ) { if ( ( ( style ) & ( SWT . HORIZONTAL ) ) != 0 ) { width = DEFAULT_WIDTH ; height = 3 ; } else { width = 3 ; height = DEFAULT_HEIGHT ; } } else { if ( ( isImage ) && ( ( image ) != null ) ) { Rectangle r = image . getBounds ( ) ; width = r . width ; height = r . height ; } else { int length = text . length ( ) ; if ( length != 0 ) { int [ ] ptr = new int [ 1 ] ; OS . GetControlData ( handle , ( ( short ) ( 0 ) ) , kControlStaticTextCFStringTag , 4 , ptr , null ) ; if ( ( ptr [ 0 ] ) != 0 ) { org . eclipse . swt . internal . carbon . Point ioBounds = new org . eclipse . swt . internal . carbon . Point ( ) ; if ( ( ( ( style ) & ( SWT . WRAP ) ) != 0 ) && ( wHint != ( SWT . DEFAULT ) ) ) ioBounds . h = ( ( short ) ( wHint ) ) ; if ( ( font ) == null ) { OS . GetThemeTextDimensions ( ptr [ 0 ] , ( ( short ) ( defaultThemeFont ( ) ) ) , kThemeStateActive , ( ( ioBounds . h ) != 0 ) , ioBounds , null ) ; } else { int [ ] currentPort = new int [ 1 ] ; OS . GetPort ( currentPort ) ; OS . SetPortWindowPort ( OS . GetControlOwner ( handle ) ) ; OS . TextFont ( id ) ; OS . TextFace ( style ) ; OS . TextSize ( size ) ; OS . GetThemeTextDimensions ( ptr [ 0 ] , ( ( short ) ( kThemeCurrentPortFont ) ) , kThemeStateActive , ( ( ioBounds . h ) != 0 ) , ioBounds , null ) ; OS . SetPort ( currentPort [ 0 ] ) ; } width = ioBounds . h ; height = ioBounds . v ; } OS . CFRelease ( ptr [ 0 ] ) ; } else { Font font = getFont ( ) ; FontInfo info = new FontInfo ( ) ; OS . FetchFontInfo ( font . id , font . size , font . style , info ) ; <START_BUG> int fontHeight = ( info . ascent ) + ( info . descent ) ; <END_BUG> height = fontHeight ; } } } if ( wHint != ( SWT . DEFAULT ) ) width = wHint ; if ( hHint != ( SWT . DEFAULT ) ) height = hHint ; return new Point ( width , height ) ; } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawBackground ( int control , int context ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public int getBorderWidth ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public String getText ( ) { } public void setAlignment ( int alignment ) { } public void setImage ( Image image ) { } public void setText ( String string ) { } }

Fix:
int fontHeight = ( ( info . ascent ) + ( info . descent ) ) + ( info . leading ) ;
Buggy code:
public abstract class AbstractJMSRuntimeHandler < T > extends AbstractRuntimeOnlyHandler { private final Map < AbstractJMSRuntimeHandler . ResourceConfig , T > resources = Collections . synchronizedMap ( new HashMap < AbstractJMSRuntimeHandler . ResourceConfig , T > ( ) ) ; @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { } public void registerResource ( final String server , final String name , final T resource ) { } public void unregisterResource ( final String server , final String name ) { } protected abstract void executeReadAttribute ( final String attributeName , final OperationContext context , final T destination , final PathAddress address , final boolean includeDefault ) { } private static IllegalStateException unknownOperation ( String opName ) { } private T getResourceConfig ( final PathAddress operationAddress ) throws OperationFailedException { final String name = operationAddress . getLastElement ( ) . getValue ( ) ; final String server = operationAddress . getElement ( ( ( operationAddress . size ( ) ) - 2 ) ) . getValue ( ) ; T config = resources . get ( new AbstractJMSRuntimeHandler . ResourceConfig ( server , name ) ) ; if ( config == null ) { String exceptionMessage = ROOT_LOGGER . noDestinationRegisteredForAddress ( operationAddress ) ; <START_BUG> throw new OperationFailedException ( exceptionMessage ) ; <END_BUG> } return config ; } private static final class ResourceConfig { private final String server ; private final String name ; private ResourceConfig ( final String server , final String name ) { } @ Override public boolean equals ( final Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( exceptionMessage ) ) ;
Buggy code:
public class Browser extends ActionBarActivity { private WebView browserWebView ; private RelativeLayout layout ; private ProgressBar spinner ; private TextView loadingTextView ; private InputMethodManager inputMethodManager ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private boolean testUrl ( String url ) { <START_BUG> if ( ( url . equals ( "https:////jfc.itslearning.com//index.aspx" ) ) || ( url . equals ( "https:////jfc.magister.net//#//inloggen" ) ) ) { <END_BUG> return true ; } else return false ; } private void showBrowser ( ) { } private void hideBrowser ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
if ( ( ( ( url . equals ( "https:////jfc.itslearning.com//index.aspx" ) ) || ( url . equals ( "https:////jfc.magister.net//#//inloggen" ) ) ) || ( url . equals ( "http:////jfc.itslearning.com" ) ) ) || ( url . equals ( "http:////jfc.magister.net" ) ) ) {
Buggy code:
public class DatabaseLoginFragment extends BaseTitledFragment { public static final String AD_ENTERPRISE_CONNECTION_ARGUMENT = "AD_ENTERPRISE_CONNECTION_ARGUMENT" ; public static final String DEFAULT_CONNECTION_ARGUMENT = "DEFAULT_CONNECTION_ARGUMENT" ; public static final String IS_MAIN_LOGIN_ARGUMENT = "IS_MAIN_LOGIN_ARGUMENT" ; LoginAuthenticationErrorBuilder errorBuilder ; LoginValidator validator ; DomainMatcher matcher ; CredentialField usernameField ; CredentialField passwordField ; View separator ; View singleSignOnMessage ; Button accessButton ; ProgressBar progressBar ; private boolean showADForm ; private boolean hasDB ; private boolean showSignUp ; private boolean showResetPassword ; private boolean showCancel ; private Connection enterpriseConnection ; private Connection defaultConnection ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , @ Nullable ViewGroup container , @ Nullable Bundle savedInstanceState ) { if ( showADForm ) { return inflater . inflate ( fragment_enterprise_login , container , false ) ; } <START_BUG> return super . onCreateView ( inflater , container , savedInstanceState ) ; <END_BUG> } @ Override protected int getTitleResource ( ) { } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } private void initNavButtons ( View view ) { } private void login ( ) { } private void performLogin ( ) { } }

Fix:
return inflater . inflate ( fragment_database_login , container , false ) ;
Buggy code:
public class Argument extends LocalDeclaration { public Argument ( char [ ] name , long posNom , TypeReference tr , int modifiers ) { } public void bind ( MethodScope scope , TypeBinding typeBinding , boolean used ) { if ( ( this . type ) != null ) <START_BUG> this . type . binding = typeBinding ; <END_BUG> int modifierFlag = this . modifiers ; if ( ( this . binding = scope . duplicateName ( this . name ) ) != null ) { scope . problemReporter ( ) . redefineArgument ( this ) ; } else { scope . addLocalVariable ( ( this . binding = new LocalVariableBinding ( this , typeBinding , modifierFlag , true ) ) ) ; if ( ( typeBinding != null ) && ( isTypeUseDeprecated ( typeBinding , scope ) ) ) scope . problemReporter ( ) . deprecatedType ( typeBinding , this . type ) ; this . binding . declaration = this ; this . binding . useFlag = ( used ) ? LocalVariableBinding . USED : LocalVariableBinding . UNUSED ; } } public TypeBinding resolveForCatch ( BlockScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
this . type . resolvedType = typeBinding ;
Buggy code:
public class JMSQueueAddJndiHandler extends AbstractAddJndiHandler { public static final JMSQueueAddJndiHandler INSTANCE = new JMSQueueAddJndiHandler ( ) ; private JMSQueueAddJndiHandler ( ) { } @ Override protected void addJndiNameToControl ( String toAdd , String resourceName , HornetQServer server , OperationContext context ) { ManagementService mgmt = server . getManagementService ( ) ; JMSQueueControl control = JMSQueueControl . class . cast ( mgmt . getResource ( ( ( ResourceNames . JMS_QUEUE ) + resourceName ) ) ) ; try { control . addJNDI ( toAdd ) ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { <START_BUG> context . getFailureDescription ( ) . set ( e . toString ( ) ) ; <END_BUG> } } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
context . getFailureDescription ( ) . set ( e . getLocalizedMessage ( ) ) ;
Buggy code:
public class EDAMUserExceptionHandler { private boolean reauthorized = false ; public IStatus handleRuntime ( final Shell shell , final EDAMUserException e , final EeClipper clipper ) { } public boolean handleDesingTime ( final Shell shell , final EDAMUserException e , final EeClipper clipper ) { } private void oauth ( final Shell shell ) throws ExecutionException { int opt = EclipseUtil . openCustomImageTypeWithCustomButtons ( shell , Plugin_OAuth_AuthExpired_Title , Plugin_OAuth_AuthExpired_Message , new org . eclipse . swt . graphics . Image ( Display . getDefault ( ) , getClass ( ) . getClassLoader ( ) . getResourceAsStream ( OAUTH_EVERNOTE_TRADEMARK_DISCONNECTED ) ) , ArrayUtils . toArray ( Plugin_OAuth_AuthExpired_ReAuth , Plugin_OAuth_NotNow ) ) ; if ( opt == 0 ) { try { new org . eclipse . jface . dialogs . ProgressMonitorDialog ( shell ) . run ( true , true , new IRunnableWithProgress ( ) { @ Override public void run ( final org . eclipse . core . runtime . IProgressMonitor monitor ) { monitor . beginTask ( Messages . Plugin_OAuth_Waiting , org . eclipse . core . runtime . IProgressMonitor . UNKNOWN ) ; try { <START_BUG> String token = new com . prairie . eemory . oauth . OAuth ( ) . auth ( ) ; <END_BUG> if ( org . apache . commons . lang3 . StringUtils . isNotBlank ( token ) ) { com . prairie . eemory . util . IDialogSettingsUtil . set ( Constants . PLUGIN_SETTINGS_KEY_TOKEN , com . prairie . eemory . util . EncryptionUtil . encrypt ( token ) ) ; reauthorized = true ; } } catch ( Throwable e ) { ThrowableHandler . handleDesignTimeErr ( shell , e ) ; } monitor . done ( ) ; } } ) ; } catch ( Throwable e ) { throw ThrowableHandler . handleExecErr ( e ) ; } } } }

Fix:
String token = new com . prairie . eemory . oauth . OAuth ( ) . auth ( shell ) ;
Buggy code:
public class JobGraphLayoutTransformer implements Transformer < Object , Point2D > { private static final Logger logger = LoggerFactory . getLogger ( JobGraphLayoutTransformer . class ) ; private final Comparator < Object > longestTrailComparator = new Comparator < Object > ( ) { @ Override public int compare ( Object o1 , Object o2 ) { } } ; private static final int X_STEP = 160 ; private static final int X_OFFSET = 40 ; private static final int Y_STEP = 80 ; private static final int Y_OFFSET = 40 ; private final AnalysisJobBuilder _analysisJobBuilder ; private final DirectedGraph < Object , JobGraphLink > _graph ; private final Map < Object , Point > _points = new IdentityHashMap < Object , Point > ( ) ; private final Map < Integer , Integer > _yCount = new HashMap < Integer , Integer > ( ) ; private volatile boolean _transformed ; public JobGraphLayoutTransformer ( AnalysisJobBuilder analysisJobBuilder , DirectedGraph < Object , JobGraphLink > graph ) { } private void createPoints ( ) { } private void createPrerequisitePoints ( final Object vertex , final int vertexX ) { } private List < Object > getEndpointVertices ( ) { } private Point createPoint ( final Object vertex , int xIndex , boolean onlyIfCoordinatesDefined ) { } private Point createPoint ( final int x , final int y ) { } @ Override public Point2D transform ( Object vertex ) { Point point = _points . get ( vertex ) ; if ( point == null ) { JobGraphLayoutTransformer . logger . warn ( "Vertex<seq2seq4repair_space>{}<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>assigned<seq2seq4repair_space>coordinate!" , vertex ) ; <START_BUG> return new Point ( 0 , 0 ) ; <END_BUG> } _transformed = true ; return point ; } public boolean isTransformed ( ) { } private List < Object > getPrerequisites ( Object vertex ) { } private int getAccumulatedPrerequisiteCount ( Object obj ) { } private int getAccumulatedPrerequisiteCount ( Object obj , Set < JobGraphLink > visitedEdges ) { } public Dimension getPreferredSize ( ) { } }

Fix:
point = new Point ( 0 , 0 ) ;
Buggy code:
public class ListDatatypeValidator implements DatatypeValidator { DatatypeValidator fItemValidator ; public ListDatatypeValidator ( DatatypeValidator itemDV ) { } public void validate ( String content , ValidationContext context ) throws InvalidDatatypeValueException { <START_BUG> StringTokenizer parsedList = new StringTokenizer ( content ) ; <END_BUG> int numberOfTokens = parsedList . countTokens ( ) ; if ( numberOfTokens == 0 ) { throw new InvalidDatatypeValueException ( "EmptyList" , null ) ; } while ( parsedList . hasMoreTokens ( ) ) { this . fItemValidator . validate ( parsedList . nextToken ( ) , context ) ; } } }

Fix:
StringTokenizer parsedList = new StringTokenizer ( content , "<seq2seq4repair_space>" ) ;
Buggy code:
public class CameraVision { public static final int CAMERA_CENTER = 320 ; AxisCamera camera ; CriteriaCollection cc ; private Relay targetLight ; private double targetCenter ; public CameraVision ( ) { } public void doCamera ( ) { } public double getTargetCenter ( ) { } public boolean isFacingTarget ( ) { <START_BUG> double absValue = Math . abs ( ( ( TARGET_POSITION ) - ( targetCenter ) ) ) ; <END_BUG> return absValue < 50 ; } }

Fix:
double absValue = Math . abs ( ( ( CameraVision . CAMERA_CENTER ) - ( targetCenter ) ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//new" ) @ SessionAttributes ( types = Owner . class ) public class AddOwnerForm { private final Clinic clinic ; @ Autowired public AddOwnerForm ( Clinic clinic ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( "id" ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( Model model ) { } @ RequestMapping ( method = RequestMethod . POST ) public String processSubmit ( @ ModelAttribute Owner owner , BindingResult result , SessionStatus status ) { } }

Fix:
dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ;
Buggy code:
public class XProductB implements AbstractProductB { @ Override public String methodB ( ) { <START_BUG> return "Implementación<seq2seq4repair_space>X<seq2seq4repair_space>del<seq2seq4repair_space>producto<seq2seq4repair_space>B" ; <END_BUG> } }

Fix:
return "Implementaci_n<seq2seq4repair_space>X<seq2seq4repair_space>del<seq2seq4repair_space>producto<seq2seq4repair_space>B" ;
Buggy code:
public class VmNetworkStatisticsDaoTest extends NetworkStatisticsDaoTest < VmNetworkStatistics > { private static final Guid INTERFACE_ID = new Guid ( "e2817b12-f873-4046-b0da-0098293c14fd" ) ; private static final Guid NEW_INTERFACE_ID = new Guid ( "14550e82-1e1f-47b5-ae41-b009348dabfa" ) ; private static final Guid VM_ID = new Guid ( "77296e00-0cad-4e5a-9299-008a7b6f4355" ) ; private VmNetworkStatisticsDao dao ; private VmNetworkStatistics newVmStatistics ; @ Override public void setUp ( ) throws Exception { } @ Test public void testGetWithNonExistingId ( ) { } @ Test public void testGet ( ) { } @ Test public void testSave ( ) { } @ Override protected List < VmNetworkInterface > getAllInterfaces ( ) { } @ Override protected void updateStatistics ( VmNetworkStatistics stats ) { } @ Test public void testUpdateWithValues ( ) { } @ Test public void testUpdateNullValues ( ) { } @ Test public void testRemove ( ) { } @ Test ( expected = NotImplementedException . class ) public void testGetAll ( ) throws Exception { } @ Test public void testUpdateAll ( ) throws Exception { VmNetworkStatistics existingStats = dao . get ( VmNetworkStatisticsDaoTest . INTERFACE_ID ) ; <START_BUG> VmNetworkStatistics existingStats2 = dao . get ( new Guid ( "e2817b12-f873-4046-b0da-0098293c14fe" ) ) ; <END_BUG> existingStats . setReceiveDropRate ( 10.0 ) ; existingStats2 . setStatus ( DOWN ) ; dao . updateAll ( Arrays . asList ( new VmNetworkStatistics [ ] { existingStats , existingStats2 } ) ) ; assertEquals ( existingStats . getReceiveDropRate ( ) , dao . get ( existingStats . getId ( ) ) . getReceiveDropRate ( ) ) ; assertEquals ( existingStats2 . getStatus ( ) , dao . get ( existingStats2 . getId ( ) ) . getStatus ( ) ) ; } }

Fix:
VmNetworkStatistics existingStats2 = dao . get ( new Guid ( "e2817b12-f873-4046-b0da-0098293c0000" ) ) ;
Buggy code:
public class ImportDeclaration extends ASTNode { public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( ImportDeclaration . class , "name" , Name . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; public static final SimplePropertyDescriptor ON_DEMAND_PROPERTY = new SimplePropertyDescriptor ( ImportDeclaration . class , "onDemand" , boolean . class , ASTNode . MANDATORY ) ; public static final SimplePropertyDescriptor STATIC_PROPERTY = new SimplePropertyDescriptor ( ImportDeclaration . class , "static" , boolean . class , ASTNode . MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private Name importName = null ; private boolean onDemand = false ; private boolean isStatic = false ; ImportDeclaration ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final boolean internalGetSetBooleanProperty ( SimplePropertyDescriptor property , boolean get , boolean value ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { ImportDeclaration result = new ImportDeclaration ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; result . setOnDemand ( isOnDemand ( ) ) ; <START_BUG> if ( ( this . ast . API_LEVEL ) >= ( LEVEL_3_0 ) ) { <END_BUG> result . setStatic ( isStatic ( ) ) ; } result . setName ( ( ( Name ) ( getName ( ) . clone ( target ) ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Name getName ( ) { } public void setName ( Name name ) { } public boolean isOnDemand ( ) { } public void setOnDemand ( boolean onDemand ) { } public boolean isStatic ( ) { } public void setStatic ( boolean isStatic ) { } public IBinding resolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
if ( ( this . ast . apiLevel ) >= ( LEVEL_3_0 ) ) {
Buggy code:
public class DoubleConstant extends Constant { double value ; public DoubleConstant ( double value ) { } public byte byteValue ( ) { } public char charValue ( ) { } public double doubleValue ( ) { <START_BUG> return ( ( double ) ( value ) ) ; <END_BUG> } public float floatValue ( ) { } public int intValue ( ) { } public long longValue ( ) { } public short shortValue ( ) { } public String stringValue ( ) { } public String toString ( ) { } public int typeID ( ) { } }

Fix:
return this . value ;
Buggy code:
public class IncrementalCallbackTest extends AbstractIncrementalTest { @ Override public String getWorkflowFileName ( ) { <START_BUG> return "//workflow//incrementalcallback.mwe" ; <END_BUG> } @ Override public boolean writesDiff ( ) { } }

Fix:
return "//resources//workflow//incrementalcallback.mwe" ;
Buggy code:
public class Localizer { private ServiceTracker serviceListenerTracker ; private ServiceTracker serviceTypeListenerTracker ; private static Localizer singleton ; private Localizer ( ) { } public static Localizer getSingleton ( ) { } public void init ( ) { } public void close ( ) { } public void localize ( Notification notification ) { if ( ( notification . getType ( ) ) == ( Notification . AVAILABLE ) ) { for ( IServiceListener srl : ZooDiscoveryContainer . getSingleton ( ) . getServiceListenersForType ( notification . getServiceTypeID ( ) ) ) { srl . serviceDiscovered ( notification ) ; } <START_BUG> for ( IServiceTypeListener stl : ZooDiscoveryContainer . getSingleton ( ) . getSrviceTypeListeners ( ) ) { <END_BUG> stl . serviceTypeDiscovered ( notification ) ; } } else if ( ( notification . getType ( ) ) == ( Notification . UNAVAILABLE ) ) { for ( IServiceListener l : ZooDiscoveryContainer . getSingleton ( ) . getAllServiceListeners ( ) ) { l . serviceUndiscovered ( notification ) ; } } } }

Fix:
for ( IServiceTypeListener stl : ZooDiscoveryContainer . getSingleton ( ) . getServiceTypeListeners ( ) ) {
Buggy code:
public class SoundFragment extends ListFragment { private ArrayList < Sound > mSounds ; private AudioRecorder mPlayer = new AudioRecorder ( ) ; private ImageButton mImageButton ; private Date now = new Date ( ) ; private long now1 = now . getTime ( ) ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private class SoundAdapter extends ArrayAdapter < Sound > { public SoundAdapter ( ArrayList < Sound > sounds ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { if ( convertView == null ) { convertView = getActivity ( ) . getLayoutInflater ( ) . inflate ( fragment_sound , null ) ; } Sound s = getItem ( position ) ; TextView titleTextView = ( ( TextView ) ( convertView . findViewById ( sound_title ) ) ) ; titleTextView . setText ( s . getTitle ( ) . toString ( ) ) ; TextView usernameTextView = ( ( TextView ) ( convertView . findViewById ( username_label ) ) ) ; usernameTextView . setText ( s . getUsername ( ) . toString ( ) ) ; TextView locationTextView = ( ( TextView ) ( convertView . findViewById ( sound_location ) ) ) ; locationTextView . setText ( s . getLocation ( ) . toString ( ) ) ; String timestamp = ( ( String ) ( DateUtils . getRelativeTimeSpanString ( now1 , now1 , MINUTE_IN_MILLIS ) ) ) ; TextView timeTextView = ( ( TextView ) ( convertView . findViewById ( time_label ) ) ) ; timeTextView . setText ( timestamp ) ; mImageButton = ( ( ImageButton ) ( convertView . findViewById ( sound_vis ) ) ) ; mImageButton . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { <START_BUG> mPlayer . onPlay ( true ) ; <END_BUG> } } ) ; return convertView ; } } }

Fix:
mPlayer . playSound ( getActivity ( ) ) ;
Buggy code:
public final class NonLocalUndoUserApprover implements IOperationApprover { private IUndoContext context ; private IEditorPart part ; private Object [ ] elements ; private Class affectedObjectsClass ; private ArrayList elementsAndAdapters ; public NonLocalUndoUserApprover ( IUndoContext context , IEditorPart part , Object [ ] affectedObjects , Class preferredComparisonClass ) { } public IStatus proceedRedoing ( IUndoableOperation operation , IOperationHistory history , IAdaptable uiInfo ) { } public IStatus proceedUndoing ( IUndoableOperation operation , IOperationHistory history , IAdaptable uiInfo ) { } private IStatus proceedWithOperation ( IUndoableOperation operation , String message , String discardButton ) { if ( ! ( operation instanceof IAdvancedUndoableOperation ) ) return Status . OK_STATUS ; Object [ ] modifiedElements = ( ( IAdvancedUndoableOperation ) ( operation ) ) . getAffectedObjects ( ) ; boolean local ; if ( modifiedElements == null ) { local = false ; } else { local = true ; for ( int i = 0 ; i < ( modifiedElements . length ) ; i ++ ) { Object modifiedElement = modifiedElements [ i ] ; if ( ! ( elementsContains ( modifiedElement ) ) ) { local = false ; if ( ( ( affectedObjectsClass ) != null ) && ( modifiedElement instanceof IAdaptable ) ) { if ( elementsContains ( ( ( IAdaptable ) ( modifiedElement ) ) . getAdapter ( affectedObjectsClass ) ) ) { local = true ; } } if ( ! local ) break ; } } } if ( local ) return Status . OK_STATUS ; <START_BUG> MessageDialog dialog = new MessageDialog ( part . getSite ( ) . getShell ( ) , part . getEditorInput ( ) . getName ( ) , null , message , MessageDialog . QUESTION , new String [ ] { IDialogConstants . YES_LABEL , discardButton , IDialogConstants . CANCEL_LABEL } , 0 ) ; <END_BUG> int answer = dialog . open ( ) ; switch ( answer ) { case 0 : return Status . OK_STATUS ; case 1 : return IOperationHistory . OPERATION_INVALID_STATUS ; default : return Status . CANCEL_STATUS ; } } private boolean requiresApproval ( IUndoableOperation operation , IAdaptable uiInfo ) { } private boolean elementsContains ( Object someObject ) { } }

Fix:
MessageDialog dialog = new MessageDialog ( part . getSite ( ) . getShell ( ) , part . getEditorInput ( ) . getName ( ) , null , message , MessageDialog . QUESTION , new String [ ] { IDialogConstants . OK_LABEL , discardButton , IDialogConstants . CANCEL_LABEL } , 0 ) ;
Buggy code:
public class Projection extends SpelNodeImpl { private final boolean nullSafe ; public Projection ( boolean nullSafe , int pos , SpelNodeImpl expression ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { TypedValue op = state . getActiveContextObject ( ) ; Object operand = op . getValue ( ) ; boolean operandIsArray = ObjectUtils . isArray ( operand ) ; if ( operand instanceof Map ) { Map < ? , ? > mapdata = ( ( Map < ? , ? > ) ( operand ) ) ; List < Object > result = new ArrayList < Object > ( ) ; for ( Map . Entry entry : mapdata . entrySet ( ) ) { try { state . pushActiveContextObject ( new TypedValue ( entry , TypeDescriptor . valueOf ( Map . Entry . class ) ) ) ; result . add ( children [ 0 ] . getValueInternal ( state ) . getValue ( ) ) ; } finally { state . popActiveContextObject ( ) ; } } return new TypedValue ( result , TypeDescriptor . valueOf ( List . class ) ) ; } else if ( ( operand instanceof List ) || operandIsArray ) { List < Object > data = new ArrayList < Object > ( ) ; Collection < ? > c = ( operand instanceof List ) ? ( ( Collection < ? > ) ( operand ) ) : Arrays . asList ( ObjectUtils . toObjectArray ( operand ) ) ; data . addAll ( c ) ; List < Object > result = new ArrayList < Object > ( ) ; int idx = 0 ; Class < ? > arrayElementType = null ; for ( Object element : data ) { try { state . pushActiveContextObject ( new TypedValue ( element , TypeDescriptor . valueOf ( op . getTypeDescriptor ( ) . getType ( ) ) ) ) ; state . enterScope ( "index" , idx ) ; Object value = children [ 0 ] . getValueInternal ( state ) . getValue ( ) ; if ( ( value != null ) && operandIsArray ) { arrayElementType = this . determineCommonType ( arrayElementType , value . getClass ( ) ) ; } result . add ( value ) ; } finally { state . exitScope ( ) ; state . popActiveContextObject ( ) ; } idx ++ ; } if ( operandIsArray ) { if ( arrayElementType == null ) { arrayElementType = Object . class ; } Object resultArray = Array . newInstance ( arrayElementType , result . size ( ) ) ; System . arraycopy ( result . toArray ( ) , 0 , resultArray , 0 , result . size ( ) ) ; return new TypedValue ( resultArray , op . getTypeDescriptor ( ) ) ; } return new TypedValue ( result , op . getTypeDescriptor ( ) ) ; } else { if ( operand == null ) { if ( nullSafe ) { <START_BUG> return TypedValue . NULL_TYPED_VALUE ; <END_BUG> } else { throw new org . springframework . expression . spel . SpelEvaluationException ( getStartPosition ( ) , SpelMessage . PROJECTION_NOT_SUPPORTED_ON_TYPE , "null" ) ; } } else { throw new org . springframework . expression . spel . SpelEvaluationException ( getStartPosition ( ) , SpelMessage . PROJECTION_NOT_SUPPORTED_ON_TYPE , operand . getClass ( ) . getName ( ) ) ; } } } @ Override public String toStringAST ( ) { } private Class < ? > determineCommonType ( Class < ? > oldType , Class < ? > newType ) { } }

Fix:
return TypedValue . NULL ;
Buggy code:
public class InfinispanSubsystemTransformerTestCase extends AbstractSubsystemBaseTest { public InfinispanSubsystemTransformerTestCase ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { } @ Test public void testTransformer_1_3_0 ( ) throws Exception { KernelServices services = super . installInController ( MANAGEMENT , getSubsystemXml ( ) ) ; <START_BUG> checkSubsystemTransformer ( services , ModelVersion . create ( 1 , 3 ) ) ; <END_BUG> } }

Fix:
checkModelAgainstDefinition ( services , ModelVersion . create ( 1 , 3 ) ) ;