nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Playerlistener extends PlayerListener { public static XcraftSignGate plugin ; public Playerlistener ( XcraftSignGate instance ) { } @ Override public void onPlayerInteract ( PlayerInteractEvent event ) { if ( ( event . getAction ( ) ) == ( Action . RIGHT_CLICK_BLOCK ) ) { Block block = event . getClickedBlock ( ) ; if ( ( block . getState ( ) ) instanceof Sign ) { Sign sign = ( ( Sign ) ( block . getState ( ) ) ) ; String [ ] lines = sign . getLines ( ) ; <START_BUG> if ( ( lines [ 1 ] . contains ( "[Gate]" ) ) && ( event . getPlayer ( ) . hasPermission ( "XcraftSign.gate.use" ) ) ) { <END_BUG> Gate gate = Playerlistener . plugin . gateHandler . getGate ( block ) ; if ( gate == null ) { event . getPlayer ( ) . sendMessage ( ( ( Playerlistener . plugin . getName ( ) ) + "Dieses<seq2seq4repair_space>Gate<seq2seq4repair_space>wurde<seq2seq4repair_space>nicht<seq2seq4repair_space>geladen..." ) ) ; Playerlistener . plugin . gateHandler . add ( block ) ; return ; } gate . toggle ( ) ; } } } } No newline ; at end ; of file ; }

Fix:
if ( ( lines [ 1 ] . contains ( "[Gate]" ) ) && ( event . getPlayer ( ) . hasPermission ( "XcraftSignGate.use" ) ) ) {
Buggy code:
public class BZip2 extends Pack { protected void pack ( ) { CBZip2OutputStream zOut = null ; try { BufferedOutputStream bos = new BufferedOutputStream ( new FileOutputStream ( zipFile ) ) ; bos . write ( 'B' ) ; bos . write ( 'Z' ) ; zOut = new CBZip2OutputStream ( bos ) ; zipFile ( source , zOut ) ; } catch ( IOException ioe ) { String msg = "Problem<seq2seq4repair_space>creating<seq2seq4repair_space>bzip2<seq2seq4repair_space>" + ( ioe . getMessage ( ) ) ; <START_BUG> throw new org . apache . tools . ant . BuildException ( msg , ioe , location ) ; <END_BUG> } finally { if ( zOut != null ) { try { zOut . close ( ) ; } catch ( IOException e ) { } } } } }

Fix:
throw new BuildException ( msg , ioe ) ;
Buggy code:
public class PropertyConverterManager { private static final Logger LOG = Logger . getLogger ( PropertyConverterManager . class . getName ( ) ) ; private Map < TypeLiteral < ? > , List < PropertyConverter < ? > > > converters = new ConcurrentHashMap < > ( ) ; private StampedLock lock = new StampedLock ( ) ; 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 ( TypeLiteral < T > targetType ) { } private Method getFactoryMethod ( Class < ? > type , String ... methodNames ) { } }

Fix:
Type type = TypeLiteral . getGenericInterfaceTypeParameters ( conv . getClass ( ) , PropertyConverter . class ) [ 0 ] ;
Buggy code:
public class SearchUtils { @ VersionedApi . Final public static SearchBox searchChunk ( Chunk chunk ) { <START_BUG> BlockPos min = new BlockPos ( ( ( chunk . xPosition ) << 2 ) , 0 , ( ( chunk . zPosition ) << 2 ) ) ; <END_BUG> BlockPos max = min . add ( 15 , 255 , 15 ) ; return new SearchBox ( min , max ) ; } @ VersionedApi . Final public static Iterable < BlockPos > searchFaces ( BlockPos pos ) { } @ VersionedApi . Final public static Iterable < BlockPos > searchAround ( BlockPos pos , int radius ) { } private static class ExcludingIterable implements Iterable < BlockPos > { private final SearchBox box ; private final BlockPos excluded ; public ExcludingIterable ( SearchBox box , BlockPos positions ) { } @ Override public Iterator < BlockPos > iterator ( ) { } private class ExcludingIterator implements Iterator < BlockPos > { private final SearchBoxIterator sbi = box . iterator ( ) ; @ Override public boolean hasNext ( ) { } @ Override public BlockPos next ( ) { } @ Override public void remove ( ) { } } } }

Fix:
BlockPos min = new BlockPos ( ( ( chunk . xPosition ) << 4 ) , 0 , ( ( chunk . zPosition ) << 4 ) ) ;
Buggy code:
public class RiggerAgent implements ClassFileTransformer { private String className ; private Instrumentation i ; private JAXBContext context ; private Unmarshaller um ; private RiggerML ref ; public RiggerAgent ( String className , Instrumentation i ) throws JAXBException { } public byte [ ] transform ( ClassLoader loader , String className , Class < ? > classBeingRedefined , ProtectionDomain protectionDomain , byte [ ] classfileBuffer ) throws IllegalClassFormatException { try { ClassParser cp = new ClassParser ( new ByteArrayInputStream ( classfileBuffer ) , ( className + ".java" ) ) ; JavaClass jc = cp . parse ( ) ; ClassGen cg = new ClassGen ( jc ) ; <START_BUG> ref . process ( cg , jc , new Log ( "RiggerAgent" , null ) { <END_BUG> public void info ( String message ) { System . out . printf ( "[RiggerAgent<seq2seq4repair_space>]<seq2seq4repair_space>%s%n" , message ) ; } public void error ( String message ) { System . out . printf ( "[RiggerAgent<seq2seq4repair_space>ERROR<seq2seq4repair_space>]<seq2seq4repair_space>%s%n" , message ) ; } } ) ; return cg . getJavaClass ( ) . getBytes ( ) ; } catch ( IOException e ) { System . out . println ( e ) ; e . printStackTrace ( ) ; } return classfileBuffer ; } public static void premain ( String className , Instrumentation i ) throws ClassNotFoundException , IllegalAccessException , InstantiationException , JAXBException { } }

Fix:
ref . process ( cg , jc , new Log ( ) {
Buggy code:
public class TestDrillDownQuery extends FacetTestCase { private static IndexReader reader ; private static DirectoryTaxonomyReader taxo ; private static Directory dir ; private static Directory taxoDir ; private static FacetsConfig config ; @ AfterClass public static void afterClassDrillDownQueryTest ( ) throws Exception { } @ BeforeClass public static void beforeClassDrillDownQueryTest ( ) throws Exception { TestDrillDownQuery . dir = newDirectory ( ) ; Random r = random ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( r , TestDrillDownQuery . dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( r , MockTokenizer . KEYWORD , false ) ) ) ; TestDrillDownQuery . taxoDir = newDirectory ( ) ; TaxonomyWriter taxoWriter = new org . apache . lucene . facet . taxonomy . directory . DirectoryTaxonomyWriter ( TestDrillDownQuery . taxoDir ) ; TestDrillDownQuery . config = new FacetsConfig ( ) ; TestDrillDownQuery . config . setHierarchical ( "a" , random ( ) . nextBoolean ( ) ) ; TestDrillDownQuery . config . setMultiValued ( "a" , random ( ) . nextBoolean ( ) ) ; if ( random ( ) . nextBoolean ( ) ) { TestDrillDownQuery . config . setIndexFieldName ( "a" , "$a" ) ; } TestDrillDownQuery . config . setRequireDimCount ( "a" , true ) ; TestDrillDownQuery . config . setHierarchical ( "b" , random ( ) . nextBoolean ( ) ) ; TestDrillDownQuery . config . setMultiValued ( "b" , random ( ) . nextBoolean ( ) ) ; if ( random ( ) . nextBoolean ( ) ) { TestDrillDownQuery . config . setIndexFieldName ( "b" , "$b" ) ; } TestDrillDownQuery . config . setRequireDimCount ( "b" , true ) ; for ( int i = 0 ; i < 100 ; i ++ ) { Document doc = new Document ( ) ; if ( ( i % 2 ) == 0 ) { doc . add ( new org . apache . lucene . document . TextField ( "content" , "foo" , Store . NO ) ) ; } if ( ( i % 3 ) == 0 ) { doc . add ( new org . apache . lucene . document . TextField ( "content" , "bar" , Store . NO ) ) ; } if ( ( i % 4 ) == 0 ) { if ( r . nextBoolean ( ) ) { doc . add ( new FacetField ( "a" , "1" ) ) ; } else { doc . add ( new FacetField ( "a" , "2" ) ) ; } } if ( ( i % 5 ) == 0 ) { doc . add ( new FacetField ( "b" , "1" ) ) ; } writer . addDocument ( TestDrillDownQuery . config . build ( taxoWriter , doc ) ) ; } taxoWriter . close ( ) ; TestDrillDownQuery . reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> TestDrillDownQuery . taxo = new DirectoryTaxonomyReader ( TestDrillDownQuery . taxoDir ) ; } public void testAndOrs ( ) throws Exception { } public void testQuery ( ) throws IOException { } public void testQueryImplicitDefaultParams ( ) throws IOException { } public void testScoring ( ) throws IOException { } public void testScoringNoBaseQuery ( ) throws IOException { } public void testTermNonDefault ( ) { } public void testClone ( ) throws Exception { } public void testNoDrillDown ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class LocationItem { private Location currentLocation ; private Location location ; private String name ; public LocationItem ( Location location , String name , Location currentLocation ) { } @ Override public String toString ( ) { String result = name ; if ( ( ( currentLocation ) != null ) && ( ( location ) != null ) ) { <START_BUG> result = String . format ( "%s<seq2seq4repair_space>%4.0f<seq2seq4repair_space>:<seq2seq4repair_space>%s" , Cardinal . getCardinal ( currentLocation . bearingTo ( location ) ) . getLabel ( ) , currentLocation . distanceTo ( location ) , name ) ; <END_BUG> } return result ; } public Location getLocation ( ) { } public String getName ( ) { } public Location getCurrentLocation ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } }

Fix:
result = String . format ( "%4.0f<seq2seq4repair_space>m<seq2seq4repair_space>:<seq2seq4repair_space>%s" , currentLocation . distanceTo ( location ) , name ) ;
Buggy code:
public interface IServer { int getPortNumber ( ) { } String getHost ( ) { } void run ( ) { } IGame getGame ( int id ) { } IUser getUser ( int id ) { } void createGame ( ) { } void registerUser ( User user ) { } public Map < Integer , IUser > getUsers ( ) { } public void setUsers ( Map < Integer , IUser > users ) { } public Map < Integer , IGame > getGames ( ) { } public void setGames ( Map < Integer , IGame > games ) { } void createGame ( String name , int id , boolean randomTiles , boolean randomNumbers , boolean randomPorts ) { } public IUser getCurrentUser ( String username ) { } <START_BUG> void getGameModelJSON ( int version , int gameID ) ; <END_BUG> }

Fix:
String getGameModelJSON ( int version , int gameID ) ;
Buggy code:
public class LevelLoadHelperTest { private static LevelModel testLevel ; @ BeforeClass public static void setUpBeforeClass ( ) throws Exception { } @ AfterClass public static void tearDownAfterClass ( ) throws Exception { } @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testLevelFile ( ) { } @ Test public void testLoadAllLevels ( ) { int number = LevelLoadHelper . loadAllLevels ( ) . size ( ) ; <START_BUG> assertEquals ( 1 , number ) ; <END_BUG> } }

Fix:
assertEquals ( 5 , number ) ;
Buggy code:
public class AngelFeatherRecipe implements IRecipe { @ Override public MGItem [ ] getIngriedients ( ) { } @ Override public String getName ( ) { <START_BUG> return ( ChatColor . DARK_PURPLE ) + "Angel<seq2seq4repair_space>Feather" ; <END_BUG> } @ Override public ItemStack getResult ( ) { } }

Fix:
return "Angel<seq2seq4repair_space>Feather" ;
Buggy code:
public class JAXWSAnnotateJavaCommand extends AbstractDataModelOperation { private int numberOfChanges = 0 ; private Java2WSDataModel model ; private IType javaClassType ; private IType javaInterfaceType ; public JAXWSAnnotateJavaCommand ( Java2WSDataModel model ) { } @ Override public IStatus execute ( IProgressMonitor monitor , IAdaptable info ) throws ExecutionException { } private void annotateInterface ( IProgressMonitor monitor ) throws InterruptedException , InvocationTargetException , CoreException { } private void annotateClass ( IProgressMonitor monitor ) throws InterruptedException , InvocationTargetException , CoreException { } private void annotateSEIClass ( IProgressMonitor monitor ) throws InterruptedException , InvocationTargetException , CoreException { } private void executeChange ( IProgressMonitor monitor , Change change ) { if ( change == null ) { return ; } IUndoManager manager = RefactoringCore . getUndoManager ( ) ; boolean successful = false ; Change undoChange = null ; try { change . initializeValidationData ( monitor ) ; RefactoringStatus valid = change . isValid ( monitor ) ; if ( valid . isOK ( ) ) { manager . aboutToPerformChange ( change ) ; undoChange = change . perform ( monitor ) ; successful = true ; ( numberOfChanges ) ++ ; } } catch ( CoreException ce ) { <START_BUG> ce . printStackTrace ( ) ; <END_BUG> } finally { manager . changePerformed ( change , successful ) ; } if ( undoChange != null ) { undoChange . initializeValidationData ( monitor ) ; manager . addUndo ( undoChange . getName ( ) , undoChange ) ; } } @ Override public IStatus undo ( IProgressMonitor monitor , IAdaptable info ) throws ExecutionException { } }

Fix:
CXFCreationCorePlugin . log ( ce . getStatus ( ) ) ;
Buggy code:
public final class DiffUtil { private static final Log log = LogFactory . getLog ( DiffUtil . class ) ; public static final boolean validatePage ( String document , final Class clazz , final String file ) throws IOException { } public static final void replaceExpectedResultFile ( final String document , final Class clazz , final String file ) throws IOException { String filename = clazz . getPackage ( ) . getName ( ) ; filename = filename . replace ( '.' , '//' ) ; filename += "//" + file ; final URL url = clazz . getClassLoader ( ) . getResource ( filename ) ; filename = url . getFile ( ) ; <START_BUG> filename = filename . replaceAll ( "//target//test-classes//" , "//src//test//" ) ; <END_BUG> PrintWriter out = new PrintWriter ( new FileOutputStream ( filename ) ) ; out . print ( document ) ; out . close ( ) ; } }

Fix:
filename = filename . replaceAll ( "//target//test-classes//" , "//src//test//java//" ) ;
Buggy code:
class KerberosManager implements Serializable { private static final long serialVersionUID = 2L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String JAAS_APPLICATION = JMeterUtils . getPropDefault ( "kerberos_jaas_application" , "JMeter" ) ; private ConcurrentMap < String , Future < Subject > > subjects = new ConcurrentHashMap < String , Future < Subject > > ( ) ; public KerberosManager ( ) { } void clearSubjects ( ) { } public Subject getSubjectForUser ( final String username , final String password ) { } private static class LoginCallbackHandler implements CallbackHandler { private String password ; private String username ; public LoginCallbackHandler ( final String username , final String password ) { } @ Override public void handle ( Callback [ ] callbacks ) throws IOException , UnsupportedCallbackException { } } public String getKrb5Conf ( ) { } public boolean getKrb5Debug ( ) { <START_BUG> return Boolean . valueOf ( System . getProperty ( "java.security.krb5.debug" , "False" ) ) ; <END_BUG> } public String getJaasConf ( ) { } @ Override public String toString ( ) { } }

Fix:
return Boolean . getBoolean ( "java.security.krb5.debug" ) ;
Buggy code:
public abstract class AbstractProxyManager implements ProxyManager { public final Object createProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Callable < Object > dispatcher ) throws UnableToProxyException { } public final Object createProxy ( Bundle clientBundle , Collection < Class < ? > > classes , Callable < Object > dispatcher , InvocationHandlerWrapper wrapper ) throws UnableToProxyException { } public final Callable < Object > unwrap ( Object proxy ) { } public final boolean isProxy ( Object proxy ) { <START_BUG> return ( getInvocationHandler ( proxy ) ) instanceof ProxyHandler ; <END_BUG> } protected abstract Object createNewProxy ( Bundle clientBundle , Collection < Class < ? > > classes , InvocationHandler ih ) throws UnableToProxyException { } protected abstract InvocationHandler getInvocationHandler ( Object proxy ) { } protected abstract boolean isProxyClass ( Class < ? > clazz ) { } protected synchronized ClassLoader getClassLoader ( final Bundle clientBundle , Collection < Class < ? > > classes ) { } private Object duplicateProxy ( Collection < Class < ? > > classes , InvocationHandler handler ) { } }

Fix:
return ( proxy != null ) && ( ( getInvocationHandler ( proxy ) ) instanceof ProxyHandler ) ;
Buggy code:
class Roster { Roster ( ) { } void addOperation ( Roster . Operation op ) { } public Roster . Operation getOperation ( int i ) { } int getOperationCount ( ) { } boolean isEmpty ( ) { } boolean performOperations ( PluginManagerProgress progress ) { } private Vector operations ; static interface Operation { boolean perform ( PluginManagerProgress progress ) ; boolean equals ( Object o ) { } int getMaximum ( ) { } } static class Remove implements Roster . Operation { Remove ( String plugin ) { } public int getMaximum ( ) { } public boolean perform ( PluginManagerProgress progress ) { progress . removing ( MiscUtilities . getFileName ( plugin ) ) ; <START_BUG> EditPlugin . JAR jar = jEdit . getPluginJAR ( plugin ) ; <END_BUG> if ( jar != null ) jar . closeZipFile ( ) ; File jarFile = new File ( plugin ) ; File srcFile = new File ( plugin . substring ( 0 , ( ( plugin . length ( ) ) - 4 ) ) ) ; boolean ok = true ; Log . log ( NOTICE , this , ( ( "Deleting<seq2seq4repair_space>" + jarFile ) + "<seq2seq4repair_space>recursively" ) ) ; ok &= jarFile . delete ( ) ; if ( srcFile . exists ( ) ) ok &= deleteRecursively ( srcFile ) ; String [ ] args = new String [ ] { plugin } ; if ( ! ok ) GUIUtilities . error ( progress , "plugin-manager.remove-failed" , args ) ; return ok ; } public boolean equals ( Object o ) { } private String plugin ; private boolean deleteRecursively ( File file ) { } } static class Install implements Roster . Operation { int size ; Install ( String url , String installDirectory , int size ) { } public int getMaximum ( ) { } public boolean perform ( final PluginManagerProgress progress ) { try { String fileName = MiscUtilities . getFileName ( url ) ; progress . downloading ( fileName ) ; String path = download ( progress , fileName , url ) ; if ( path == null ) { return false ; } progress . installing ( fileName ) ; install ( progress , path , installDirectory ) ; return true ; } catch ( InterruptedIOException iio ) { return false ; } catch ( final IOException io ) { Log . log ( ERROR , this , io ) ; SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { String [ ] args = new String [ ] { io . getMessage ( ) } ; GUIUtilities . error ( null , "ioerror" , args ) ; } } ) ; return false ; } catch ( Exception e ) { Log . log ( ERROR , this , e ) ; return false ; } } public boolean equals ( Object o ) { } private String url ; private String installDirectory ; private String download ( PluginManagerProgress progress , String fileName , String url ) throws Exception { } private boolean install ( PluginManagerProgress progress , String path , String dir ) throws Exception { } private boolean copy ( PluginManagerProgress progress , InputStream in , OutputStream out , boolean canStop , boolean doProgress ) throws Exception { } static File downloadDir ; static String getDownloadDir ( ) { } } }

Fix:
PluginJAR jar = jEdit . getPluginJAR ( plugin ) ;
Buggy code:
public final class HtmlHandler extends AbstractMarkupFilter { private static final Logger log = LoggerFactory . getLogger ( HtmlHandler . class ) ; private final ArrayListStack < ComponentTag > stack = new ArrayListStack < ComponentTag > ( ) ; private static final Map < String , Boolean > doesNotRequireCloseTag = new HashMap < String , Boolean > ( ) ; public HtmlHandler ( ) { } public MarkupElement nextTag ( ) throws ParseException { } public static boolean requiresCloseTag ( final String name ) { <START_BUG> return ( HtmlHandler . doesNotRequireCloseTag . get ( name ) ) == null ; <END_BUG> } }

Fix:
return ( HtmlHandler . doesNotRequireCloseTag . get ( name . toLowerCase ( ) ) ) == null ;
Buggy code:
public abstract class PermissionsCommand implements CommandListener { protected static final Logger logger = Logger . getLogger ( "Minecraft" ) ; protected void informGroup ( Plugin plugin , PermissionGroup group , String message ) { } protected void informPlayer ( Plugin plugin , String playerName , String message ) { } protected String autoCompletePlayerName ( String playerName ) { } protected void printEntityInheritance ( CommandSender sender , PermissionGroup [ ] groups ) { } protected String autoCompletePlayerName ( String playerName , String argName ) { } protected String getSenderName ( CommandSender sender ) { } protected String autoCompleteGroupName ( String groupName ) { } protected String autoCompleteGroupName ( String groupName , String argName ) { } protected String autoCompleteWorldName ( String worldName ) { } protected String autoCompleteWorldName ( String worldName , String argName ) { } protected String getSafeWorldName ( String worldName , String userName ) { } protected String autoCompletePermission ( PermissionEntity entity , String permission , String worldName ) { } protected String autoCompletePermission ( PermissionEntity entity , String permission , String worldName , String argName ) { } protected int getPosition ( String permission , String [ ] permissions ) { } protected String printHierarchy ( PermissionGroup parent , String worldName , int level ) { } protected String mapPermissions ( String worldName , PermissionEntity entity , int level ) { } protected List < String > getPermissionsTree ( PermissionEntity entity , String world , int level ) { } protected List < String > sprintPermissions ( String world , String [ ] permissions ) { List < String > permissionList = new LinkedList < String > ( ) ; if ( permissions == null ) { return permissionList ; } for ( String permission : permissions ) { <START_BUG> permissionList . add ( ( ( permission + "<seq2seq4repair_space>@" ) + world ) ) ; <END_BUG> } return permissionList ; } protected Object parseValue ( String value ) { } protected void sendMessage ( CommandSender sender , String message ) { } No newline ; at end ; of file ; }

Fix:
permissionList . add ( ( permission + ( world != null ? "<seq2seq4repair_space>@" + world : "" ) ) ) ;
Buggy code:
public class CompoundVariable implements Function { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private String rawParameters ; private static final FunctionParser functionParser = new FunctionParser ( ) ; private static final Map < String , Class < ? extends Function > > functions = new HashMap < String , Class < ? extends Function > > ( ) ; private boolean hasFunction ; private boolean isDynamic ; private String permanentResults = "" ; private LinkedList < Object > compiledComponents = new LinkedList < Object > ( ) ; public CompoundVariable ( ) { } public CompoundVariable ( String parameters ) { } public String execute ( ) { } public String getRawParameters ( ) { } public String execute ( SampleResult previousResult , Sampler currentSampler ) { if ( ( ( compiledComponents ) == null ) || ( ( compiledComponents . size ( ) ) == 0 ) ) { return "" ; } boolean testDynamic = false ; <START_BUG> StringBuffer results = new StringBuffer ( ) ; <END_BUG> Iterator < Object > iter = compiledComponents . iterator ( ) ; while ( iter . hasNext ( ) ) { Object item = iter . next ( ) ; if ( item instanceof Function ) { testDynamic = true ; try { results . append ( ( ( Function ) ( item ) ) . execute ( previousResult , currentSampler ) ) ; } catch ( InvalidVariableException e ) { } } else if ( item instanceof SimpleVariable ) { testDynamic = true ; results . append ( ( ( SimpleVariable ) ( item ) ) . toString ( ) ) ; } else { results . append ( item ) ; } } if ( ! testDynamic ) { isDynamic = false ; permanentResults = results . toString ( ) ; } return results . toString ( ) ; } public CompoundVariable getFunction ( ) { } public List < String > getArgumentDesc ( ) { } public void clear ( ) { } public void setParameters ( String parameters ) throws InvalidVariableException { } static Object getNamedFunction ( String functionName ) throws InvalidVariableException { } public boolean hasFunction ( ) { } public String getReferenceKey ( ) { } public void setParameters ( Collection < CompoundVariable > parameters ) throws InvalidVariableException { } }

Fix:
StringBuilder results = new StringBuilder ( ) ;
Buggy code:
public class SearchTest extends AbstractSolrTest { @ Test public void testNumResults ( ) throws Exception { } @ Test public void testBasicSearch ( ) throws Exception { String data = runSearch ( "warsaw" ) ; System . out . println ( JsonPath . read ( data , "$.grouped.itemId.matches" ) ) ; <START_BUG> with ( data ) . assertThat ( "$.grouped.itemId.matches" , equalTo ( 132 ) ) ; <END_BUG> } @ Test public void testSpellcheck ( ) throws Exception { } @ Test public void testSpellcheck2 ( ) throws Exception { } @ Test public void testFindingExactMatchAltNameInStopwords ( ) throws Exception { } @ Test public void testExactIdMatch ( ) throws Exception { } @ Test public void testCaseInsensitiveLocalIdentifierMatch ( ) throws Exception { } @ Test public void testSearchForHansFrank ( ) throws Exception { } }

Fix:
with ( data ) . assertThat ( "$.grouped.itemId.matches" , equalTo ( 139 ) ) ;
Buggy code:
public class MoodEntryActivity extends BaseActivity { private float DEVICE_DENSITY = 0 ; private int DEVICE_WIDTH = 0 ; private float tapX = 0 ; private float tapY = 0 ; private float tap_X = 0 ; private float tap_Y = 0 ; float firstMoodX = 0 ; float firstMoodY = 0 ; float secondMoodX = 0 ; float secondMoodY = 0 ; float scale ; Mood moodFirst = new Mood ( ) ; Mood moodSecond = new Mood ( ) ; MoodEntry cv ; private Button btnTrends ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void getDeviceWidth ( ) { } private void initUi ( ) { } OnTouchListener cvOncliClickListener = new View . OnTouchListener ( ) { @ Override public boolean onTouch ( View v , MotionEvent event ) { } } ; void setFirstMood ( Mood mood ) { } public void acceptResults ( ) { <START_BUG> if ( ( ! ( moodFirst . isSelected ) ) || ( ! ( moodFirst . isCreated ) ) ) { <END_BUG> showToast ( "Please<seq2seq4repair_space>select<seq2seq4repair_space>a<seq2seq4repair_space>mood<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>map<seq2seq4repair_space>above<seq2seq4repair_space>first." ) ; return ; } LatLng l = getCurrentLocation ( ) ; moodFirst . latitude = ( ( float ) ( l . latitude ) ) ; moodFirst . longitude = ( ( float ) ( l . longitude ) ) ; mFirebaseWrapper . uploadMood ( moodFirst ) ; showToast ( "Your<seq2seq4repair_space>mood<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>recorded" ) ; finish ( ) ; } public void rejectResults ( ) { } }

Fix:
if ( ! ( moodFirst . isSelected ) ) {
Buggy code:
public class DeleteResourceElementsOperation extends MultiOperation { protected DeleteResourceElementsOperation ( IJavaElement [ ] elementsToProcess , boolean force ) { } private void deletePackageFragment ( IPackageFragment frag ) throws JavaModelException { IResource res = frag . getCorrespondingResource ( ) ; if ( ( res != null ) && ( ( res . getType ( ) ) == ( IResource . FOLDER ) ) ) { IJavaElement [ ] childrenOfInterest = frag . getChildren ( ) ; if ( ( childrenOfInterest . length ) > 0 ) { IResource [ ] resources = new IResource [ childrenOfInterest . length ] ; for ( int i = 0 ; i < ( childrenOfInterest . length ) ; i ++ ) { resources [ i ] = childrenOfInterest [ i ] . getCorrespondingResource ( ) ; } deleteResources ( resources , fForce ) ; } Object [ ] nonJavaResources = frag . getNonJavaResources ( ) ; int actualResourceCount = 0 ; for ( int i = 0 , max = nonJavaResources . length ; i < max ; i ++ ) { if ( ( nonJavaResources [ i ] ) instanceof IResource ) actualResourceCount ++ ; } IResource [ ] actualNonJavaResources = new IResource [ actualResourceCount ] ; for ( int i = 0 , max = nonJavaResources . length , index = 0 ; i < max ; i ++ ) { if ( ( nonJavaResources [ i ] ) instanceof IResource ) actualNonJavaResources [ ( index ++ ) ] = ( ( IResource ) ( nonJavaResources [ i ] ) ) ; } deleteResources ( actualNonJavaResources , fForce ) ; IResource [ ] remainingFiles ; try { remainingFiles = ( ( IFolder ) ( res ) ) . members ( ) ; } catch ( CoreException ce ) { throw new JavaModelException ( ce ) ; } boolean isEmpty = true ; for ( int i = 0 , length = remainingFiles . length ; i < length ; i ++ ) { IResource file = remainingFiles [ i ] ; if ( file instanceof IFile ) { this . deleteResource ( file , ( ( IResource . FORCE ) | ( IResource . KEEP_HISTORY ) ) ) ; } else { isEmpty = false ; } } if ( isEmpty ) { <START_BUG> deleteEmptyPackageFragment ( frag , false ) ; <END_BUG> } } } protected String getMainTaskName ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void verify ( IJavaElement element ) throws JavaModelException { } }

Fix:
deleteEmptyPackageFragment ( frag , false , frag . getParent ( ) . getResource ( ) ) ;
Buggy code:
public class BaseHREFScannerTest extends ParserTestCase { private BaseHrefScanner scanner ; public BaseHREFScannerTest ( String arg0 ) { } protected void setUp ( ) { } public void testRemoveLastSlash ( ) { } public void testEvaluate ( ) { } public void testScan ( ) throws ParserException { createParser ( "<html><head><TITLE>test<seq2seq4repair_space>page<//TITLE><BASE<seq2seq4repair_space>HREF=\"http:////www.abc.com//\"><a<seq2seq4repair_space>href=\"home.cfm\">Home<//a>...<//html>" , "http:////www.google.com//test//index.html" ) ; LinkScanner linkScanner = new LinkScanner ( "-l" ) ; parser . addScanner ( linkScanner ) ; parser . addScanner ( new TitleScanner ( "-t" ) ) ; parser . addScanner ( linkScanner . createBaseHREFScanner ( "-b" ) ) ; parseAndAssertNodeCount ( 7 ) ; assertTrue ( ( ( node [ 3 ] ) instanceof BaseHrefTag ) ) ; BaseHrefTag baseRefTag = ( ( BaseHrefTag ) ( node [ 3 ] ) ) ; <START_BUG> assertEquals ( "Base<seq2seq4repair_space>HREF<seq2seq4repair_space>Url" , "http:////www.abc.com" , baseRefTag . getBaseUrl ( ) ) ; <END_BUG> } }

Fix:
assertEquals ( "Base<seq2seq4repair_space>HREF<seq2seq4repair_space>Url" , "http:////www.abc.com//" , baseRefTag . getBaseUrl ( ) ) ;
Buggy code:
public class ChatClient { public static Boolean IsTest = true ; public static List < String > TEST = new ArrayList < String > ( ) ; public static List < Video > videos = new ArrayList < Video > ( ) ; public static List < Planning > planning = new ArrayList < Planning > ( ) ; public static List < Evenement > evenements = new ArrayList < Evenement > ( ) ; public static List < String > datavi = new ArrayList < String > ( ) ; public static List < String > datapl = new ArrayList < String > ( ) ; public static List < String > dataev = new ArrayList < String > ( ) ; public static JFrame frame ; public static void main ( String [ ] args ) { } public static void setJFrames ( ) { } static class ChatAccess extends Observable { private static final String CRLF = "\r\n" ; private Socket socket ; private OutputStream outputStream ; private PrintWriter out = null ; public ChatAccess ( String server , int port ) throws IOException { } @ Override public void notifyObservers ( Object arg ) { } public void send ( String text ) { } public void close ( ) { } } static class ChatFrame extends JFrame implements Observer { private JTextArea textArea ; private JTextField inputTextField ; private JButton sendButton ; private ChatClient . ChatAccess chatAccess ; public ChatFrame ( ChatClient . ChatAccess chatAccess ) { } private void buildGUI ( ) { textArea = new JTextArea ( 20 , 50 ) ; textArea . setEditable ( false ) ; textArea . setLineWrap ( true ) ; add ( new JScrollPane ( textArea ) , BorderLayout . CENTER ) ; Box box = Box . createHorizontalBox ( ) ; add ( box , BorderLayout . SOUTH ) ; inputTextField = new JTextField ( ) ; <START_BUG> sendButton = new JButton ( "EnvoyÃ©" ) ; <END_BUG> box . add ( inputTextField ) ; box . add ( sendButton ) ; ActionListener sendListener = new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { String str = inputTextField . getText ( ) ; if ( ( str != null ) && ( ( str . trim ( ) . length ( ) ) > 0 ) ) chatAccess . send ( str ) ; inputTextField . selectAll ( ) ; inputTextField . requestFocus ( ) ; inputTextField . setText ( "" ) ; } } ; inputTextField . addActionListener ( sendListener ) ; sendButton . addActionListener ( sendListener ) ; this . addWindowListener ( new WindowAdapter ( ) { @ Override public void windowClosing ( WindowEvent e ) { chatAccess . close ( ) ; } } ) ; } public void update ( Observable o , Object arg ) { } } No newline ; at end ; of file ; }

Fix:
sendButton = new JButton ( "Envoyé" ) ;
Buggy code:
@ Singleton public class ContextPDAProvider implements IContextPDAProvider { protected class ExpandRuleCalls implements Function < ISerState , Pda < ISerState , RuleCall > > { @ Override public Pda < ISerState , RuleCall > apply ( ISerState input ) { <START_BUG> if ( GrammarUtil . isUnassignedParserRuleCall ( input . getGrammarElement ( ) ) ) <END_BUG> return getContextPDA ( ( ( RuleCall ) ( input . getGrammarElement ( ) ) ) . getRule ( ) ) ; return null ; } } protected static class SerializerActionCfg extends CfgAdapter { protected Action context ; public SerializerActionCfg ( Action context ) { } @ Override public AbstractElement getCall ( AbstractElement ele ) { } @ Override public AbstractElement getRoot ( ) { } } protected static class SerializerActionFollowerFunction extends FollowerFunctionImpl < AbstractElement , AbstractElement > { protected Action actionCtx ; public SerializerActionFollowerFunction ( Production < AbstractElement , AbstractElement > production , Action context ) { } @ Override public Iterable < AbstractElement > getFollowers ( AbstractElement element ) { } @ Override public Iterable < AbstractElement > getStarts ( AbstractElement root ) { } } protected static class SerializerParserRuleCfg extends CfgAdapter { protected ParserRule context ; public SerializerParserRuleCfg ( ParserRule context ) { } @ Override public AbstractElement getCall ( AbstractElement ele ) { } @ Override public AbstractElement getRoot ( ) { } } protected static class SerializerParserRuleFollowerFunction extends FollowerFunctionImpl < AbstractElement , AbstractElement > { protected ParserRule ruleCtx ; public SerializerParserRuleFollowerFunction ( Production < AbstractElement , AbstractElement > production , ParserRule context ) { } @ Override public Iterable < AbstractElement > getFollowers ( AbstractElement element ) { } @ Override public Iterable < AbstractElement > getStarts ( AbstractElement root ) { } } protected Map < EObject , Pda < ISerState , RuleCall > > cache = Maps . newHashMap ( ) ; @ Inject protected PdaUtil pdaUtil ; protected Pda < ISerState , RuleCall > createPDA ( Action action ) { } protected Pda < ISerState , RuleCall > createPDA ( EObject context , Pda < ISerState , RuleCall > result ) { } protected Pda < ISerState , RuleCall > createPDA ( ParserRule rule ) { } @ Override public Pda < ISerState , RuleCall > getContextPDA ( EObject context ) { } }

Fix:
if ( GrammarUtil . isUnassignedEObjectRuleCall ( input . getGrammarElement ( ) ) )
Buggy code:
public class WicketLinkTagHandler extends AbstractMarkupFilter { public static final String AUTOLINK_ID = ( Component . AUTO_COMPONENT_PREFIX ) + "_autolink_" ; private ArrayListStack < Boolean > autolinkStatus ; private boolean autolinking = true ; public WicketLinkTagHandler ( final IMarkupFilter parent ) { } public void setAutomaticLinking ( final boolean enable ) { } public final MarkupElement nextTag ( ) throws ParseException { final ComponentTag tag = nextComponentTag ( ) ; if ( tag == null ) { return tag ; } if ( ( ( autolinking ) == true ) && ( ( analyzeAutolinkCondition ( tag ) ) == true ) ) { tag . enableAutolink ( true ) ; tag . setId ( WicketLinkTagHandler . AUTOLINK_ID ) ; return tag ; } if ( tag . isLinkTag ( ) ) { if ( ( tag . isOpen ( ) ) || ( tag . isOpenClose ( ) ) ) { if ( tag . isOpen ( ) ) { if ( ( autolinkStatus ) == null ) { autolinkStatus = new ArrayListStack < Boolean > ( ) ; } autolinkStatus . push ( new Boolean ( autolinking ) ) ; } final String autolink = tag . getAttributes ( ) . getString ( "autolink" ) ; try { autolinking = ( Strings . isEmpty ( autolink ) ) || ( Strings . isTrue ( autolink ) ) ; <START_BUG> } catch ( StringValueConversionException e ) { <END_BUG> throw new WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>autolink<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>\"" + autolink ) + "\"" ) ) ; } } else if ( tag . isClose ( ) ) { autolinking = autolinkStatus . pop ( ) . booleanValue ( ) ; } } return tag ; } protected boolean analyzeAutolinkCondition ( final ComponentTag tag ) { } }

Fix:
} catch ( final StringValueConversionException e ) {
Buggy code:
public class Java extends Exec { private String classname = null ; private String args = null ; private String jvmargs = null ; private Path classpath = null ; private boolean fork = false ; public void execute ( ) throws BuildException { } public int executeJava ( ) throws BuildException { } public void setClasspath ( Path s ) { if ( ( this . classpath ) == null ) { this . classpath = s ; } else { <START_BUG> this . classpath . setPath ( s . toString ( ) ) ; <END_BUG> } } public Path createClasspath ( ) { } public void setClass ( String s ) { } public void setClassname ( String s ) { } public void setArgs ( String s ) { } public void setFork ( String s ) { } public void setJvmargs ( String s ) { } protected void run ( String classname , Vector args ) throws BuildException { } protected Vector tokenize ( String args ) { } protected String [ ] array ( Vector v ) { } }

Fix:
this . classpath . append ( s ) ;
Buggy code:
public class FromContainsSearchProvider extends AbstractMailSearchProvider implements ISearchProvider { public FromContainsSearchProvider ( ) { } public String getName ( ) { <START_BUG> return "From_Contains" ; <END_BUG> } public String getNamespace ( ) { } public ISearchCriteria getCriteria ( String searchTerm ) { } @ Override protected FilterCriteria createFilterCriteria ( String searchTerm ) { } }

Fix:
return "from_contains" ;
Buggy code:
final class CollectionToObjectConverter implements ConditionalGenericConverter { private final ConversionService conversionService ; public CollectionToObjectConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public boolean matches ( TypeDescriptor sourceType , TypeDescriptor targetType ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( source == null ) { return null ; } Collection < ? > sourceCollection = ( ( Collection < ? > ) ( source ) ) ; if ( ( sourceCollection . size ( ) ) == 0 ) { return null ; } Object firstElement = sourceCollection . iterator ( ) . next ( ) ; <START_BUG> return this . conversionService . convert ( firstElement , sourceType . getElementTypeDescriptor ( ) , targetType ) ; <END_BUG> } }

Fix:
return this . conversionService . convert ( firstElement , sourceType . getElementTypeDescriptor ( ) . applyIndexedObject ( firstElement ) , targetType ) ;
Buggy code:
public class HostScopedRolesTestCase extends AbstractCoreModelTest { private static final String FOO = "foo" ; private static final String MONITOR = "Monitor" ; private static final String OPERATOR = "Operator" ; private static final String SOME_HOST = "some-host" ; private static final String ANOTHER_HOST = "another-host" ; private KernelServices kernelServices ; @ Before public void setUp ( ) throws Exception { new org . jboss . as . controller . access . management . SensitiveTargetAccessConstraintDefinition ( new SensitivityClassification ( "play" , "security-realm" , true , true , true ) ) ; new org . jboss . as . controller . access . management . ApplicationTypeAccessConstraintDefinition ( new ApplicationTypeConfig ( "play" , "deployment" , false ) ) ; kernelServices = createKernelServicesBuilder ( DOMAIN ) . setXmlResource ( "domain-all.xml" ) . validateDescription ( ) . setModelInitializer ( new ModelInitializer ( ) { @ Override public void populateModel ( Resource rootResource ) { Resource management = Factory . create ( ) ; rootResource . registerChild ( PathElement . pathElement ( CORE_SERVICE , MANAGEMENT ) , management ) ; <START_BUG> management . registerChild ( PathElement . pathElement ( ACCESS , AUTHORIZATION ) , RESOURCE ) ; <END_BUG> } } , null ) . build ( ) ; } @ Test public void testReadHostScopedRole ( ) { } @ Test public void testAddHostScopedRoleWithHosts ( ) { } @ Test public void testAddHostScopedRoleWithoutHosts ( ) { } @ Test public void testModifyBaseRoleOfHostScopedRole ( ) { } @ Test public void testModifyHostsOfHostScopedRole ( ) { } @ Test public void testRemoveHostsOfHostScopedRole ( ) { } @ Test public void testRemoveHostScopedRole ( ) { } private ModelNode execute ( ModelNode operation ) { } }

Fix:
management . registerChild ( PathElement . pathElement ( ACCESS , AUTHORIZATION ) , AccessAuthorizationResourceDefinition . createResource ( null ) ) ;
Buggy code:
public class TestRemoveDuplicatesTokenFilter extends BaseTokenStreamTestCase { public static Token tok ( int pos , String t , int start , int end ) { } public static Token tok ( int pos , String t ) { } public void testDups ( final String expected , final Token ... tokens ) throws Exception { } public void testNoDups ( ) throws Exception { } public void testSimpleDups ( ) throws Exception { } public void testComplexDups ( ) throws Exception { } private String randomNonEmptyString ( ) { } private void add ( SynonymMap . Builder b , String input , String output , boolean keepOrig ) { } public void testRandomStrings ( ) throws Exception { final int numIters = atLeast ( 10 ) ; for ( int i = 0 ; i < numIters ; i ++ ) { SynonymMap . Builder b = new SynonymMap . Builder ( random ( ) . nextBoolean ( ) ) ; final int numEntries = atLeast ( 10 ) ; for ( int j = 0 ; j < numEntries ; j ++ ) { add ( b , randomNonEmptyString ( ) , randomNonEmptyString ( ) , random ( ) . nextBoolean ( ) ) ; } final SynonymMap map = b . build ( ) ; final boolean ignoreCase = random ( ) . nextBoolean ( ) ; final Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . SIMPLE , true ) ; TokenStream stream = new org . apache . lucene . analysis . synonym . SynonymFilter ( tokenizer , map , ignoreCase ) ; return new TokenStreamComponents ( tokenizer , new RemoveDuplicatesTokenFilter ( stream ) ) ; } } ; <START_BUG> checkRandomData ( random ( ) , analyzer , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } } public void testEmptyTerm ( ) throws IOException { } }

Fix:
checkRandomData ( random ( ) , analyzer , 200 ) ;
Buggy code:
public abstract class ARDataSource { private static final Map < Long , Poi > POI_LIST = new ConcurrentHashMap < Long , Poi > ( ) ; private static final List < Poi > CACHE = new CopyOnWriteArrayList < Poi > ( ) ; private static final AtomicBoolean COMPUTING = new AtomicBoolean ( false ) ; private static final float [ ] LOCATION_ARRAY = new float [ 3 ] ; private static final DecimalFormat FORMAT = new DecimalFormat ( "#.##" ) ; public static final Location HARD_FIX = new Location ( "ATL" ) ; public static final int MAX_RADIUS = 50 ; private static final String LOG_TAG = "ARDataSource" ; private static final Object RADIUS_LOCK = new Object ( ) ; private static final Object AZIMUTH_LOCK = new Object ( ) ; private static String sZoomLevel = new String ( ) ; private static Location sCurrentLocation = ARDataSource . HARD_FIX ; private static Matrix sRotationMatrix = new Matrix ( ) ; private static float sAzimuth = 0 ; private static float sRadius ; public static float PixelsDensity ; public static Poi SelectedPoi = null ; public static HashMap < String , Bitmap > sPoiIcons = new HashMap < > ( ) ; private static boolean mOpenFilter = false ; public static float getRadius ( ) { } public static void setCurrentLocation ( Location currentLocation ) { } public static Location getCurrentLocation ( ) { } public static void setRotationMatrix ( Matrix rotationMatrix ) { } public static Matrix getRotationMatrix ( ) { } public static void setFilterByHours ( boolean poisFilteredByHours ) { } private static void filterByOpenHours ( ) { } public static void setFilterByProvider ( int providerID ) { } private static void removeProvider ( int providerId ) { } public static List < Poi > getPois ( ) { } public static boolean hasSelectededPoi ( ) { } public static void setAzimuth ( float azimuth ) { } public static float getAzimuth ( ) { } private static final Comparator < Poi > distanceComparator = new Comparator < Poi > ( ) { public int compare ( Poi m1 , Poi m2 ) { } } ; public static void addPoisFromCursor ( Cursor c ) { } private static void addPoisFromValues ( Collection < ContentValues > poiList ) { } private static void onLocationChanged ( Location location ) { } public static void updateRadarDistance ( float newMaxDistance ) { <START_BUG> if ( newMaxDistance <= 0 ) { <END_BUG> return ; } synchronized ( ARDataSource . RADIUS_LOCK ) { ARDataSource . sRadius = newMaxDistance ; } synchronized ( ARDataSource . sZoomLevel ) { ARDataSource . sZoomLevel = ARDataSource . FORMAT . format ( newMaxDistance ) ; } } public static Poi getPoi ( long idPoi ) { } public static Poi getPoiByName ( String poiName ) { } }

Fix:
if ( newMaxDistance < 0 ) {
Buggy code:
public class LocalDomainControllerClient implements DomainControllerClient { private static final String ID = "LOCAL" ; private final ServerManager serverManager ; public LocalDomainControllerClient ( final ServerManager serverManager ) { } public String getId ( ) { } public void updateDomainModel ( final DomainModel domain ) { } public List < ModelUpdateResponse < ? > > updateHostModel ( List < AbstractHostModelUpdate < ? > > updates ) { } public List < ModelUpdateResponse < List < ServerIdentity > > > updateDomainModel ( List < AbstractDomainModelUpdate < ? > > updates ) { } public List < ModelUpdateResponse < ? > > updateServerModel ( final List < AbstractServerModelUpdate < ? > > updates , final String serverName ) { } private ModelUpdateResponse < List < ServerIdentity > > executeUpdate ( AbstractDomainModelUpdate < ? > domainUpdate ) { } private < R > ModelUpdateResponse < R > executeUpdate ( AbstractHostModelUpdate < R > hostUpdate ) { } private < R > ModelUpdateResponse < R > executeUpdate ( final AbstractServerModelUpdate < R > update , final String serverName ) { <START_BUG> Server server = serverManager . getServer ( serverName ) ; <END_BUG> if ( server == null ) { return new ModelUpdateResponse < R > ( new UpdateFailedException ( ( "unknown<seq2seq4repair_space>server<seq2seq4repair_space>" + serverName ) ) ) ; } else { try { R result = server . applyUpdate ( update ) ; return new ModelUpdateResponse < R > ( result ) ; } catch ( UpdateFailedException e ) { return new ModelUpdateResponse < R > ( e ) ; } } } public boolean isActive ( ) { } }

Fix:
ManagedServer server = serverManager . getServer ( serverName ) ;