nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AbstractMgmtTestBase { protected static final int MGMT_PORT = 9999 ; protected static final String tempDir = System . getProperty ( "java.io.tmpdir" ) ; private static ModelControllerClient modelControllerClient ; private static File brokenWar = null ; protected static void initModelControllerClient ( final String hostName , final int port ) { } protected static void closeModelControllerClient ( ) throws IOException { } protected ModelNode executeOperation ( final ModelNode op , boolean unwrapResult ) throws IOException { } protected ModelNode executeOperation ( final ModelNode op ) throws IOException { } protected ModelNode executeOperation ( final String address , final String operation ) throws IOException { } protected ModelNode executeAndRollbackOperation ( final ModelNode op ) throws IOException , OperationFormatException { ModelNode addDeploymentOp = AbstractMgmtTestBase . createOpNode ( "deployment=malformedDeployment.war" , "add" ) ; addDeploymentOp . get ( "content" ) . get ( 0 ) . get ( "input-stream-index" ) . set ( 0 ) ; ModelNode deploymentOp = new ModelNode ( ) ; DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder ( ) ; builder . setOperationName ( "deploy" ) ; builder . addNode ( "deployment" , "malformedDeployment.war" ) ; ModelNode [ ] steps = new ModelNode [ 3 ] ; steps [ 0 ] = op ; steps [ 1 ] = addDeploymentOp ; steps [ 2 ] = builder . buildRequest ( ) ; ModelNode compositeOp = AbstractMgmtTestBase . createCompositeNode ( steps ) ; <START_BUG> OperationBuilder ob = new OperationBuilder ( compositeOp ) ; <END_BUG> ob . addInputStream ( new FileInputStream ( AbstractMgmtTestBase . getBrokenWar ( ) ) ) ; return AbstractMgmtTestBase . modelControllerClient . execute ( ob . build ( ) ) ; } public static ModelNode createCompositeNode ( ModelNode [ ] steps ) { } public static ModelNode createOpNode ( String address , String operation ) { } public boolean testRequestFail ( String url ) { } protected final String getBaseURL ( URL url ) throws MalformedURLException { } private static File getBrokenWar ( ) { } }

Fix:
OperationBuilder ob = new OperationBuilder ( compositeOp , true ) ;
Buggy code:
class EqualExpression extends CompareEqualExpression { public EqualExpression ( Val val1 , Val val2 ) { } public void appendTo ( Select sel , ExpContext ctx , BinaryOpExpState bstate , SQLBuffer buf , boolean val1Null , boolean val2Null ) { if ( val1Null && val2Null ) <START_BUG> buf . appendValue ( null ) . append ( "<seq2seq4repair_space>IS<seq2seq4repair_space>" ) . appendValue ( null ) ; <END_BUG> else if ( val1Null || val2Null ) { Val val = ( val1Null ) ? getValue2 ( ) : getValue1 ( ) ; ExpState state = ( val1Null ) ? bstate . state2 : bstate . state1 ; if ( ! ( isDirectComparison ( ) ) ) { int len = val . length ( sel , ctx , state ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( i > 0 ) buf . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) ; val . appendTo ( sel , ctx , state , buf , i ) ; buf . append ( "<seq2seq4repair_space>IS<seq2seq4repair_space>" ) . appendValue ( null ) ; } } else val . appendIsNull ( sel , ctx , state , buf ) ; } else { Val val1 = getValue1 ( ) ; Val val2 = getValue2 ( ) ; if ( ( ( val1 . length ( sel , ctx , bstate . state1 ) ) == 1 ) && ( ( val2 . length ( sel , ctx , bstate . state2 ) ) == 1 ) ) { ctx . store . getDBDictionary ( ) . comparison ( buf , "=" , new FilterValueImpl ( sel , ctx , bstate . state1 , val1 ) , new FilterValueImpl ( sel , ctx , bstate . state2 , val2 ) ) ; } else { int len = Math . max ( val1 . length ( sel , ctx , bstate . state1 ) , val2 . length ( sel , ctx , bstate . state2 ) ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( i > 0 ) buf . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) ; val1 . appendTo ( sel , ctx , bstate . state1 , buf , i ) ; buf . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; val2 . appendTo ( sel , ctx , bstate . state2 , buf , i ) ; } } } } }

Fix:
buf . append ( "1<seq2seq4repair_space>=<seq2seq4repair_space>1" ) ;
Buggy code:
public class SynapseHelper { public static final Map < String , ColumnType > BRIDGE_TYPE_TO_SYNAPSE_TYPE = ImmutableMap . < String , ColumnType > builder ( ) . put ( "attachment_blob" , FILEHANDLEID ) . put ( "attachment_csv" , FILEHANDLEID ) . put ( "attachment_json_blob" , FILEHANDLEID ) . put ( "attachment_json_table" , FILEHANDLEID ) . put ( "boolean" , BOOLEAN ) . put ( "calendar_date" , STRING ) . put ( "float" , DOUBLE ) . put ( "inline_json_blob" , STRING ) . put ( "int" , INTEGER ) . put ( "string" , STRING ) . put ( "timestamp" , DATE ) . build ( ) ; public static final Map < String , Integer > BRIDGE_TYPE_TO_MAX_LENGTH = ImmutableMap . < String , Integer > builder ( ) . put ( "calendar_date" , 10 ) . put ( "inline_json_blob" , 1000 ) . put ( "string" , 1000 ) . build ( ) ; private BridgeExporterConfig bridgeExporterConfig ; private S3Helper s3Helper ; private SynapseClient synapseClient ; public void setBridgeExporterConfig ( BridgeExporterConfig bridgeExporterConfig ) { } public void setS3Helper ( S3Helper s3Helper ) { } public void setSynapseClient ( SynapseClient synapseClient ) { } public String serializeToSynapseType ( String studyId , String recordId , String fieldName , String bridgeType , JsonNode node ) { } private String uploadFromS3ToSynapseFileHandle ( String studyId , String fieldName , String s3Key ) throws IOException , SynapseException { } @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = SynapseException . class ) public AccessControlList createAclWithRetry ( AccessControlList acl ) throws SynapseException { } @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = SynapseException . class ) public List < ColumnModel > createColumnModelsWithRetry ( List < ColumnModel > columnList ) throws SynapseException { } <START_BUG> @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = { AmazonClientException . class , SynapseException . class } ) <END_BUG> public FileHandle createFileHandleWithRetry ( File file , String contentType , String parentId ) throws IOException , SynapseException { return synapseClient . createFileHandle ( file , contentType , parentId ) ; } @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = SynapseException . class ) public TableEntity createTableWithRetry ( TableEntity table ) throws SynapseException { } @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = SynapseException . class ) public String uploadTsvStartWithRetry ( String tableId , String fileHandleId , CsvTableDescriptor tableDescriptor ) throws SynapseException { } @ RetryOnFailure ( attempts = 5 , delay = 100 , unit = TimeUnit . MILLISECONDS , types = SynapseException . class ) public UploadToTableResult getUploadTsvStatus ( String jobToken , String tableId ) throws SynapseException { } }

Fix:
@ RetryOnFailure ( attempts = 5 , delay = 1 , unit = TimeUnit . SECONDS , types = { AmazonClientException . class , SynapseException . class } )
Buggy code:
public class NamingDependencyProcessor implements DeploymentUnitProcessor { private static ModuleIdentifier NAMING_ID = ModuleIdentifier . create ( "org.jboss.as.naming" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; <START_BUG> final ModuleLoader moduleLoader = Module . getSystemModuleLoader ( ) ; <END_BUG> final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; moduleSpecification . addDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( moduleLoader , NamingDependencyProcessor . NAMING_ID , false , false , false ) ) ; } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ;
Buggy code:
public class Combat implements Entity { private boolean turn ; private Random rand ; private Playable player ; private Enemy enemy ; private int clockTick ; public Combat ( Playable players , Enemy enemies ) { } public void update ( ) { } public void resetUpdateCount ( ) { } private void enemyTurn ( ) { } public void enemyAttack ( ) { } public void enemySpell ( String name ) { for ( Spell spell : enemy . getSpellBook ( ) . getSpells ( ) ) { if ( spell . getName ( ) . equals ( name ) ) { if ( ( ( enemy . getValueOfVital ( "Energy" ) ) - ( spell . getEnergyCost ( ) ) ) >= 0 ) { if ( spell . getType ( ) . equals ( "heal" ) ) { System . out . println ( ( ( ( ( ( ( ( enemy . getName ( ) ) + "<seq2seq4repair_space>casted<seq2seq4repair_space>spell<seq2seq4repair_space>" ) + name ) + "<seq2seq4repair_space>that<seq2seq4repair_space>healed:<seq2seq4repair_space>" ) + ( enemy . healVital ( "Health" , spell . getEffect ( ) ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( enemy . getName ( ) ) ) ) ; } else { if ( ( ( player . getValueOfVital ( "Health" ) ) - ( spell . getEffect ( ) ) ) > 0 ) { player . reduceVital ( "Health" , spell . getEffect ( ) ) ; System . out . println ( ( ( ( ( ( ( ( enemy . getName ( ) ) + "<seq2seq4repair_space>casted<seq2seq4repair_space>spell<seq2seq4repair_space>" ) + name ) + "<seq2seq4repair_space>that<seq2seq4repair_space>damaged:<seq2seq4repair_space>" ) + ( spell . getEffect ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( player . getName ( ) ) ) ) ; } else { playerDeath ( ) ; } } enemy . reduceVital ( "Energy" , spell . getEnergyCost ( ) ) ; enemyTurn ( ) ; System . out . println ( ( ( player . getName ( ) ) + "<seq2seq4repair_space>turn!" ) ) ; } else { <START_BUG> System . out . println ( "Not<seq2seq4repair_space>enough<seq2seq4repair_space>Energy!" ) ; <END_BUG> } } else { System . out . println ( "FATAL<seq2seq4repair_space>ERROR!<seq2seq4repair_space>SPELL<seq2seq4repair_space>NOT<seq2seq4repair_space>FOUND" ) ; } } } public void enemyItem ( String itemName ) { } private void playerTurn ( ) { } private void playerAttack ( ) { } private void playerSpell ( String name ) { } private void playerDeath ( ) { } private void enemyDeath ( ) { } private void playerItem ( String itemName ) { } private double retreatChance ( Character character ) { } private void playerRetreat ( ) { } private int nextInt ( ) { } private boolean firstTurn ( ) { } private void enemyNextMove ( ) { } }

Fix:
enemyAttack ( ) ;
Buggy code:
public abstract class AbstractAccount implements Account , Serializable { @ NoDB protected Integer id = null ; protected float balance = 0 ; public float getBalance ( ) { } public void setBalance ( float balance ) { } @ Override public void deposit ( float x ) { } public Integer getId ( ) { } public void setId ( Integer id ) { } @ Override public void withdraw ( float x ) throws NotEnoughFundsException { if ( x > ( balance ) ) { <START_BUG> throw new NotEnoughFundsException ( ) ; <END_BUG> } else { float b = ( balance ) - x ; balance = b ; } } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } }

Fix:
throw new NotEnoughFundsException ( ( x - ( balance ) ) ) ;
Buggy code:
@ Entity @ Table ( name = "competence" ) @ XmlRootElement @ NamedQueries ( { @ NamedQuery ( name = "Competence.findAll" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>Competence<seq2seq4repair_space>c" ) , @ NamedQuery ( name = "Competence.findByCompetenceId" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>Competence<seq2seq4repair_space>c<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.competenceId<seq2seq4repair_space>=<seq2seq4repair_space>:competenceId" ) , @ NamedQuery ( name = "Competence.findByName" , query = "SELECT<seq2seq4repair_space>c<seq2seq4repair_space>FROM<seq2seq4repair_space>Competence<seq2seq4repair_space>c<seq2seq4repair_space>WHERE<seq2seq4repair_space>c.name<seq2seq4repair_space>=<seq2seq4repair_space>:name" ) } ) public class Competence implements Serializable { private static final long serialVersionUID = 1L ; @ Id @ Basic ( optional = false ) @ NotNull @ Column ( name = "competence_id" ) private Long competenceId ; @ Size ( max = 255 ) @ Column ( name = "name" ) private String name ; @ OneToOne ( mappedBy = "competenceId" ) private CompetenceProfile competenceProfile ; public Competence ( ) { } public Competence ( Long competenceId ) { } public Long getCompetenceId ( ) { } public void setCompetenceId ( Long competenceId ) { } public String getName ( ) { } public void setName ( String name ) { } public CompetenceProfile getCompetenceProfile ( ) { } public void setCompetenceProfile ( CompetenceProfile competenceProfile ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public String toString ( ) { <START_BUG> return ( "se.kth.Competence[<seq2seq4repair_space>competenceId=" + ( competenceId ) ) + "<seq2seq4repair_space>]" ; <END_BUG> } }

Fix:
return ( "se.kth.model.Competence[<seq2seq4repair_space>competenceId=" + ( competenceId ) ) + "<seq2seq4repair_space>]" ;
Buggy code:
public class ClusterAssembler { private String clusterIndex ; private ArticleAssembler articleAssembler ; public ClusterAssembler ( String articleIndex , String clusterIndex ) { } public List < Cluster > getAllClusters ( ) throws IOException , ParseException { } private Cluster buildCluster ( Document doc ) throws IOException , ParseException { Cluster cluster = new Cluster ( ) ; cluster . setClusterId ( UUID . fromString ( doc . getField ( "clusterID" ) . stringValue ( ) ) ) ; cluster . setCreated ( parseDate ( doc . getField ( "created" ) . stringValue ( ) ) ) ; <START_BUG> cluster . setLastChange ( parseDate ( doc . getField ( "lastChanged" ) . stringValue ( ) ) ) ; <END_BUG> cluster . setTopArticle ( articleAssembler . getArticle ( doc . getField ( "topArticleID" ) . stringValue ( ) ) ) ; cluster . setArticles ( articleAssembler . getArticles ( doc . getField ( "clusterID" ) . stringValue ( ) , doc . getField ( "topArticleID" ) . stringValue ( ) ) ) ; return cluster ; } private GregorianCalendar parseDate ( String dateString ) throws ParseException { } }

Fix:
cluster . setLastChange ( parseDate ( doc . getField ( "lastChange" ) . stringValue ( ) ) ) ;
Buggy code:
public class Javac extends MatchingTask { private static final int MODERN_COMPILER_SUCCESS = 0 ; private Path src ; private File destDir ; private Path compileClasspath ; private String encoding ; private boolean debug = false ; private boolean optimize = false ; private boolean deprecation = false ; private boolean depend = false ; private boolean verbose = false ; private String target ; private Path bootclasspath ; private Path extdirs ; private static String lSep = System . getProperty ( "line.separator" ) ; protected Vector compileList = new Vector ( ) ; public Path createSrc ( ) { } public void setSrcdir ( Path srcDir ) { } public void setDestdir ( File destDir ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setBootclasspath ( Path bootclasspath ) { } public Path createBootclasspath ( ) { } public void setBootClasspathRef ( Reference r ) { } public void setExtdirs ( Path extdirs ) { } public Path createExtdirs ( ) { } public void setDeprecation ( boolean deprecation ) { } public void setEncoding ( String encoding ) { } public void setDebug ( boolean debug ) { } public void setOptimize ( boolean optimize ) { } public void setDepend ( boolean depend ) { } public void setVerbose ( boolean verbose ) { } public void setTarget ( String target ) { } public void execute ( ) throws BuildException { } protected void resetFileLists ( ) { } protected void scanDir ( File srcDir , File destDir , String [ ] files ) { } private Path getCompileClasspath ( boolean addRuntime ) { } private void doClassicCompile ( ) throws BuildException { } private void doModernCompile ( ) throws BuildException { } private Commandline setupJavacCommand ( ) { } private void logAndAddFilesToCompile ( Commandline cmd ) { } private void doJikesCompile ( ) throws BuildException { } private int executeJikesCompile ( String [ ] args , int firstFileName ) { } private void addExtdirsToClasspath ( Path classpath ) { if ( ( extdirs ) == null ) { String extProp = System . getProperty ( "java.ext.dirs" ) ; if ( extProp != null ) { extdirs = new Path ( project , extProp ) ; } else { return ; } } String [ ] dirs = extdirs . list ( ) ; for ( int i = 0 ; i < ( dirs . length ) ; i ++ ) { if ( ! ( dirs [ i ] . endsWith ( File . separator ) ) ) { dirs [ i ] += File . separator ; } File dir = project . resolveFile ( dirs [ i ] ) ; FileSet fs = new FileSet ( ) ; fs . setDir ( dir ) ; <START_BUG> fs . setIncludes ( ( ( dirs [ i ] ) + "*" ) ) ; <END_BUG> classpath . addFileset ( fs ) ; } } private void doJvcCompile ( ) throws BuildException { } }

Fix:
fs . setIncludes ( "*" ) ;
Buggy code:
public class Base64OutputStream extends FilterOutputStream { private final boolean doEncode ; private final Base64 base64 ; private final byte [ ] singleByte = new byte [ 1 ] ; public Base64OutputStream ( OutputStream out ) { } public Base64OutputStream ( OutputStream out , boolean doEncode ) { } public Base64OutputStream ( OutputStream out , boolean doEncode , int lineLength , byte [ ] lineSeparator ) { } public void write ( int i ) throws IOException { } public void write ( byte [ ] b , int offset , int len ) throws IOException { } private void flush ( boolean propogate ) throws IOException { <START_BUG> int avail = base64 . avail ( ) ; <END_BUG> if ( avail > 0 ) { byte [ ] buf = new byte [ avail ] ; int c = base64 . readResults ( buf , 0 , avail ) ; if ( c > 0 ) { out . write ( buf , 0 , c ) ; } } if ( propogate ) { out . flush ( ) ; } } public void flush ( ) throws IOException { } public void close ( ) throws IOException { } }

Fix:
int avail = base64 . available ( ) ;
Buggy code:
public class ModThermalRecycling extends ModPlugin { public ModThermalRecycling ( ) { } String [ ] whiteList ; @ Override public void init ( Configuration config ) { } @ Override public void apply ( ) { ItemScrapData . setRecipeIgnored ( recyclingScrapBox , true ) ; ItemScrapData . setRecipeIgnored ( debris , true ) ; ItemScrapData . setRecipeIgnored ( scrapBlock , true ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . debris ) , NONE ) ; ItemScrapData . setValue ( new ItemStack ( BlockManager . scrapBlock ) , NONE ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrap , 1 , RecyclingScrap . POOR ) , POOR ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrap , 1 , RecyclingScrap . STANDARD ) , STANDARD ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrap , 1 , RecyclingScrap . SUPERIOR ) , SUPERIOR ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrapBox , 1 , RecyclingScrap . POOR ) , POOR ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrapBox , 1 , RecyclingScrap . STANDARD ) , STANDARD ) ; ItemScrapData . setValue ( new ItemStack ( ItemManager . recyclingScrapBox , 1 , RecyclingScrap . SUPERIOR ) , SUPERIOR ) ; <START_BUG> String modIds = ( ":" + ( String . join ( ":" , whiteList ) ) ) + ":" ; <END_BUG> for ( Object o : CraftingManager . getInstance ( ) . getRecipeList ( ) ) { IRecipe recipe = ( ( IRecipe ) ( o ) ) ; ItemStack stack = recipe . getRecipeOutput ( ) ; if ( stack != null ) { if ( ! ( ItemScrapData . isRecipeIgnored ( stack ) ) ) { String name = itemRegistry . getNameForObject ( stack . getItem ( ) ) ; if ( modIds . contains ( ( ( ":" + ( StringUtils . substringBefore ( name , ":" ) ) ) + ":" ) ) ) { recycler . useRecipe ( stack ) . save ( ) ; } } } } } }

Fix:
String modIds = ( ":" + ( MyUtils . join ( ":" , whiteList ) ) ) + ":" ;
Buggy code:
public class ShoppingPanel extends JPanel { @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void tabbedPaneStateChanged ( ChangeEvent evt ) { } public ShoppingPanel ( ) { } public void setContentPanel ( String cardName ) { switch ( cardName ) { case "cartCard" : <START_BUG> setContentPanel ( "cartCard" ) ; <END_BUG> break ; case "shoppingListCard" : shoppingListTab . add ( button ) ; break ; } ContentCardLayout . show ( ContentPanel , cardName ) ; } public void showContent ( boolean show ) { } public void setCheckoutButtonPerformedListener ( ShowCheckoutContentHandler handler ) { } public boolean isContentVisible ( ) { } private JPanel ContentPanel ; private CartPanel cartPanel ; private JPanel cartTab ; private JLabel cartTabIcon ; private ShoppingListPanel shoppingListPanel ; private JPanel shoppingListTab ; private JLabel shoppingListTabIcon ; private JTabbedPane tabbedPane ; ExpandButton button ; CardLayout ContentCardLayout ; boolean contentVisible = false ; }

Fix:
cartTab . add ( button ) ;
Buggy code:
public class AliyunIpAddress extends AbstractIpAddressSupport < Aliyun > { private static final Logger stdLogger = Aliyun . getStdLogger ( AliyunIpAddress . class ) ; private transient volatile AliyunIpAddressCapabilities capabilities ; public AliyunIpAddress ( @ Nonnull Aliyun provider ) { } public void assign ( @ Nonnull String addressId , @ Nonnull String serverId ) throws CloudException , InternalException { } public void assignToNetworkInterface ( @ Nonnull String addressId , @ Nonnull String nicId ) throws CloudException , InternalException { } public String forward ( @ Nonnull String addressId , int publicPort , @ Nonnull Protocol protocol , int privatePort , @ Nonnull String onServerId ) throws CloudException , InternalException { } public IPAddressCapabilities getCapabilities ( ) throws CloudException , InternalException { } public IpAddress getIpAddress ( @ Nonnull String addressId ) throws CloudException , InternalException { } public boolean isSubscribed ( ) throws CloudException , InternalException { } public Iterable < IpAddress > listIpPool ( @ Nonnull IPVersion version , boolean unassignedOnly ) throws CloudException , InternalException { } public Iterable < ResourceStatus > listIpPoolStatus ( @ Nonnull IPVersion version ) throws CloudException , InternalException { } public void releaseFromPool ( @ Nonnull String addressId ) throws CloudException , InternalException { } public void releaseFromServer ( @ Nonnull String addressId ) throws CloudException , InternalException { } public String request ( @ Nonnull IPVersion version ) throws CloudException , InternalException { if ( ! ( version . equals ( IPV4 ) ) ) { throw new InternalException ( "Aliyun<seq2seq4repair_space>supports<seq2seq4repair_space>IPV4<seq2seq4repair_space>ip<seq2seq4repair_space>address<seq2seq4repair_space>only!" ) ; } Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "RegionId" , getContext ( ) . getRegionId ( ) ) ; <START_BUG> params . put ( "InternetChargeType" , paybytraffic . name ( ) ) ; <END_BUG> params . put ( "Bandwidth" , DefaultIpAddressBandwidth ) ; AliyunMethod method = new AliyunMethod ( getProvider ( ) , Category . ECS , "AllocateEipAddress" , params , true ) ; JSONObject response = method . post ( ) . asJson ( ) ; try { return response . getString ( "AllocationId" ) ; } catch ( JSONException e ) { AliyunIpAddress . stdLogger . error ( "An<seq2seq4repair_space>exception<seq2seq4repair_space>occurs<seq2seq4repair_space>during<seq2seq4repair_space>Allocate<seq2seq4repair_space>EIP<seq2seq4repair_space>Address!" , e ) ; throw new InternalException ( e ) ; } } public String requestForVLAN ( @ Nonnull IPVersion version ) throws CloudException , InternalException { } public String requestForVLAN ( @ Nonnull IPVersion version , @ Nonnull String vlanId ) throws CloudException , InternalException { } public static boolean isPublicIpAddress ( String ipAddress ) throws InternalException { } private IpAddress toIpAddress ( JSONObject response ) throws InternalException { } }

Fix:
params . put ( "InternetChargeType" , PayByTraffic . name ( ) ) ;
Buggy code:
public class RegionBasedHierarchyBuilder extends HierarchyBuilder { public RegionBasedHierarchyBuilder ( TypeHierarchy hierarchy ) throws JavaModelException { } public void build ( boolean computeSubtypes ) { } private void createTypeHierarchyBasedOnRegion ( ArrayList allTypesInRegion , IProgressMonitor monitor ) { } private ArrayList determineTypesInRegion ( IProgressMonitor monitor ) { try { ArrayList types = new ArrayList ( ) ; <START_BUG> IJavaElement [ ] roots = ( ( RegionBasedTypeHierarchy ) ( this . hierarchy ) ) . fRegion . getElements ( ) ; <END_BUG> int length = roots . length ; if ( monitor != null ) monitor . beginTask ( "" , length ) ; for ( int i = 0 ; i < length ; i ++ ) { try { IJavaElement root = roots [ i ] ; switch ( root . getElementType ( ) ) { case IJavaElement . JAVA_PROJECT : injectAllTypesForJavaProject ( ( ( IJavaProject ) ( root ) ) , types ) ; break ; case IJavaElement . PACKAGE_FRAGMENT_ROOT : injectAllTypesForPackageFragmentRoot ( ( ( IPackageFragmentRoot ) ( root ) ) , types ) ; break ; case IJavaElement . PACKAGE_FRAGMENT : injectAllTypesForPackageFragment ( ( ( IPackageFragment ) ( root ) ) , types ) ; break ; case IJavaElement . CLASS_FILE : types . add ( ( ( IClassFile ) ( root ) ) . getType ( ) ) ; break ; case IJavaElement . COMPILATION_UNIT : IType [ ] cuTypes = ( ( ICompilationUnit ) ( root ) ) . getAllTypes ( ) ; for ( int j = 0 ; j < ( cuTypes . length ) ; j ++ ) { types . add ( cuTypes [ j ] ) ; } break ; case IJavaElement . TYPE : types . add ( root ) ; break ; default : break ; } } catch ( JavaModelException e ) { } worked ( monitor , 1 ) ; } return types ; } finally { if ( monitor != null ) monitor . done ( ) ; } } private void injectAllTypesForJavaProject ( IJavaProject project , ArrayList types ) { } private void injectAllTypesForPackageFragment ( IPackageFragment packFrag , ArrayList types ) { } private void injectAllTypesForPackageFragmentRoot ( IPackageFragmentRoot root , ArrayList types ) { } private void injectAllTypesForTypeContainers ( IClassFile [ ] containers , ArrayList types ) { } private void injectAllTypesForTypeContainers ( ICompilationUnit [ ] containers , ArrayList types ) { } }

Fix:
IJavaElement [ ] roots = ( ( RegionBasedTypeHierarchy ) ( this . hierarchy ) ) . region . getElements ( ) ;
Buggy code:
public class WidgetMethodHandler extends AbstractHandler implements IExecutableExtension { protected static final Class [ ] NO_PARAMETERS = new Class [ 0 ] ; protected String methodName ; public Object execute ( final ExecutionEvent event ) throws ExecutionException { } public final boolean isEnabled ( ) { <START_BUG> return ( getMethodToExecute ( ) ) == null ; <END_BUG> } protected Method getMethodToExecute ( ) { } public void setInitializationData ( IConfigurationElement config , String propertyName , Object data ) { } }

Fix:
return ( getMethodToExecute ( ) ) != null ;
Buggy code:
public class Page5 extends WicketExamplePage { private final Random random = new Random ( ) ; public Page5 ( PageParameters parameters ) { } private String join ( List < StringValue > values ) { <START_BUG> StringBuffer sb = new StringBuffer ( ) ; <END_BUG> for ( StringValue sv : values ) { if ( ( sb . length ( ) ) > 0 ) { sb . append ( ",<seq2seq4repair_space>" ) ; } sb . append ( sv . toString ( ) ) ; } return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( ) ;
Buggy code:
public class DiscoveryStartup { protected static final String DISCOVERYVIEW_ID = "org.eclipse.ecf.ui.view.discoveryview" ; public static final String DISCOVERY_CONTAINER = "org.eclipse.ecf.provider.jmdns.container.JmDNS" ; public static final String TCPSERVER_DISCOVERY_TYPE = "_ecftcp._tcp.local." ; public static final String PROP_PROTOCOL_NAME = "protocol" ; public static final String PROP_CONTAINER_TYPE_NAME = "containertype" ; public static final String PROP_CONTAINER_TYPE_VALUE = Client . GENERIC_CONTAINER_CLIENT_NAME ; public static final String PROP_PW_REQ_NAME = "pwrequired" ; public static final String PROP_PW_REQ_VALUE = "false" ; public static final String PROP_DEF_USER_NAME = "defaultuser" ; public static final String PROP_DEF_USER_VALUE = "guest" ; public static final String PROP_PATH_NAME = "path" ; public static final int SVC_DEF_WEIGHT = 0 ; public static final int SVC_DEF_PRIORITY = 0 ; static IDiscoveryContainer discovery = null ; static IContainer socontainer = null ; protected DiscoveryView discoveryView = null ; static String [ ] serviceTypes = new String [ ] { DiscoveryStartup . TCPSERVER_DISCOVERY_TYPE } ; public DiscoveryStartup ( ) throws Exception { } public void dispose ( ) { } protected boolean isActive ( ) { } protected void setupDiscovery ( ) throws Exception { try { DiscoveryStartup . socontainer = ContainerFactory . getDefault ( ) . makeContainer ( DiscoveryStartup . DISCOVERY_CONTAINER ) ; DiscoveryStartup . discovery = ( ( IDiscoveryContainer ) ( DiscoveryStartup . socontainer . getAdapter ( IDiscoveryContainer . class ) ) ) ; if ( ( DiscoveryStartup . discovery ) != null ) { setupDiscoveryContainer ( DiscoveryStartup . discovery ) ; <START_BUG> DiscoveryStartup . socontainer . joinGroup ( null , null ) ; <END_BUG> } else { if ( ( DiscoveryStartup . socontainer ) != null ) { DiscoveryStartup . socontainer . dispose ( ) ; DiscoveryStartup . socontainer = null ; } DiscoveryStartup . discovery = null ; ClientPlugin . log ( "No<seq2seq4repair_space>discovery<seq2seq4repair_space>container<seq2seq4repair_space>available" ) ; } } catch ( ContainerInstantiationException e1 ) { DiscoveryStartup . socontainer = null ; DiscoveryStartup . discovery = null ; ClientPlugin . log ( "No<seq2seq4repair_space>discovery<seq2seq4repair_space>container<seq2seq4repair_space>available" , e1 ) ; return ; } catch ( Exception e ) { if ( ( DiscoveryStartup . socontainer ) != null ) { DiscoveryStartup . socontainer . dispose ( ) ; DiscoveryStartup . socontainer = null ; } DiscoveryStartup . discovery = null ; throw e ; } } protected void connectToServiceFromInfo ( IServiceInfo svcInfo ) { } protected void setupDiscoveryContainer ( final IDiscoveryContainer dc ) { } public static void unregisterServerType ( ) { } public static void registerService ( URI uri ) { } public static void unregisterServer ( ISharedObjectContainer container ) { } public static void registerServiceTypes ( ) { } }

Fix:
DiscoveryStartup . socontainer . connect ( null , null ) ;
Buggy code:
public interface User { String getName ( ) { } void setId ( int ID ) { } int getId ( ) { } void register ( Library lib ) { } <START_BUG> Library getLibrary ( ) ; <END_BUG> }

Fix:
String getLibrary ( ) ;
Buggy code:
public class SpaceShipTest extends UnitTest { @ Override public final Unit createInstance ( final double x , final double y , final String spriteFile ) { } @ Test public final void shootBulletTest ( ) { float x = 1 ; float y = 1 ; SpaceShip spaceship = new SpaceShip ( x , y , "testimage.png" ) ; Bullet bullet = spaceship . shootBullet ( 1 ) ; assertEquals ( spaceship . getXCoor ( ) , bullet . getXCoor ( ) , 0.05 ) ; assertEquals ( spaceship . getYCoor ( ) , bullet . getYCoor ( ) , 0.05 ) ; bullet . moveUnit ( ) ; assertEquals ( spaceship . getXCoor ( ) , bullet . getXCoor ( ) , 0.05 ) ; <START_BUG> assertTrue ( ( ( bullet . getYCoor ( ) ) < ( ( spaceship . getYCoor ( ) ) + 1 ) ) ) ; <END_BUG> } @ Test @ SuppressWarnings ( "checkstyle:magicnumber" ) public final void testEqualsSpaceShip ( ) { } @ Test @ SuppressWarnings ( "checkstyle:magicnumber" ) public final void testEquals2 ( ) { } @ Test @ SuppressWarnings ( "checkstyle:magicnumber" ) public final void testEqualsNull ( ) { } }

Fix:
assertTrue ( ( ( bullet . getYCoor ( ) ) == ( ( spaceship . getYCoor ( ) ) + 1 ) ) ) ;
Buggy code:
public class GlobalResourceLoader { protected static ClassLoader classLoader ; protected static Hashtable htBundles = new Hashtable ( 80 ) ; protected static ResourceBundle globalBundle ; protected static final String FIX_ME = "FIX<seq2seq4repair_space>ME!" ; private static final String GLOBAL_BUNDLE_PATH = "org.columba.core.i18n.global.global" ; public static Locale [ ] getAvailableLocales ( ) { } private static Locale extractLocaleFromFilename ( String name ) { } protected static void initClassLoader ( ) { } protected static String generateBundlePath ( String sPath , String sName ) { } public static String getString ( String sPath , String sName , String sID ) { if ( ( sID == null ) || ( sID . equals ( "" ) ) ) return null ; ResourceBundle bundle = null ; String sBundlePath = null ; if ( ( sPath != null ) && ( ! ( sPath . equals ( "" ) ) ) ) { sBundlePath = GlobalResourceLoader . generateBundlePath ( sPath , sName ) ; bundle = ( ( ResourceBundle ) ( GlobalResourceLoader . htBundles . get ( sBundlePath ) ) ) ; } <START_BUG> if ( bundle == null ) { <END_BUG> try { if ( ( GlobalResourceLoader . classLoader ) == null ) bundle = ResourceBundle . getBundle ( sBundlePath , Locale . getDefault ( ) ) ; else bundle = ResourceBundle . getBundle ( sBundlePath , Locale . getDefault ( ) , GlobalResourceLoader . classLoader ) ; GlobalResourceLoader . htBundles . put ( sBundlePath , bundle ) ; } catch ( MissingResourceException mre ) { } } if ( bundle != null ) { try { return bundle . getString ( sID ) ; } catch ( MissingResourceException mre ) { } } try { return GlobalResourceLoader . globalBundle . getString ( sID ) ; } catch ( MissingResourceException mre ) { if ( MainInterface . DEBUG ) { log . error ( ( ( ( ( "'" + sID ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>'" ) + sBundlePath ) + "'<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>found." ) ) ; } return sID ; } } public static char getMnemonic ( String sPath , String sName , String sID ) { } public static void reload ( ) { } public static class LangPackFileFilter implements FileFilter { public boolean accept ( File file ) { } } }

Fix:
if ( ( bundle == null ) && ( sBundlePath != null ) ) {
Buggy code:
public class BankEvent implements Strategy { @ Override public boolean activate ( ) { } @ Override public void execute ( ) { final Point xMark = new Point ( 488 , 30 ) ; BarrowLibrary . status = "Banking..." ; if ( ! ( BANK_ZONE . inTheZone ( ) ) ) { Keyboard . getInstance ( ) . sendKeys ( "::Home" ) ; Time . sleep ( new SleepCondition ( ) { @ Override public boolean isValid ( ) { return BANK_ZONE . inTheZone ( ) ; } } , 3500 ) ; } if ( BANK_ZONE . inTheZone ( ) ) { BANK_PATH . traverse ( ) ; Time . sleep ( 3000 ) ; } if ( ( SceneObjects . getNearest ( BANK ) ) != null ) { SceneObject bankBooth = SceneObjects . getClosest ( BANK ) ; if ( bankBooth != null ) { if ( ( Players . getMyPlayer ( ) . getAnimation ( ) ) == ( - 1 ) ) { bankBooth . interact ( 0 ) ; Time . sleep ( new SleepCondition ( ) { @ Override public boolean isValid ( ) { return ( Loader . getClient ( ) . getOpenInterfaceId ( ) ) == 5292 ; } } , 1500 ) ; } } } while ( ( ! ( Inventory . isEmpty ( ) ) ) && ( ( Loader . getClient ( ) . getOpenInterfaceId ( ) ) == 5292 ) ) { Mouse . getInstance ( ) . click ( 400 , 300 , true ) ; Time . sleep ( 1000 ) ; } Menu . sendAction ( 632 , ( ( BarrowLibrary . SPADE ) - 1 ) , 1 , 5382 ) ; Time . sleep ( 300 ) ; Menu . sendAction ( 78 , ( ( BarrowLibrary . RENEWAL4 ) - 1 ) , 0 , 5382 ) ; Time . sleep ( 300 ) ; Menu . sendAction ( 53 , ( ( BarrowLibrary . DEATHS ) - 1 ) , 3 , 5382 ) ; Time . sleep ( 1000 ) ; if ( ( Loader . getClient ( ) . getOpenInterfaceId ( ) ) == 5292 ) { Keyboard . getInstance ( ) . sendKeys ( "12000" ) ; Time . sleep ( 500 ) ; Keyboard . getInstance ( ) . clickKey ( KeyEvent . VK_ENTER ) ; } Time . sleep ( 800 ) ; Menu . sendAction ( 53 , ( ( BarrowLibrary . BLOODS ) - 1 ) , 4 , 5382 ) ; Time . sleep ( 1000 ) ; if ( ( Loader . getClient ( ) . getOpenInterfaceId ( ) ) == 5292 ) { Keyboard . getInstance ( ) . sendKeys ( "6000" ) ; Time . sleep ( 500 ) ; Keyboard . getInstance ( ) . clickKey ( KeyEvent . VK_ENTER ) ; } Time . sleep ( 600 ) ; if ( BarrowLibrary . somethingWrong ) { <START_BUG> Menu . sendAction ( 75 , ( ( BarrowLibrary . SHARK ) - 1 ) , 2 , 5382 ) ; <END_BUG> Mouse . getInstance ( ) . click ( xMark ) ; Time . sleep ( 800 ) ; } else { Menu . sendAction ( 632 , ( ( BarrowLibrary . SHARK ) - 1 ) , 2 , 5382 ) ; Time . sleep ( 500 ) ; Menu . sendAction ( 632 , ( ( BarrowLibrary . SHARK ) - 1 ) , 2 , 5382 ) ; Time . sleep ( 500 ) ; Mouse . getInstance ( ) . click ( xMark ) ; Time . sleep ( 800 ) ; } if ( BarrowLibrary . somethingWrong ) { while ( ( Inventory . getCount ( SHARK ) ) > 2 ) { BarrowMethods . eat ( ) ; Time . sleep ( new SleepCondition ( ) { @ Override public boolean isValid ( ) { return ( Players . getMyPlayer ( ) . getHealth ( ) ) > 70 ; } } , 2000 ) ; BarrowLibrary . somethingWrong = false ; if ( ( Inventory . getCount ( SHARK ) ) == 2 ) break ; } } } }

Fix:
Menu . sendAction ( 78 , ( ( BarrowLibrary . SHARK ) - 1 ) , 2 , 5382 ) ;
Buggy code:
public class IOSamples { private int SUPPLY_VOLTAGE ; private Hashtable analog ; private Hashtable digital ; public IOSamples ( Hashtable analog , Hashtable digital , int SUPPLY_VOLTAGE ) { } public Hashtable GetAnalogs ( ) { } public Integer GetAnalog ( Pin pin ) { } public Integer GetDigital ( Pin pin ) { <START_BUG> if ( this . analog . containsKey ( pin ) ) <END_BUG> return ( ( Integer ) ( digital . get ( pin ) ) ) ; return null ; } public Hashtable GetDigitals ( ) { } public int GetSupplyVoltage ( ) { } No newline ; at end ; of file ; }

Fix:
if ( this . digital . containsKey ( pin ) )
Buggy code:
public final class Target extends Terminus implements Encodable { public static final long DESCRIPTOR_LONG = 41L ; public static final String DESCRIPTOR_STRING = "amqp:target:list" ; public static final Target . Factory FACTORY = new Target . Factory ( ) ; @ Override public void encode ( Encoder encoder ) { } public static final class Factory implements DescribedTypeFactory { @ SuppressWarnings ( "unchecked" ) public Object create ( Object in ) throws DecodeException { List < Object > l = ( ( List < Object > ) ( in ) ) ; Target target = new Target ( ) ; switch ( 7 - ( l . size ( ) ) ) { case 0 : Object val0 = l . get ( 6 ) ; if ( ( val0 == null ) || ( val0 . getClass ( ) . isArray ( ) ) ) { target . setCapabilities ( ( ( String [ ] ) ( val0 ) ) ) ; } else { target . setCapabilities ( ( ( String ) ( val0 ) ) ) ; } case 1 : target . setDynamicNodeProperties ( ( ( Map < Object , Object > ) ( l . get ( 5 ) ) ) ) ; case 2 : target . setDynamic ( ( ( l . get ( 4 ) ) == null ? false : ( ( Boolean ) ( l . get ( 4 ) ) ) ) ) ; case 3 : target . setTimeout ( ( ( l . get ( 3 ) ) == null ? 0 : ( ( Integer ) ( l . get ( 3 ) ) ) ) ) ; case 4 : target . setExpiryPolicy ( ( ( l . get ( 2 ) ) == null ? TerminusExpiryPolicy . SESSION_END : TerminusExpiryPolicy . getEnum ( ( ( String ) ( l . get ( 2 ) ) ) ) ) ) ; case 5 : <START_BUG> target . setDurable ( ( ( l . get ( 1 ) ) == null ? TerminusDurability . NONE : TerminusDurability . get ( ( ( Byte ) ( l . get ( 1 ) ) ) ) ) ) ; <END_BUG> case 6 : target . setAddress ( ( ( String ) ( l . get ( 0 ) ) ) ) ; } return target ; } } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
target . setDurable ( ( ( l . get ( 1 ) ) == null ? TerminusDurability . NONE : TerminusDurability . get ( ( ( Integer ) ( l . get ( 1 ) ) ) . byteValue ( ) ) ) ) ;
Buggy code:
public class TestRGBDownsample { @ Test public void testSameSize ( ) { Image image = new BufferedImage ( 320 , 200 , BufferedImage . TYPE_INT_RGB ) ; RGBDownsample ds = new RGBDownsample ( ) ; <START_BUG> double [ ] d = ds . downSample ( image , 320 , 200 ) ; <END_BUG> Assert . assertEquals ( 192000 , d . length ) ; } @ Test public void testDifferentSize ( ) { } }

Fix:
double [ ] d = ds . downSample ( image , 200 , 320 ) ;
Buggy code:
public class InstructionPrinter { private STGroup m_stg ; public InstructionPrinter ( ) { } public String print ( ProgramIns prog ) { } private ST printIFunDef ( IFunDef node ) { } private ST printImplFun ( ImplFun node ) { } private ST printDefFunGroup ( DefFunGroup node ) { } private Object printDefFun ( DefFun node ) { } private Object printInstruction ( IStfplInstruction node ) { } private Object printInsTuple ( InsTuple node ) { } private Object printInsPatLabDecompose ( InsPatLabDecompose node ) { } private Object printInsMove ( InsMove node ) { } private Object printInsFormEnv ( InsFormEnv node ) { } private Object printInsCond ( InsCond node ) { } private Object printIValPrim ( IValPrim vp ) { if ( vp instanceof AtomValue ) { return printAtomValue ( ( ( AtomValue ) ( vp ) ) ) ; } else <START_BUG> if ( vp instanceof AtomValue ) { <END_BUG> return printSId ( ( ( SId ) ( vp ) ) ) ; } else if ( vp instanceof SIdUser ) { return printSIdUser ( ( ( SIdUser ) ( vp ) ) ) ; } else { throw new Error ( ( vp + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>supported" ) ) ; } } private Object printSIdUser ( SIdUser vp ) { } private Object printSId ( SId vp ) { } private Object printAtomValue ( AtomValue vp ) { } private Object printInsClosure ( InsClosure node ) { } private Object printInsCall ( InsCall node ) { } }

Fix:
if ( vp instanceof SId ) {
Buggy code:
public class DSRecord extends Record { public static final byte SHA1_DIGEST_ID = 1 ; private static DSRecord member = new DSRecord ( ) ; private int footprint = - 1 ; private byte alg ; private byte digestid = DSRecord . SHA1_DIGEST_ID ; private byte [ ] digest ; private DSRecord ( ) { } private DSRecord ( Name name , short dclass , int ttl ) { } static DSRecord getMember ( ) { } public DSRecord ( Name name , short dclass , int ttl , int footprint , int alg , int digestid , byte [ ] digest ) { } Record rrFromWire ( Name name , short type , short dclass , int ttl , int length , DataByteInputStream in ) throws IOException { } Record rdataFromString ( Name name , short dclass , int ttl , MyStringTokenizer st , Name origin ) throws TextParseException { DSRecord rec = new DSRecord ( name , dclass , ttl ) ; rec . footprint = Integer . decode ( nextString ( st ) ) . intValue ( ) ; rec . alg = ( ( byte ) ( Integer . parseInt ( nextString ( st ) ) ) ) ; rec . digestid = ( ( byte ) ( Integer . parseInt ( nextString ( st ) ) ) ) ; <START_BUG> rec . digest = base16 . fromString ( st . remainingTokens ( ) ) ; <END_BUG> return rec ; } public String rdataToString ( ) { } public byte getAlgorithm ( ) { } public byte getDigestID ( ) { } public byte [ ] getDigest ( ) { } public short getFootprint ( ) { } void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } }

Fix:
rec . digest = base16 . fromString ( remainingStrings ( st ) ) ;
Buggy code:
public class GameModes { public static final int LOAD_GAME_ID = 0 ; public static final int NORMAL_MODE_ID = 1 ; public static final int PRACTICE_MODE_ID = 2 ; public static final int PRO_MODE_ID = 3 ; public static final int ARCADE_MODE_ID = 4 ; public static final int RUSH_MODE_ID = 5 ; public static final int SURVIVAL_MODE_ID = 6 ; public static final int X_MODE_ID = 7 ; public static final int CORNER_MODE_ID = 8 ; public static final int SPEED_MODE_ID = 9 ; public static final int ZEN_MODE_ID = 10 ; public static final int GHOST_MODE_ID = 11 ; public static final int CRAZY_MODE_ID = 12 ; public static final int CUSTOM_MODE_ID = 13 ; public static final int TITLE_MODE_ID = 15 ; public static final int SURVIVAL_MODE_TIME = 15 ; public static List < Integer > getListOfGameModesIds ( ) { } public static Game newGameFromId ( int id ) { } public static int getGameTitleById ( int id ) { } public static int getGameDescById ( int id ) { } public static Game practiceMode ( ) { } public static Game normalMode ( ) { } public static Game proMode ( ) { } public static Game arcadeMode ( ) { } public static Game rushMode ( ) { } public static Game survivalMode ( ) { Game game = new Game ( ) ; game . setMoveLimit ( ( - 1 ) ) ; <START_BUG> game . setTimeLimit ( 30 ) ; <END_BUG> game . enableSurvivalMode ( ) ; game . setUseItemInventory ( true ) ; game . setGameModeId ( GameModes . SURVIVAL_MODE_ID ) ; game . finishedCreatingGame ( ) ; return game ; } public static Game XMode ( ) { } public static Game cornerMode ( ) { } public static Game speedMode ( ) { } public static Game zenMode ( ) { } public static Game crazyMode ( ) { } public static Game ghostMode ( ) { } public static Game createTitleMode ( ) { } public static Location getTitleModeLocation ( int turnNumber ) { } public static int getTitleValue ( int turnNumber ) { } }

Fix:
game . setTimeLimit ( GameModes . SURVIVAL_MODE_TIME ) ;
Buggy code:
public class SortAlgo { static final String className = SortAlgo . class . getName ( ) ; static final Category CAT = Category . getInstance ( SortAlgo . className ) ; static final Category OUTER = Category . getInstance ( ( ( SortAlgo . className ) + ".OUTER" ) ) ; static final Category INNER = Category . getInstance ( ( ( SortAlgo . className ) + ".INNER" ) ) ; static final Category DUMP = Category . getInstance ( ( ( SortAlgo . className ) + ".DUMP" ) ) ; static final Category SWAP = Category . getInstance ( ( ( SortAlgo . className ) + ".SWAP" ) ) ; int [ ] intArray ; SortAlgo ( int [ ] intArray ) { } void bubbleSort ( ) { } void dump ( ) { if ( ! ( ( this . intArray ) instanceof int [ ] ) ) { SortAlgo . DUMP . error ( "Tried<seq2seq4repair_space>to<seq2seq4repair_space>dump<seq2seq4repair_space>an<seq2seq4repair_space>uninitialized<seq2seq4repair_space>array." ) ; return ; } <START_BUG> SortAlgo . DUMP . info ( "Dump<seq2seq4repair_space>of<seq2seq4repair_space>interger<seq2seq4repair_space>array:" ) ; <END_BUG> for ( int i = 0 ; i < ( this . intArray . length ) ; i ++ ) { SortAlgo . DUMP . info ( ( ( ( "Element<seq2seq4repair_space>[" + i ) + "]=" ) + ( this . intArray [ i ] ) ) ) ; } } void swap ( int l , int r ) { } }

Fix:
SortAlgo . DUMP . info ( "Dump<seq2seq4repair_space>of<seq2seq4repair_space>integer<seq2seq4repair_space>array:" ) ;
Buggy code:
public class CachedConnectionManagerSetupProcessor implements DeploymentUnitProcessor { private static final ServiceName SERVICE_NAME = ServiceName . of ( "jca" , "cachedConnectionManagerSetupProcessor" ) ; @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } @ Override public void undeploy ( final DeploymentUnit context ) { } private static class CachedConnectionManagerSetupAction implements SetupAction , Service < Void > { private final InjectedValue < CachedConnectionManager > cachedConnectionManager = new InjectedValue < CachedConnectionManager > ( ) ; private final ServiceName serviceName ; private static final Set < ? > unsharable = new HashSet < Object > ( ) ; private CachedConnectionManagerSetupAction ( final ServiceName serviceName ) { } @ Override public void setup ( final Map < String , Object > properties ) { try { final CachedConnectionManager connectionManager = cachedConnectionManager . getOptionalValue ( ) ; if ( connectionManager != null ) { <START_BUG> cachedConnectionManager . getValue ( ) . pushMetaAwareObject ( this , CachedConnectionManagerSetupProcessor . CachedConnectionManagerSetupAction . unsharable ) ; <END_BUG> } } catch ( ResourceException e ) { throw new RuntimeException ( e ) ; } } @ Override public void teardown ( final Map < String , Object > properties ) { } @ Override public int priority ( ) { } @ Override public Set < ServiceName > dependencies ( ) { } @ Override public void start ( final StartContext context ) throws StartException { } @ Override public void stop ( final StopContext context ) { } @ Override public Void getValue ( ) throws IllegalArgumentException , IllegalStateException { } } }

Fix:
connectionManager . pushMetaAwareObject ( this , CachedConnectionManagerSetupProcessor . CachedConnectionManagerSetupAction . unsharable ) ;